@corva/ui 0.57.0-2 → 0.57.0-4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/cjs-bundle/components/AssetEditor/index.js +1 -1
  2. package/cjs-bundle/components/AssetNameLabel/AssetNameLabel.js +1 -1
  3. package/cjs-bundle/components/StatusBadge/components/DQAccordionDetailsContent.js +1 -1
  4. package/cjs-bundle/components/StatusBadge/components/DQAlertTooltip.js +1 -1
  5. package/cjs-bundle/components/StatusBadge/components/DQAlertsTooltip.js +1 -1
  6. package/cjs-bundle/components/StatusBadge/components/DQUnvalidatedContent.js +1 -1
  7. package/cjs-bundle/components/StatusBadge/constants.js +1 -1
  8. package/cjs-bundle/components/StatusBadge/index.js +1 -1
  9. package/cjs-bundle/components/StatusBadge/styles.js +1 -1
  10. package/cjs-bundle/components/StatusBadge/utils.js +1 -0
  11. package/components/AssetEditor/index.js +1 -1
  12. package/components/AssetNameLabel/AssetNameLabel.js +1 -1
  13. package/components/StatusBadge/components/DQAccordionDetailsContent.d.ts.map +1 -1
  14. package/components/StatusBadge/components/DQAccordionDetailsContent.js +1 -1
  15. package/components/StatusBadge/components/DQAlertTooltip.d.ts +1 -2
  16. package/components/StatusBadge/components/DQAlertTooltip.d.ts.map +1 -1
  17. package/components/StatusBadge/components/DQAlertTooltip.js +1 -1
  18. package/components/StatusBadge/components/DQAlertsTooltip.d.ts +2 -3
  19. package/components/StatusBadge/components/DQAlertsTooltip.d.ts.map +1 -1
  20. package/components/StatusBadge/components/DQAlertsTooltip.js +1 -1
  21. package/components/StatusBadge/components/DQUnvalidatedContent.d.ts +2 -1
  22. package/components/StatusBadge/components/DQUnvalidatedContent.d.ts.map +1 -1
  23. package/components/StatusBadge/components/DQUnvalidatedContent.js +1 -1
  24. package/components/StatusBadge/constants.d.ts +6 -0
  25. package/components/StatusBadge/constants.d.ts.map +1 -1
  26. package/components/StatusBadge/constants.js +1 -1
  27. package/components/StatusBadge/index.d.ts.map +1 -1
  28. package/components/StatusBadge/index.js +1 -1
  29. package/components/StatusBadge/styles.d.ts.map +1 -1
  30. package/components/StatusBadge/styles.js +1 -1
  31. package/components/StatusBadge/utils.d.ts +7 -0
  32. package/components/StatusBadge/utils.d.ts.map +1 -0
  33. package/components/StatusBadge/utils.js +1 -0
  34. package/package.json +1 -1
  35. package/cjs-bundle/components/StatusBadge/components/DQSuccessContent.js +0 -1
  36. package/components/StatusBadge/components/DQSuccessContent.d.ts +0 -5
  37. package/components/StatusBadge/components/DQSuccessContent.d.ts.map +0 -1
  38. package/components/StatusBadge/components/DQSuccessContent.js +0 -1
@@ -1 +1 @@
1
- "use strict";var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/slicedToArray"),a=require("react"),s=require("prop-types"),l=require("lodash"),r=require("@material-ui/core"),i=require("./AssetEditors.css.js"),u=require("./SingleAssetEditor.js"),n=require("./AssetEditorAutocomplete.js"),d=require("react/jsx-runtime");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=o(e),p=o(t),y=o(s),f="DC_AppSettingsAssetEditor",A=function(e){var t=e.appKey,s=e.appType,o=e.defaultValue,y=e.isNullable,A=e.label,b=e.onSettingsChange,g=e.settings,m=l.get(s,["primaryAsset","assetType","type"]),h=l.get(s,["primaryAsset","assetType","id"]),j=l.get(s,["primaryAsset","autocompleteSelect"]),C=l.get(s,["secondaryAsset","assetType","type"]),T=l.get(s,["secondaryAsset","assetType","id"]),q=l.get(s,["secondaryAsset","autocompleteSelect"]),v=l.get(g,h),x=a.useState(v||o),N=p.default(x,2),V=N[0],S=N[1],K=a.useState(l.get(g,T)),_=p.default(K,2),E=_[0],B=_[1],z=a.useState(!(!C||E)),R=p.default(z,2),k=R[0],D=R[1],I=a.useState(!(!C||!E)),P=p.default(I,2),U=P[0],W=P[1],w=function(e){B(e),b(c.default({},T,e))},F=function(e){S(e),B(null),W(!1),D(!!C);var t=c.default({},h,e);T&&(t[T]=null),b(t)};return d.jsxs("div",{className:i.main,children:[d.jsx("div",{className:i.title,children:"Active Asset"}),d.jsxs("div",{className:i.editor,children:[j?d.jsx(n,{appKey:t,assetType:m,currentValue:V,"data-testid":"".concat(f,"_primaryAssetEditorAutocomplete"),defaultValue:o,disableClearable:!1,isNullable:y,label:A,onChange:F}):d.jsx(u,{appKey:t,assetType:m,currentValue:V,"data-testid":"".concat(f,"_primaryAutoComplete"),defaultValue:o,isNullable:y,label:A,onChange:F}),k&&d.jsx(r.Button,{"data-testid":"".concat(f,"_changeWellButton"),color:"primary",onClick:function(){W(!0),D(!1)},disabled:!v,children:"Change ".concat(l.capitalize(C))}),!k&&U&&d.jsx(r.Button,{"data-testid":"".concat(f,"_useDefaultButton"),color:"secondary",onClick:function(){B(null),W(!1),D(!!C),b(c.default({},T,null))},children:"Use active asset"})]}),U&&d.jsx("div",{className:i.editor,children:q?d.jsx(n,{appKey:t,assetType:C,currentValue:E,"data-testid":"".concat(f,"_secondaryAssetEditorAutocomplete"),defaultValue:o,disableClearable:!1,isNullable:y,label:"Active ".concat(l.capitalize(C)),onChange:w,parentAssetId:V,parentAssetType:m}):d.jsx(u,{"data-testid":"".concat(f,"_secondaryAutoComplete"),onChange:w,defaultValue:o,currentValue:E,isNullable:y,label:"Active ".concat(l.capitalize(C)),assetType:C,parentAssetId:V,parentAssetType:m,appKey:t})})]})};A.defaultProps={label:"Choose An Asset",isNullable:!1,defaultValue:void 0,appKey:null},A.propTypes={settings:y.default.shape({}).isRequired,appType:y.default.shape({}).isRequired,defaultValue:y.default.any,onSettingsChange:y.default.func.isRequired,label:y.default.string,isNullable:y.default.bool,appKey:y.default.string},module.exports=A;
1
+ "use strict";var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/slicedToArray"),a=require("react"),s=require("prop-types"),l=require("lodash"),r=require("@material-ui/core"),i=require("./AssetEditors.css.js"),u=require("./SingleAssetEditor.js"),n=require("./AssetEditorAutocomplete.js"),d=require("react/jsx-runtime");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=o(e),p=o(t),y=o(s),f="DC_AppSettingsAssetEditor",A=function(e){var t=e.appKey,s=e.appType,o=e.defaultValue,y=e.isNullable,A=e.label,b=e.onSettingsChange,g=e.settings,m=l.get(s,["primaryAsset","assetType","type"]),h=l.get(s,["primaryAsset","assetType","id"]),j=l.get(s,["primaryAsset","autocompleteSelect"]),C=l.get(s,["secondaryAsset","assetType","type"]),T=l.get(s,["secondaryAsset","assetType","id"]),q=l.get(s,["secondaryAsset","autocompleteSelect"]),v=l.get(g,h),x=a.useState(v||o),N=p.default(x,2),V=N[0],S=N[1],K=a.useState(l.get(g,T)),_=p.default(K,2),E=_[0],B=_[1],z=a.useState(!(!C||E)),R=p.default(z,2),k=R[0],D=R[1],I=a.useState(!(!C||!E)),P=p.default(I,2),U=P[0],W=P[1],w=function(e){B(e),b(c.default({},T,e))},F=function(e){S(e),B(null),W(!1),D(!!C);var t=c.default({},h,e);T&&(t[T]=null),b(t)};return d.jsxs("div",{className:i.main,children:[d.jsx("div",{className:i.title,children:"Active Asset"}),d.jsxs("div",{className:i.editor,children:[j?d.jsx(n,{appKey:t,assetType:m,currentValue:V,"data-testid":"".concat(f,"_primaryAssetEditorAutocomplete"),defaultValue:o,disableClearable:!y,isNullable:y,label:A,onChange:F}):d.jsx(u,{appKey:t,assetType:m,currentValue:V,"data-testid":"".concat(f,"_primaryAutoComplete"),defaultValue:o,isNullable:y,label:A,onChange:F}),k&&d.jsx(r.Button,{"data-testid":"".concat(f,"_changeWellButton"),color:"primary",onClick:function(){W(!0),D(!1)},disabled:!v,children:"Change ".concat(l.capitalize(C))}),!k&&U&&d.jsx(r.Button,{"data-testid":"".concat(f,"_useDefaultButton"),color:"secondary",onClick:function(){B(null),W(!1),D(!!C),b(c.default({},T,null))},children:"Use active asset"})]}),U&&d.jsx("div",{className:i.editor,children:q?d.jsx(n,{appKey:t,assetType:C,currentValue:E,"data-testid":"".concat(f,"_secondaryAssetEditorAutocomplete"),defaultValue:o,disableClearable:!1,isNullable:y,label:"Active ".concat(l.capitalize(C)),onChange:w,parentAssetId:V,parentAssetType:m}):d.jsx(u,{"data-testid":"".concat(f,"_secondaryAutoComplete"),onChange:w,defaultValue:o,currentValue:E,isNullable:y,label:"Active ".concat(l.capitalize(C)),assetType:C,parentAssetId:V,parentAssetType:m,appKey:t})})]})};A.defaultProps={label:"Choose An Asset",isNullable:!1,defaultValue:void 0,appKey:null},A.propTypes={settings:y.default.shape({}).isRequired,appType:y.default.shape({}).isRequired,defaultValue:y.default.any,onSettingsChange:y.default.func.isRequired,label:y.default.string,isNullable:y.default.bool,appKey:y.default.string},module.exports=A;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require('./../../ext-esm/tslib/tslib.es6.js'),r=require("react/jsx-runtime"),t=require("react"),s=require("@material-ui/core"),i=require("classnames");require("../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js");var n=require("../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js");require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/objectWithoutProperties"),require("react-router");var a=require("./AssetNameLabel.styles.css.js");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=u(i),c=t.memo((function(i){var u=i.assetName,c=i.classes,o=i.coordinatesPixelWidth,d=i.dataTestId,f=i.href,m=i.icon,h=i.statusBadge,v=t.useState(u),j=v[0],x=v[1],_=t.useRef(),p=t.useRef(),b=t.useRef();return t.useEffect((function(){_.current&&(p.current||(p.current=_.current.scrollWidth),x(o>b.current?u:function(e,r,t){if(r===t)return e;var s=t/e.length,i=Math.floor(r/s),n=Math.floor(i/2),a=Math.max(n-2,2);return e.slice(0,a)+"..."+e.slice(e.length-a)}(u,_.current.clientWidth,p.current)),b.current=o)}),[o,b.current]),r.jsx(s.Tooltip,e.__assign({title:u},{children:r.jsx("div",e.__assign({className:l.default(a.wrapper)},{children:r.jsxs(n.UniversalLink,e.__assign({className:l.default(a.item,null==c?void 0:c.item),"data-testid":d,href:f},{children:[m&&r.jsx("div",e.__assign({className:a.startIcon},{children:m})),r.jsx("span",e.__assign({className:a.assetName,ref:_},{children:j})),h]}))}))}))}));exports.AssetNameLabel=c;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require('./../../ext-esm/tslib/tslib.es6.js'),r=require("react/jsx-runtime"),t=require("react"),s=require("@material-ui/core"),i=require("classnames");require("../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js");var n=require("../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js");require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/objectWithoutProperties"),require("react-router");var a=require("./AssetNameLabel.styles.css.js");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=u(i),c=t.memo((function(i){var u=i.assetName,c=i.classes,o=i.coordinatesPixelWidth,d=i.dataTestId,f=i.href,m=i.icon,h=i.statusBadge,v=t.useState(u),j=v[0],x=v[1],_=t.useRef(),p=t.useRef(),b=t.useRef();return t.useEffect((function(){_.current&&(p.current||(p.current=_.current.scrollWidth),x(o>b.current?u:function(e,r,t){if(r===t)return e;var s=t/e.length,i=Math.floor(r/s),n=Math.floor(i/2),a=Math.max(n-2,2);return e.slice(0,a)+"..."+e.slice(e.length-a)}(u,_.current.clientWidth,p.current)),b.current=o)}),[u,o,b.current]),r.jsx(s.Tooltip,e.__assign({title:u},{children:r.jsx("div",e.__assign({className:l.default(a.wrapper)},{children:r.jsxs(n.UniversalLink,e.__assign({className:l.default(a.item,null==c?void 0:c.item),"data-testid":d,href:f},{children:[m&&r.jsx("div",e.__assign({className:a.startIcon},{children:m})),r.jsx("span",e.__assign({className:a.assetName,ref:_},{children:j})),h]}))}))}))}));exports.AssetNameLabel=c;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var s=require('./../../../ext-esm/tslib/tslib.es6.js'),e=require("react/jsx-runtime"),a=require("classnames"),i=require("../styles.js"),t=require("../constants.js"),r=require("./DQAlertTooltip.js");function l(s){return s&&"object"==typeof s&&"default"in s?s:{default:s}}var n=l(a);exports.DQAccordionDetailsContent=function(a){var l=a.assets,u=a.anchorEl,c=i.useDQUnvalidatedContentStyles({});return e.jsx("div",s.__assign({className:c.assetTable},{children:l.map((function(a){var i=a.id,l=a.name,o=a.issuesNum,d=a.missingNum,_=a.isResolved,T=a.alert,m=function(s){return{alert:T,alertsNum:s===t.ALERT_STATES.issue?o:d,alertState:s===t.ALERT_STATES.issue?t.ALERT_STATES.issue:t.ALERT_STATES.missing,isMissingData:d>0,isIssueData:o>0}},j=m(t.ALERT_STATES.issue),A=m(t.ALERT_STATES.missing),v=t.ALERT_ICONS.Resolved;return e.jsxs("div",s.__assign({className:c.assetWrapper},{children:[e.jsx("div",s.__assign({className:n.default(c.assetName,c.assetCell)},{children:l})),_?e.jsx("div",s.__assign({className:c.assetCell},{children:e.jsx("div",s.__assign({className:c.errorContainer},{children:e.jsx(v,{className:n.default(c.Resolved,c.alertIcon)})}))})):e.jsxs(e.Fragment,{children:[o>0&&e.jsx("div",s.__assign({className:c.assetCell},{children:e.jsx(r.DQAlertTooltip,s.__assign({anchorEl:u},j))})),d>0&&e.jsx("div",s.__assign({className:c.assetCell},{children:e.jsx(r.DQAlertTooltip,s.__assign({anchorEl:u},A))}))]})]}),i)}))}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var s=require('./../../../ext-esm/tslib/tslib.es6.js'),e=require("react/jsx-runtime"),a=require("classnames"),i=require("../styles.js"),t=require("../constants.js"),r=require("./DQAlertTooltip.js");function l(s){return s&&"object"==typeof s&&"default"in s?s:{default:s}}var n=l(a);exports.DQAccordionDetailsContent=function(a){var l=a.assets,u=a.anchorEl,o=i.useDQUnvalidatedContentStyles({});return e.jsx("div",s.__assign({className:o.assetTable},{children:l.map((function(a){var i=a.id,l=a.name,c=a.issuesNum,_=a.missingNum,d=a.isResolved,T=a.alert,m=function(s){return{alert:T,alertsNum:s===t.ALERT_STATES.issue?c:_,alertState:s===t.ALERT_STATES.issue?t.ALERT_STATES.issue:t.ALERT_STATES.missing,isIssueData:c>0}},j=m(t.ALERT_STATES.issue),A=m(t.ALERT_STATES.missing);return e.jsxs("div",s.__assign({className:o.assetWrapper},{children:[e.jsx("div",s.__assign({className:n.default(o.assetName,o.assetCell)},{children:l})),d?e.jsx("div",s.__assign({className:o.assetCell},{children:e.jsx(r.DQAlertTooltip,s.__assign({anchorEl:u},j))})):e.jsxs(e.Fragment,{children:[c>0&&e.jsx("div",s.__assign({className:o.assetCell},{children:e.jsx(r.DQAlertTooltip,s.__assign({anchorEl:u},j))})),_>0&&e.jsx("div",s.__assign({className:o.assetCell},{children:e.jsx(r.DQAlertTooltip,s.__assign({anchorEl:u},A))}))]})]}),i)}))}))};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var s=require('./../../../ext-esm/tslib/tslib.es6.js'),e=require("react/jsx-runtime"),r=require("classnames"),t=require("../constants.js"),a=require("./DQAlertsTooltip.js"),i=require("../styles.js");function n(s){return s&&"object"==typeof s&&"default"in s?s:{default:s}}var l=n(r);exports.DQAlertTooltip=function(r){var n,o=r.alert,u=r.alertsNum,c=r.alertState,d=r.isMissingData,_=r.isIssueData,T=r.anchorEl,j=i.useDQUnvalidatedContentStyles({}),m=t.ALERT_ICONS[c];return e.jsx(a.DQAlertsTooltip,s.__assign({alert:d?s.__assign(s.__assign({},o),{state:t.ALERT_STATES.missing}):o,anchorEl:T,alertIcon:e.jsx(m,{className:l.default(j[d?t.ALERT_STATES.missing:c],j.alertIcon)}),isTooltipVisible:u>0},{children:e.jsxs("div",s.__assign({className:l.default(j.errorContainer,(n={},n[j.missingContainer]=_&&c===t.ALERT_STATES.missing,n))},{children:[e.jsx(m,{className:l.default(j[c],j.alertIcon)}),e.jsxs("div",{children:[e.jsxs("span",s.__assign({className:l.default(j[c],j.errorText)},{children:[c,": "]})),e.jsx("span",s.__assign({className:j.errorNum},{children:u}))]})]}))}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require('./../../../ext-esm/tslib/tslib.es6.js'),s=require("react/jsx-runtime"),r=require("classnames"),t=require("../constants.js"),a=require("./DQAlertsTooltip.js"),l=require("../styles.js"),i=require("../utils.js");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=n(r);exports.DQAlertTooltip=function(r){var n,u,c=r.alert,d=r.alertsNum,j=r.alertState,_=r.isIssueData,m=r.anchorEl,x=l.useDQUnvalidatedContentStyles({}),f=i.isResolved(c.status),v=f?t.ALERT_ICONS.Resolved:t.ALERT_ICONS[j];return s.jsx(a.DQAlertsTooltip,e.__assign({alert:c,anchorEl:m,alertIcon:s.jsx(v,{className:o.default(x[j],x.alertIcon)})},{children:s.jsxs("div",e.__assign({className:o.default(x.errorContainer,(n={},n[x.missingContainer]=_&&j===t.ALERT_STATES.missing,n))},{children:[s.jsx(v,{className:o.default((u={},u[x[j]]=!f,u[x.Resolved]=f,u),x.alertIcon)}),s.jsx("div",{children:!f&&s.jsxs(s.Fragment,{children:[s.jsxs("span",e.__assign({className:o.default(x[j],x.errorText)},{children:[j,": "]})),s.jsx("span",e.__assign({className:x.errorNum},{children:d}))]})})]}))}))};
@@ -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"),a=require("moment"),r=require("lodash"),i=require("@material-ui/core"),s=require("../../Tooltip/Tooltip.js");require("../../Tooltip/ScrollableTooltip.js");var n=require("../constants.js");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=l(a),p=i.makeStyles((function(e){return{errorIcon:{width:20,height:18},title:{maxWidth:198,padding:"0 0 8px",fontSize:16,lineHeight:"22px",color:e.palette.primary.text1},alertTime:{fontSize:14,color:e.palette.primary.text6,"& span":{color:e.palette.primary.text1}},alertMessage:{width:"100%",height:40,margin:0,overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box","-webkit-line-clamp":2,"-webkit-box-orient":"vertical",whiteSpace:"pre-wrap",fontSize:14,lineHeight:"20px",color:e.palette.primary.text1},alertMessageFull:{marginBottom:8,fontSize:14,lineHeight:"20px",color:e.palette.primary.text1,whiteSpace:"pre-wrap"},alertInfo:{display:"flex",alignItems:"center",flexWrap:"wrap",marginBottom:8,fontSize:14,textTransform:"capitalize","& span":{color:e.palette.primary.text6,marginRight:8},"& .error":{color:e.palette.error.main},"& .warning":{color:"#ffa500"}},resolvedInfo:{display:"flex",alignItems:"center",marginBottom:8,color:e.palette.primary.text6,fontSize:14},infoIcon:{color:e.palette.info.main,marginRight:8,fontSize:16},popover:{marginLeft:8,width:270,minHeight:122,padding:12,display:"flex",flexDirection:"column",justifyContent:"space-between",backgroundColor:e.palette.background.b9,border:"1px solid ".concat(e.palette.primary.text9),boxShadow:"0px 3px 10px rgba(0, 0, 0, 0.4)",borderRadius:4,"& .MuiTooltip-tooltip":{backgroundColor:e.palette.background.b9,fontWeight:400,lineHeight:"20px",margin:0,padding:0}},message:{whiteSpace:"pre-wrap"},note:{marginBottom:4}}})),c=function(e){return o.default.unix(e).format("DD MMM HH:mm (Z)")},d=function(a){var i=a.children,s=p(),n=r.template(i)({timestampFormatter:c}).split("**").map((function(e,a){return a%2==1?t.jsx("b",{children:e}):e}));return t.jsx("span",e.__assign({className:s.message},{children:n}))};exports.DQAlertsTooltip=function(a){var r,i,l,c=a.alert,m=a.anchorEl,x=a.alertIcon,g=a.children,h=a.isTooltipVisible,u=p(),f=Math.max(c.statusUpdatedAt,c.lastCheckedAt),_=(void 0===l&&(l="MM/DD/YYYY HH:mm a"),(i=f)?o.default.unix(i).format(l):null);return t.jsx(s.Tooltip,{interactive:!0,children:g,PopperProps:{anchorEl:m,className:u.popover},placement:"right",title:h?t.jsxs(t.Fragment,{children:[t.jsx("div",e.__assign({className:u.title},{children:c.name})),t.jsxs("span",e.__assign({className:u.alertInfo},{children:[t.jsx("span",{children:"Category:"})," ",c.category]})),t.jsxs("span",e.__assign({className:u.alertInfo},{children:[t.jsx("span",{children:"Status:"})," ",c.status]})),t.jsxs("span",e.__assign({className:u.alertInfo},{children:[t.jsx("span",{children:"Error Type:"}),t.jsx("div",e.__assign({className:u.errorIcon},{children:x})),t.jsx("span",e.__assign({className:c.state===n.ALERT_STATES.issue?n.BADGE_ICON_STATUSES.warning:n.BADGE_ICON_STATUSES.error},{children:c.state}))]})),t.jsxs("span",e.__assign({className:u.alertInfo},{children:[t.jsx("span",{children:"Score Deduction:"}),t.jsx("span",e.__assign({className:n.BADGE_ICON_STATUSES.warning},{children:"6%"}))]})),t.jsxs("div",e.__assign({className:u.alertMessageFull},{children:[c.isThrottled&&t.jsx("b",{children:"[Throttled]: "}),t.jsx(d,{children:c.message})]})),t.jsxs("span",e.__assign({className:u.alertInfo},{children:[t.jsx("span",e.__assign({className:u.note},{children:"Note:"}))," ",(null===(r=c.note)||void 0===r?void 0:r.length)?c.note:"—"]})),t.jsxs("span",e.__assign({className:u.alertTime},{children:["Updated at: ",t.jsx("span",{children:_})]}))]}):""})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require('./../../../ext-esm/tslib/tslib.es6.js'),t=require("react/jsx-runtime"),r=require("moment"),a=require("lodash"),s=require("@material-ui/core"),i=require("../../Tooltip/Tooltip.js");require("../../Tooltip/ScrollableTooltip.js");var n=require("../utils.js"),o=require("../constants.js");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=l(r),p=s.makeStyles((function(e){return{errorIcon:{width:20,height:18},title:{maxWidth:198,padding:"0 0 8px",fontSize:16,lineHeight:"22px",color:e.palette.primary.text1},alertTime:{fontSize:14,color:e.palette.primary.text6,"& span":{color:e.palette.primary.text1}},alertMessage:{width:"100%",height:40,margin:0,overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box","-webkit-line-clamp":2,"-webkit-box-orient":"vertical",whiteSpace:"pre-wrap",fontSize:14,lineHeight:"20px",color:e.palette.primary.text1},alertMessageFull:{marginBottom:8,fontSize:14,lineHeight:"20px",color:e.palette.primary.text1,whiteSpace:"pre-wrap"},alertInfo:{display:"flex",alignItems:"center",flexWrap:"wrap",marginBottom:8,fontSize:14,textTransform:"capitalize","& span":{color:e.palette.primary.text6,marginRight:8},"& .error":{color:e.palette.error.main},"& .warning":{color:"#ffa500"}},resolvedInfo:{display:"flex",alignItems:"center",marginBottom:8,color:e.palette.primary.text6,fontSize:14},infoIcon:{color:e.palette.info.main,marginRight:8,fontSize:16},popover:{marginLeft:8,width:270,minHeight:122,padding:12,display:"flex",flexDirection:"column",justifyContent:"space-between",backgroundColor:e.palette.background.b9,border:"1px solid ".concat(e.palette.primary.text9),boxShadow:"0px 3px 10px rgba(0, 0, 0, 0.4)",borderRadius:4,"& .MuiTooltip-tooltip":{backgroundColor:e.palette.background.b9,fontWeight:400,lineHeight:"20px",margin:0,padding:0}},message:{whiteSpace:"pre-wrap"},note:{marginBottom:4},ok:{color:"#F99500"}}})),d=function(e){return c.default.unix(e).format("DD MMM HH:mm (Z)")},m=function(r){var s=r.children,i=p(),n=a.template(s)({timestampFormatter:d}).split("**").map((function(e,r){return r%2==1?t.jsx("b",{children:e}):e}));return t.jsx("span",e.__assign({className:i.message},{children:n}))};exports.DQAlertsTooltip=function(r){var a,s,l,d=r.alert,u=r.anchorEl,g=r.alertIcon,x=r.children,h=p(),f=Math.max(d.statusUpdatedAt,d.lastCheckedAt),_=(void 0===l&&(l="MM/DD/YYYY HH:mm a"),(s=f)?c.default.unix(s).format(l):null);return t.jsx(i.Tooltip,{interactive:!0,children:x,PopperProps:{anchorEl:u,className:h.popover},placement:"right",title:t.jsxs(t.Fragment,{children:[t.jsx("div",e.__assign({className:h.title},{children:d.name})),t.jsxs("span",e.__assign({className:h.alertInfo},{children:[t.jsx("span",{children:"Category:"})," ",d.category]})),t.jsxs("span",e.__assign({className:h.alertInfo},{children:[t.jsx("span",{children:"Status:"})," ",d.status]})),t.jsxs("span",e.__assign({className:h.alertInfo},{children:[t.jsx("span",{children:"Error Type:"}),t.jsx("div",e.__assign({className:h.errorIcon},{children:g})),t.jsx("span",e.__assign({className:d.state===o.ALERT_STATES.issue?o.BADGE_ICON_STATUSES.warning:o.BADGE_ICON_STATUSES.error},{children:d.state}))]})),t.jsxs("span",e.__assign({className:h.alertInfo},{children:[t.jsx("span",{children:"Score Deduction:"}),t.jsx("span",e.__assign({className:n.getDeductsFromScoreClass(h,d.deductsFromScore,n.isResolved(d.status))},{children:n.getDeductsFromScoreValue(d.deductsFromScore,n.isResolved(d.status))}))]})),t.jsxs("div",e.__assign({className:h.alertMessageFull},{children:[d.isThrottled&&t.jsx("b",{children:"[Throttled]: "}),t.jsx(m,{children:d.message})]})),t.jsxs("span",e.__assign({className:h.alertInfo},{children:[t.jsx("span",e.__assign({className:h.note},{children:"Note:"}))," ",(null===(a=d.note)||void 0===a?void 0:a.length)?d.note:"—"]})),t.jsxs("span",e.__assign({className:h.alertTime},{children:["Updated at: ",t.jsx("span",{children:_})]}))]})})};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require('./../../../ext-esm/tslib/tslib.es6.js'),a=require("react/jsx-runtime"),s=require("react"),r=require("classnames"),t=require("@material-ui/core"),i=require("@material-ui/icons/ExpandMore"),n=require("../../Search/utils/truncate.js"),c=require("../styles.js"),d=require("./DQAccordionDetailsContent.js");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=l(r),o=l(i);exports.DQUnvalidatedContent=function(r){var i=r.assetsData,l=r.maxHeight,m=s.useRef(null),x=c.useDQUnvalidatedContentStyles({maxHeight:l});return a.jsxs("div",e.__assign({className:x.container,ref:m},{children:[a.jsxs("div",{children:[a.jsx(t.Typography,e.__assign({className:x.headerText,"data-testid":"Status_badge__DQ_unvalidated_content"},{children:"Data Quality"})),a.jsx(t.Typography,e.__assign({className:x.subheaderText},{children:"Fusion real-time data quality rules for app data"}))]}),a.jsx("div",e.__assign({className:x.relative},{children:a.jsx("div",e.__assign({className:x.accordionsWrapper},{children:Object.keys(i).map((function(s){var r=i[s];return a.jsxs(t.Accordion,e.__assign({className:x.accordion,defaultExpanded:!0},{children:[a.jsx(t.AccordionSummary,e.__assign({className:u.default("large","stretched"),expandIcon:a.jsx(o.default,{})},{children:n.truncateString(s,{maxChars:40,charsNumFromStart:18,charsNumFromEnd:17})})),a.jsx(t.AccordionDetails,{children:a.jsx(d.DQAccordionDetailsContent,{anchorEl:null==m?void 0:m.current,assets:r})})]}),s)}))}))}))]}))};
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"),r=require("classnames"),i=require("react-router"),t=require("@material-ui/core"),n=require("@material-ui/icons/Link"),c=require("../../Button/index.js"),l=require("../../Search/utils/truncate.js"),d=require("../styles.js"),o=require("./DQAccordionDetailsContent.js");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var _=u(r),m=u(n);exports.DQUnvalidatedContent=function(r){var n=r.assetsData,u=r.maxHeight,h=r.onClick,x=a.useRef(null),j=d.useDQUnvalidatedContentStyles({maxHeight:u});return s.jsxs("div",e.__assign({className:j.container,ref:x},{children:[s.jsxs("div",{children:[s.jsx(t.Typography,e.__assign({className:j.headerText,"data-testid":"Status_badge__DQ_unvalidated_content"},{children:"Data Quality"})),s.jsx(t.Typography,e.__assign({className:j.subheaderText},{children:"Fusion real-time data quality rules for app data"}))]}),s.jsx("div",e.__assign({className:j.relative},{children:s.jsx("div",e.__assign({className:j.accordionsWrapper},{children:Object.keys(n).map((function(a){var r,c=n[a];return s.jsxs(t.Accordion,e.__assign({className:j.accordion,defaultExpanded:!0},{children:[s.jsx(t.AccordionSummary,e.__assign({className:_.default("large","stretched")},{children:s.jsxs("div",e.__assign({className:j.headerWrapper},{children:[s.jsx("span",{children:l.truncateString(a,{maxChars:35,charsNumFromStart:13,charsNumFromEnd:12})}),s.jsx(i.Link,e.__assign({className:j.link,to:null===(r=c[0])||void 0===r?void 0:r.linkToDQPage},{children:s.jsx(m.default,{className:j.linkIcon})}))]}))})),s.jsx(t.AccordionDetails,{children:s.jsx(o.DQAccordionDetailsContent,{anchorEl:null==x?void 0:x.current,assets:c})})]}),a)}))}))})),s.jsx("div",e.__assign({className:j.reportDQIssueButtonWrapper},{children:s.jsx(c,e.__assign({className:j.reportDQIssueButton,onClick:h,variation:"secondary"},{children:"report dq issue"}))}))]}))};
@@ -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"),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
+ "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,t=n(e),u=n(r),c=n(s),l=n(i),d={Missing:o.DangerousIcon,Issue:c.default,Resolved:l.default},E={success:"success",warning:"warning",error:"error"},I=((a={})[E.success]=u.default,a[E.warning]=t.default,a[E.error]=o.DangerousIcon,a);exports.ALERT_ICONS=d,exports.ALERT_STATES={missing:"Missing",issue:"Issue"},exports.ALERT_STATUSES={RESOLVED:"resolved"},exports.BADGE_ICONS=I,exports.BADGE_ICON_STATUSES=E,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"),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"),u=require("./components/ReportIssueModal.js");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var g=d(n),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,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":{position:"absolute",bottom:0,width:"max-content",transformOrigin:"center top",maxWidth:"none",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,d=n.assetsData,_=void 0===d?{}:d,S=n.appWidth,f=n.DQIssueTooltipMaxHeight,h=n.iconType,I=n.className,T=n.lastTimestamp,b=n.onReportErrorClick,j=n.warningData,y=a.useState(!1),v=y[0],D=y[1],N=null==j?void 0:j.message,C=h==i.BADGE_ICON_STATUSES.error,E=h==i.BADGE_ICON_STATUSES.success,w=S<i.MAX_MOBILE_WIDTH,W=m({isIconExist:!!h,isSuccessTypeIcon:E,isErrorTypeIcon:C});C&&(s=t.jsx(p.DQUnvalidatedContent,{assetsData:_,maxHeight:f})),E&&(s=t.jsx(l.DQSuccessContent,{onClick:function(){return D(!0)}}));return t.jsxs("div",e.__assign({"data-testid":"Status_badge",className:x.default(W.statusBadgeWrapper,I)},{children:[t.jsxs("div",e.__assign({className:W.statusBadgeContent},{children:[h&&t.jsx(o.Tooltip,e.__assign({leaveDelay:200,interactive:C||E,PopperProps:{className:W.popper},placement:"top-start",title:s},{children:t.jsx("div",e.__assign({className:W.DQIconWrapper,"data-testid":"".concat("Status_badge","__DQ_icon_").concat(h)},{children:t.jsx(c.DQStatusIcon,{color:h,iconType:h})}))})),t.jsxs(r.Typography,e.__assign({className:x.default(W.text,W.timestamp),variant:"body1"},{children:["Last Update: ",g.default.unix(T).format("M/D/YYYY h:mm a")]})),j&&t.jsxs(t.Fragment,{children:[t.jsx(o.Tooltip,e.__assign({placement:"top",title:N?"".concat(i.WARNING,". ").concat(N):i.WARNING},{children:t.jsx("div",e.__assign({"data-testid":"".concat("Status_badge","__DQ_icon_warning")},{children:t.jsx(c.DQStatusIcon,{className:W.badgeIconWarning,color:i.BADGE_ICON_STATUSES.warning,iconType:i.BADGE_ICON_STATUSES.warning})}))})),!w&&t.jsx(r.Typography,e.__assign({className:x.default(W.text,W.warningMessage),variant:"body1"},{children:N?"".concat(i.WARNING,". ").concat(N):i.WARNING}))]})]})),E&&t.jsx(u.ReportIssueModal,{open:v,onSave:function(e){b(e),D(!1)},onClose:function(){return D(!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"),r=require("classnames"),s=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/ReportIssueModal.js");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=d(n),g=d(r),x=s.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":{position:"absolute",bottom:0,width:"max-content",transformOrigin:"center top",maxWidth:"none",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 r=n.assetsData,d=void 0===r?{}:r,m=n.appWidth,_=n.DQIssueTooltipMaxHeight,f=n.iconType,S=n.className,h=n.lastTimestamp,I=n.onReportErrorClick,T=n.warningData,b=a.useState(!1),y=b[0],j=b[1],v=null==T?void 0:T.message,D=f==i.BADGE_ICON_STATUSES.error,N=f==i.BADGE_ICON_STATUSES.success,C=m<i.MAX_MOBILE_WIDTH,E=x({isIconExist:!!f,isSuccessTypeIcon:N,isErrorTypeIcon:D});return t.jsxs("div",e.__assign({"data-testid":"Status_badge",className:g.default(E.statusBadgeWrapper,S)},{children:[t.jsxs("div",e.__assign({className:E.statusBadgeContent},{children:[f&&t.jsx(o.Tooltip,e.__assign({leaveDelay:200,interactive:!0,PopperProps:{className:E.popper},placement:"top-start",title:t.jsx(p.DQUnvalidatedContent,{assetsData:d,maxHeight:_,onClick:function(){return j(!0)}})},{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(s.Typography,e.__assign({className:g.default(E.text,E.timestamp),variant:"body1"},{children:["Last Update: ",u.default.unix(h).format("M/D/YYYY h:mm a")]})),T&&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(s.Typography,e.__assign({className:g.default(E.text,E.warningMessage),variant:"body1"},{children:v?"".concat(i.WARNING,". ").concat(v):i.WARNING}))]})]})),N&&t.jsx(l.ReportIssueModal,{open:y,onSave:function(e){I(e),j(!1)},onClose:function(){return j(!1)}})]}))};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@material-ui/core").makeStyles((function(e){return{alertIcon:{width:16,height:16},assetWrapper:{display:"table-row"},assetTable:{display:"table"},assetCell:{display:"table-cell",padding:"5px 0",verticalAlign:"middle",width:111},assetName:{fontSize:"12px",width:89},container:{padding:"12px 0 4px 12px"},headerText:{lineHeight:"19px",fontSize:"16px",fontWeight:500},subheaderText:{lineHeight:"14px",fontSize:"12px",fontWeight:400,marginRight:16,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,height:22},missingContainer:{marginLeft:0},errorText:{marginLeft:4,fontSize:"14px"},errorNum:{fontSize:"16px",marginLeft:4},accordion:{"&:not(:first-child)":{marginTop:"16px !important"},marginTop:"8px !important",color:e.palette.primary.contrastText,"& .MuiAccordionSummary-content":{fontWeight:"400 !important"}},accordionsWrapper:{maxHeight:function(e){var t=e.maxHeight;return t},overflowY:"auto",paddingRight:16,"&::before, &::after":{content:'""',width:"100%",height:16,position:"absolute",zIndex:1},"&::before":{background:"linear-gradient(180deg, ".concat(e.palette.background.b9," 18.23%, rgba(59, 59, 59, 0) 100%)"),opacity:.8,top:0},"&::after":{background:"linear-gradient(0deg, ".concat(e.palette.background.b9," 18.23%, rgba(59, 59, 59, 0) 100%)"),opacity:.8,bottom:0}},relative:{position:"relative",padding:"8px 0"}}}));exports.useDQUnvalidatedContentStyles=e;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@material-ui/core").makeStyles((function(e){return{alertIcon:{width:16,height:16},assetWrapper:{display:"table-row"},assetTable:{display:"table"},assetCell:{display:"table-cell",padding:"5px 0",verticalAlign:"middle",width:111},assetName:{fontSize:"12px",width:89},container:{padding:"12px 0 4px 12px"},headerText:{lineHeight:"19px",fontSize:"16px",fontWeight:500},subheaderText:{lineHeight:"14px",fontSize:"12px",fontWeight:400,marginRight:16,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,height:22},missingContainer:{marginLeft:0},errorText:{marginLeft:4,fontSize:"14px"},errorNum:{fontSize:"16px",marginLeft:4},accordion:{"&:not(:first-child)":{marginTop:"16px !important"},marginTop:"8px !important",color:e.palette.primary.contrastText,"& .MuiAccordionSummary-content":{fontWeight:"400 !important"}},accordionsWrapper:{maxHeight:function(e){var t=e.maxHeight;return t},overflowY:"auto",paddingRight:16,"&::before, &::after":{content:'""',width:"100%",height:16,position:"absolute",zIndex:1},"&::before":{background:"linear-gradient(180deg, ".concat(e.palette.background.b9," 18.23%, rgba(59, 59, 59, 0) 100%)"),opacity:.8,top:0},"&::after":{background:"linear-gradient(0deg, ".concat(e.palette.background.b9," 18.23%, rgba(59, 59, 59, 0) 100%)"),opacity:.8,bottom:0}},relative:{position:"relative",padding:"8px 0"},reportDQIssueButtonWrapper:{display:"flex",justifyContent:"end"},reportDQIssueButton:{marginRight:12,marginBottom:8},headerWrapper:{display:"flex",alignItems:"center"},linkIcon:{width:16,height:16,marginLeft:12,color:e.palette.primary.main},link:{lineHeight:0,zIndex:1}}}));exports.useDQUnvalidatedContentStyles=e;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./constants.js");exports.getDeductsFromScoreClass=function(e,r,t){return t||!r?"":r>40?e.error:r>10?e.warn:r>5?e.ok:e.good},exports.getDeductsFromScoreValue=function(e,r){return!r&&e>=0?"".concat(e,"%"):"—"},exports.isResolved=function(r){return r===e.ALERT_STATUSES.RESOLVED};
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/slicedToArray";import{useState as a}from"react";import s from"prop-types";import{get as l,capitalize as r}from"lodash";import{Button as o}from"@material-ui/core";import i from"./AssetEditors.css.js";import n from"./SingleAssetEditor.js";import p from"./AssetEditorAutocomplete.js";import{jsxs as c,jsx as u}from"react/jsx-runtime";var d="DC_AppSettingsAssetEditor",m=function(s){var m=s.appKey,y=s.appType,A=s.defaultValue,f=s.isNullable,b=s.label,h=s.onSettingsChange,g=s.settings,C=l(y,["primaryAsset","assetType","type"]),T=l(y,["primaryAsset","assetType","id"]),v=l(y,["primaryAsset","autocompleteSelect"]),N=l(y,["secondaryAsset","assetType","type"]),V=l(y,["secondaryAsset","assetType","id"]),K=l(y,["secondaryAsset","autocompleteSelect"]),_=l(g,T),E=a(_||A),S=t(E,2),j=S[0],q=S[1],R=a(l(g,V)),k=t(R,2),x=k[0],B=k[1],D=a(!(!N||x)),I=t(D,2),P=I[0],U=I[1],W=a(!(!N||!x)),w=t(W,2),z=w[0],F=w[1],G=function(t){B(t),h(e({},V,t))},H=function(t){q(t),B(null),F(!1),U(!!N);var a=e({},T,t);V&&(a[V]=null),h(a)};return c("div",{className:i.main,children:[u("div",{className:i.title,children:"Active Asset"}),c("div",{className:i.editor,children:[v?u(p,{appKey:m,assetType:C,currentValue:j,"data-testid":"".concat(d,"_primaryAssetEditorAutocomplete"),defaultValue:A,disableClearable:!1,isNullable:f,label:b,onChange:H}):u(n,{appKey:m,assetType:C,currentValue:j,"data-testid":"".concat(d,"_primaryAutoComplete"),defaultValue:A,isNullable:f,label:b,onChange:H}),P&&u(o,{"data-testid":"".concat(d,"_changeWellButton"),color:"primary",onClick:function(){F(!0),U(!1)},disabled:!_,children:"Change ".concat(r(N))}),!P&&z&&u(o,{"data-testid":"".concat(d,"_useDefaultButton"),color:"secondary",onClick:function(){B(null),F(!1),U(!!N),h(e({},V,null))},children:"Use active asset"})]}),z&&u("div",{className:i.editor,children:K?u(p,{appKey:m,assetType:N,currentValue:x,"data-testid":"".concat(d,"_secondaryAssetEditorAutocomplete"),defaultValue:A,disableClearable:!1,isNullable:f,label:"Active ".concat(r(N)),onChange:G,parentAssetId:j,parentAssetType:C}):u(n,{"data-testid":"".concat(d,"_secondaryAutoComplete"),onChange:G,defaultValue:A,currentValue:x,isNullable:f,label:"Active ".concat(r(N)),assetType:N,parentAssetId:j,parentAssetType:C,appKey:m})})]})};m.defaultProps={label:"Choose An Asset",isNullable:!1,defaultValue:void 0,appKey:null},m.propTypes={settings:s.shape({}).isRequired,appType:s.shape({}).isRequired,defaultValue:s.any,onSettingsChange:s.func.isRequired,label:s.string,isNullable:s.bool,appKey:s.string};export{m as default};
1
+ import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/slicedToArray";import{useState as a}from"react";import s from"prop-types";import{get as l,capitalize as r}from"lodash";import{Button as o}from"@material-ui/core";import i from"./AssetEditors.css.js";import n from"./SingleAssetEditor.js";import p from"./AssetEditorAutocomplete.js";import{jsxs as c,jsx as u}from"react/jsx-runtime";var d="DC_AppSettingsAssetEditor",m=function(s){var m=s.appKey,y=s.appType,A=s.defaultValue,f=s.isNullable,b=s.label,h=s.onSettingsChange,g=s.settings,C=l(y,["primaryAsset","assetType","type"]),T=l(y,["primaryAsset","assetType","id"]),v=l(y,["primaryAsset","autocompleteSelect"]),N=l(y,["secondaryAsset","assetType","type"]),V=l(y,["secondaryAsset","assetType","id"]),K=l(y,["secondaryAsset","autocompleteSelect"]),_=l(g,T),E=a(_||A),S=t(E,2),j=S[0],q=S[1],R=a(l(g,V)),k=t(R,2),x=k[0],B=k[1],D=a(!(!N||x)),I=t(D,2),P=I[0],U=I[1],W=a(!(!N||!x)),w=t(W,2),z=w[0],F=w[1],G=function(t){B(t),h(e({},V,t))},H=function(t){q(t),B(null),F(!1),U(!!N);var a=e({},T,t);V&&(a[V]=null),h(a)};return c("div",{className:i.main,children:[u("div",{className:i.title,children:"Active Asset"}),c("div",{className:i.editor,children:[v?u(p,{appKey:m,assetType:C,currentValue:j,"data-testid":"".concat(d,"_primaryAssetEditorAutocomplete"),defaultValue:A,disableClearable:!f,isNullable:f,label:b,onChange:H}):u(n,{appKey:m,assetType:C,currentValue:j,"data-testid":"".concat(d,"_primaryAutoComplete"),defaultValue:A,isNullable:f,label:b,onChange:H}),P&&u(o,{"data-testid":"".concat(d,"_changeWellButton"),color:"primary",onClick:function(){F(!0),U(!1)},disabled:!_,children:"Change ".concat(r(N))}),!P&&z&&u(o,{"data-testid":"".concat(d,"_useDefaultButton"),color:"secondary",onClick:function(){B(null),F(!1),U(!!N),h(e({},V,null))},children:"Use active asset"})]}),z&&u("div",{className:i.editor,children:K?u(p,{appKey:m,assetType:N,currentValue:x,"data-testid":"".concat(d,"_secondaryAssetEditorAutocomplete"),defaultValue:A,disableClearable:!1,isNullable:f,label:"Active ".concat(r(N)),onChange:G,parentAssetId:j,parentAssetType:C}):u(n,{"data-testid":"".concat(d,"_secondaryAutoComplete"),onChange:G,defaultValue:A,currentValue:x,isNullable:f,label:"Active ".concat(r(N)),assetType:N,parentAssetId:j,parentAssetType:C,appKey:m})})]})};m.defaultProps={label:"Choose An Asset",isNullable:!1,defaultValue:void 0,appKey:null},m.propTypes={settings:s.shape({}).isRequired,appType:s.shape({}).isRequired,defaultValue:s.any,onSettingsChange:s.func.isRequired,label:s.string,isNullable:s.bool,appKey:s.string};export{m as default};
@@ -1 +1 @@
1
- import{__assign as e}from'./../../ext-esm/tslib/tslib.es6.js';import{jsx as r,jsxs as t}from"react/jsx-runtime";import{memo as i,useState as n,useRef as s,useEffect as o}from"react";import{Tooltip as a}from"@material-ui/core";import c from"classnames";import"../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import{UniversalLink as l}from"../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/objectWithoutProperties";import"react-router";import m from"./AssetNameLabel.styles.css.js";var u=i((function(i){var u=i.assetName,d=i.classes,p=i.coordinatesPixelWidth,h=i.dataTestId,f=i.href,v=i.icon,b=i.statusBadge,C=n(u),x=C[0],N=C[1],j=s(),D=s(),W=s();return o((function(){j.current&&(D.current||(D.current=j.current.scrollWidth),N(p>W.current?u:function(e,r,t){if(r===t)return e;var i=t/e.length,n=Math.floor(r/i),s=Math.floor(n/2),o=Math.max(s-2,2);return e.slice(0,o)+"..."+e.slice(e.length-o)}(u,j.current.clientWidth,D.current)),W.current=p)}),[p,W.current]),r(a,e({title:u},{children:r("div",e({className:c(m.wrapper)},{children:t(l,e({className:c(m.item,null==d?void 0:d.item),"data-testid":h,href:f},{children:[v&&r("div",e({className:m.startIcon},{children:v})),r("span",e({className:m.assetName,ref:j},{children:x})),b]}))}))}))}));export{u as AssetNameLabel};
1
+ import{__assign as e}from'./../../ext-esm/tslib/tslib.es6.js';import{jsx as r,jsxs as t}from"react/jsx-runtime";import{memo as i,useState as n,useRef as s,useEffect as o}from"react";import{Tooltip as a}from"@material-ui/core";import c from"classnames";import"../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import{UniversalLink as l}from"../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/objectWithoutProperties";import"react-router";import m from"./AssetNameLabel.styles.css.js";var u=i((function(i){var u=i.assetName,d=i.classes,p=i.coordinatesPixelWidth,h=i.dataTestId,f=i.href,v=i.icon,b=i.statusBadge,C=n(u),x=C[0],N=C[1],j=s(),D=s(),W=s();return o((function(){j.current&&(D.current||(D.current=j.current.scrollWidth),N(p>W.current?u:function(e,r,t){if(r===t)return e;var i=t/e.length,n=Math.floor(r/i),s=Math.floor(n/2),o=Math.max(s-2,2);return e.slice(0,o)+"..."+e.slice(e.length-o)}(u,j.current.clientWidth,D.current)),W.current=p)}),[u,p,W.current]),r(a,e({title:u},{children:r("div",e({className:c(m.wrapper)},{children:t(l,e({className:c(m.item,null==d?void 0:d.item),"data-testid":h,href:f},{children:[v&&r("div",e({className:m.startIcon},{children:v})),r("span",e({className:m.assetName,ref:j},{children:x})),b]}))}))}))}));export{u as AssetNameLabel};
@@ -1 +1 @@
1
- {"version":3,"file":"DQAccordionDetailsContent.d.ts","sourceRoot":"","sources":["../../../../src/components/StatusBadge/components/DQAccordionDetailsContent.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAgD,SAAS,EAAE,MAAM,oCAAoC,CAAC;AAG7G,aAAK,8BAA8B,GAAG;IACpC,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,MAAM,EAAE,SAAS,EAAE,CAAC;CACrB,CAAC;AAUF,eAAO,MAAM,yBAAyB,yBAA0B,8BAA8B,KAAG,WA6ChG,CAAC"}
1
+ {"version":3,"file":"DQAccordionDetailsContent.d.ts","sourceRoot":"","sources":["../../../../src/components/StatusBadge/components/DQAccordionDetailsContent.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAmC,SAAS,EAAE,MAAM,oCAAoC,CAAC;AAGhG,aAAK,8BAA8B,GAAG;IACpC,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,MAAM,EAAE,SAAS,EAAE,CAAC;CACrB,CAAC;AASF,eAAO,MAAM,yBAAyB,yBAA0B,8BAA8B,KAAG,WAyChG,CAAC"}
@@ -1 +1 @@
1
- import{__assign as s}from'./../../../ext-esm/tslib/tslib.es6.js';import{jsx as e,jsxs as a,Fragment as r}from"react/jsx-runtime";import i from"classnames";import{useDQUnvalidatedContentStyles as l}from"../styles.js";import{ALERT_ICONS as t,ALERT_STATES as n}from"../constants.js";import{DQAlertTooltip as m}from"./DQAlertTooltip.js";var o=function(o){var c=o.assets,d=o.anchorEl,u=l({});return e("div",s({className:u.assetTable},{children:c.map((function(l){var o=l.id,c=l.name,v=l.issuesNum,N=l.missingNum,h=l.isResolved,p=l.alert,f=function(s){return{alert:p,alertsNum:s===n.issue?v:N,alertState:s===n.issue?n.issue:n.missing,isMissingData:N>0,isIssueData:v>0}},j=f(n.issue),C=f(n.missing),g=t.Resolved;return a("div",s({className:u.assetWrapper},{children:[e("div",s({className:i(u.assetName,u.assetCell)},{children:c})),h?e("div",s({className:u.assetCell},{children:e("div",s({className:u.errorContainer},{children:e(g,{className:i(u.Resolved,u.alertIcon)})}))})):a(r,{children:[v>0&&e("div",s({className:u.assetCell},{children:e(m,s({anchorEl:d},j))})),N>0&&e("div",s({className:u.assetCell},{children:e(m,s({anchorEl:d},C))}))]})]}),o)}))}))};export{o as DQAccordionDetailsContent};
1
+ import{__assign as s}from'./../../../ext-esm/tslib/tslib.es6.js';import{jsx as e,jsxs as a,Fragment as r}from"react/jsx-runtime";import i from"classnames";import{useDQUnvalidatedContentStyles as l}from"../styles.js";import{ALERT_STATES as t}from"../constants.js";import{DQAlertTooltip as m}from"./DQAlertTooltip.js";var n=function(n){var o=n.assets,c=n.anchorEl,d=l({});return e("div",s({className:d.assetTable},{children:o.map((function(l){var n=l.id,o=l.name,u=l.issuesNum,h=l.missingNum,p=l.isResolved,v=l.alert,N=function(s){return{alert:v,alertsNum:s===t.issue?u:h,alertState:s===t.issue?t.issue:t.missing,isIssueData:u>0}},f=N(t.issue),j=N(t.missing);return a("div",s({className:d.assetWrapper},{children:[e("div",s({className:i(d.assetName,d.assetCell)},{children:o})),p?e("div",s({className:d.assetCell},{children:e(m,s({anchorEl:c},f))})):a(r,{children:[u>0&&e("div",s({className:d.assetCell},{children:e(m,s({anchorEl:c},f))})),h>0&&e("div",s({className:d.assetCell},{children:e(m,s({anchorEl:c},j))}))]})]}),n)}))}))};export{n as DQAccordionDetailsContent};
@@ -3,11 +3,10 @@ import { Alert, AlertState } from '~/components/StatusBadge/constants';
3
3
  declare type DQAlertTooltipProps = {
4
4
  alertsNum: number;
5
5
  alertState: AlertState;
6
- isMissingData: boolean;
7
6
  isIssueData: boolean;
8
7
  anchorEl: HTMLAnchorElement;
9
8
  alert: Alert;
10
9
  };
11
- export declare const DQAlertTooltip: ({ alert, alertsNum, alertState, isMissingData, isIssueData, anchorEl }: DQAlertTooltipProps) => JSX.Element;
10
+ export declare const DQAlertTooltip: ({ alert, alertsNum, alertState, isIssueData, anchorEl }: DQAlertTooltipProps) => JSX.Element;
12
11
  export {};
13
12
  //# sourceMappingURL=DQAlertTooltip.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DQAlertTooltip.d.ts","sourceRoot":"","sources":["../../../../src/components/StatusBadge/components/DQAlertTooltip.tsx"],"names":[],"mappings":";AACA,OAAO,EAAC,KAAK,EAAE,UAAU,EAA6B,MAAM,oCAAoC,CAAC;AAIjG,aAAK,mBAAmB,GAAG;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,UAAU,CAAC;IACvB,aAAa,EAAE,OAAO,CAAC;IACvB,WAAW,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,KAAK,EAAE,KAAK,CAAC;CACd,CAAC;AAEF,eAAO,MAAM,cAAc,2EAA4E,mBAAmB,KAAG,WAuB5H,CAAC"}
1
+ {"version":3,"file":"DQAlertTooltip.d.ts","sourceRoot":"","sources":["../../../../src/components/StatusBadge/components/DQAlertTooltip.tsx"],"names":[],"mappings":";AACA,OAAO,EAAC,KAAK,EAAE,UAAU,EAA6B,MAAM,oCAAoC,CAAC;AAKjG,aAAK,mBAAmB,GAAG;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,UAAU,CAAC;IACvB,WAAW,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,KAAK,EAAE,KAAK,CAAC;CACd,CAAC;AAEF,eAAO,MAAM,cAAc,4DAA6D,mBAAmB,KAAG,WAiC7G,CAAC"}
@@ -1 +1 @@
1
- import{__assign as s}from'./../../../ext-esm/tslib/tslib.es6.js';import{jsx as r,jsxs as e}from"react/jsx-runtime";import i from"classnames";import{ALERT_STATES as a,ALERT_ICONS as t}from"../constants.js";import{DQAlertsTooltip as o}from"./DQAlertsTooltip.js";import{useDQUnvalidatedContentStyles as n}from"../styles.js";var l=function(l){var m,c=l.alert,p=l.alertsNum,d=l.alertState,f=l.isMissingData,h=l.isIssueData,u=l.anchorEl,N=n({}),g=t[d];return r(o,s({alert:f?s(s({},c),{state:a.missing}):c,anchorEl:u,alertIcon:r(g,{className:i(N[f?a.missing:d],N.alertIcon)}),isTooltipVisible:p>0},{children:e("div",s({className:i(N.errorContainer,(m={},m[N.missingContainer]=h&&d===a.missing,m))},{children:[r(g,{className:i(N[d],N.alertIcon)}),e("div",{children:[e("span",s({className:i(N[d],N.errorText)},{children:[d,": "]})),r("span",s({className:N.errorNum},{children:p}))]})]}))}))};export{l as DQAlertTooltip};
1
+ import{__assign as r}from'./../../../ext-esm/tslib/tslib.es6.js';import{jsx as s,jsxs as e,Fragment as t}from"react/jsx-runtime";import a from"classnames";import{ALERT_STATES as o,ALERT_ICONS as l}from"../constants.js";import{DQAlertsTooltip as i}from"./DQAlertsTooltip.js";import{useDQUnvalidatedContentStyles as n}from"../styles.js";import{isResolved as m}from"../utils.js";var c=function(c){var d,p,u=c.alert,f=c.alertsNum,h=c.alertState,N=c.isIssueData,j=c.anchorEl,v=n({}),I=m(u.status),x=I?l.Resolved:l[h];return s(i,r({alert:u,anchorEl:j,alertIcon:s(x,{className:a(v[h],v.alertIcon)})},{children:e("div",r({className:a(v.errorContainer,(d={},d[v.missingContainer]=N&&h===o.missing,d))},{children:[s(x,{className:a((p={},p[v[h]]=!I,p[v.Resolved]=I,p),v.alertIcon)}),s("div",{children:!I&&e(t,{children:[e("span",r({className:a(v[h],v.errorText)},{children:[h,": "]})),s("span",r({className:v.errorNum},{children:f}))]})})]}))}))};export{c as DQAlertTooltip};
@@ -1,12 +1,11 @@
1
1
  import { ReactElement } from 'react';
2
- import { Alert } from '../constants';
2
+ import { Alert } from '~/components/StatusBadge/constants';
3
3
  declare type DQCountryCheckTooltipProps = {
4
4
  alert: Alert;
5
5
  anchorEl: HTMLAnchorElement;
6
6
  alertIcon: ReactElement;
7
7
  children: ReactElement<any, any>;
8
- isTooltipVisible: boolean;
9
8
  };
10
- export declare const DQAlertsTooltip: ({ alert, anchorEl, alertIcon, children, isTooltipVisible }: DQCountryCheckTooltipProps) => JSX.Element;
9
+ export declare const DQAlertsTooltip: ({ alert, anchorEl, alertIcon, children }: DQCountryCheckTooltipProps) => JSX.Element;
11
10
  export {};
12
11
  //# sourceMappingURL=DQAlertsTooltip.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DQAlertsTooltip.d.ts","sourceRoot":"","sources":["../../../../src/components/StatusBadge/components/DQAlertsTooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAMrC,OAAO,EAAE,KAAK,EAAqC,MAAM,cAAc,CAAC;AA6HxE,aAAK,0BAA0B,GAAG;IAChC,KAAK,EAAE,KAAK,CAAC;IACb,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,SAAS,EAAE,YAAY,CAAC;IACxB,QAAQ,EAAE,YAAY,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IACjC,gBAAgB,EAAE,OAAO,CAAC;CAC3B,CAAC;AAEF,eAAO,MAAM,eAAe,+DAAgE,0BAA0B,KAAG,WA6CxH,CAAC"}
1
+ {"version":3,"file":"DQAlertsTooltip.d.ts","sourceRoot":"","sources":["../../../../src/components/StatusBadge/components/DQAlertsTooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAMrC,OAAO,EAAE,KAAK,EAAqC,MAAM,oCAAoC,CAAC;AA8H9F,aAAK,0BAA0B,GAAG;IAChC,KAAK,EAAE,KAAK,CAAC;IACb,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,SAAS,EAAE,YAAY,CAAC;IACxB,QAAQ,EAAE,YAAY,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;CAClC,CAAC;AAEF,eAAO,MAAM,eAAe,6CAA8C,0BAA0B,KAAG,WAqDtG,CAAC"}
@@ -1 +1 @@
1
- import{__assign as e}from'./../../../ext-esm/tslib/tslib.es6.js';import{jsx as t,jsxs as r,Fragment as a}from"react/jsx-runtime";import i from"moment";import{template as o}from"lodash";import{makeStyles as n}from"@material-ui/core";import{Tooltip as l}from"../../Tooltip/Tooltip.js";import"../../Tooltip/ScrollableTooltip.js";import{ALERT_STATES as s,BADGE_ICON_STATUSES as p}from"../constants.js";var c=n((function(e){return{errorIcon:{width:20,height:18},title:{maxWidth:198,padding:"0 0 8px",fontSize:16,lineHeight:"22px",color:e.palette.primary.text1},alertTime:{fontSize:14,color:e.palette.primary.text6,"& span":{color:e.palette.primary.text1}},alertMessage:{width:"100%",height:40,margin:0,overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box","-webkit-line-clamp":2,"-webkit-box-orient":"vertical",whiteSpace:"pre-wrap",fontSize:14,lineHeight:"20px",color:e.palette.primary.text1},alertMessageFull:{marginBottom:8,fontSize:14,lineHeight:"20px",color:e.palette.primary.text1,whiteSpace:"pre-wrap"},alertInfo:{display:"flex",alignItems:"center",flexWrap:"wrap",marginBottom:8,fontSize:14,textTransform:"capitalize","& span":{color:e.palette.primary.text6,marginRight:8},"& .error":{color:e.palette.error.main},"& .warning":{color:"#ffa500"}},resolvedInfo:{display:"flex",alignItems:"center",marginBottom:8,color:e.palette.primary.text6,fontSize:14},infoIcon:{color:e.palette.info.main,marginRight:8,fontSize:16},popover:{marginLeft:8,width:270,minHeight:122,padding:12,display:"flex",flexDirection:"column",justifyContent:"space-between",backgroundColor:e.palette.background.b9,border:"1px solid ".concat(e.palette.primary.text9),boxShadow:"0px 3px 10px rgba(0, 0, 0, 0.4)",borderRadius:4,"& .MuiTooltip-tooltip":{backgroundColor:e.palette.background.b9,fontWeight:400,lineHeight:"20px",margin:0,padding:0}},message:{whiteSpace:"pre-wrap"},note:{marginBottom:4}}})),m=function(e){return i.unix(e).format("DD MMM HH:mm (Z)")},d=function(r){var a=r.children,i=c(),n=o(a)({timestampFormatter:m}).split("**").map((function(e,r){return r%2==1?t("b",{children:e}):e}));return t("span",e({className:i.message},{children:n}))},h=function(o){var n,m,h,f=o.alert,g=o.anchorEl,x=o.alertIcon,u=o.children,b=o.isTooltipVisible,w=c(),v=Math.max(f.statusUpdatedAt,f.lastCheckedAt),y=(void 0===h&&(h="MM/DD/YYYY HH:mm a"),(m=v)?i.unix(m).format(h):null);return t(l,{interactive:!0,children:u,PopperProps:{anchorEl:g,className:w.popover},placement:"right",title:b?r(a,{children:[t("div",e({className:w.title},{children:f.name})),r("span",e({className:w.alertInfo},{children:[t("span",{children:"Category:"})," ",f.category]})),r("span",e({className:w.alertInfo},{children:[t("span",{children:"Status:"})," ",f.status]})),r("span",e({className:w.alertInfo},{children:[t("span",{children:"Error Type:"}),t("div",e({className:w.errorIcon},{children:x})),t("span",e({className:f.state===s.issue?p.warning:p.error},{children:f.state}))]})),r("span",e({className:w.alertInfo},{children:[t("span",{children:"Score Deduction:"}),t("span",e({className:p.warning},{children:"6%"}))]})),r("div",e({className:w.alertMessageFull},{children:[f.isThrottled&&t("b",{children:"[Throttled]: "}),t(d,{children:f.message})]})),r("span",e({className:w.alertInfo},{children:[t("span",e({className:w.note},{children:"Note:"}))," ",(null===(n=f.note)||void 0===n?void 0:n.length)?f.note:"—"]})),r("span",e({className:w.alertTime},{children:["Updated at: ",t("span",{children:y})]}))]}):""})};export{h as DQAlertsTooltip};
1
+ import{__assign as e}from'./../../../ext-esm/tslib/tslib.es6.js';import{jsx as t,jsxs as r,Fragment as a}from"react/jsx-runtime";import o from"moment";import{template as i}from"lodash";import{makeStyles as n}from"@material-ui/core";import{Tooltip as l}from"../../Tooltip/Tooltip.js";import"../../Tooltip/ScrollableTooltip.js";import{getDeductsFromScoreClass as s,isResolved as p,getDeductsFromScoreValue as c}from"../utils.js";import{ALERT_STATES as m,BADGE_ICON_STATUSES as d}from"../constants.js";var h=n((function(e){return{errorIcon:{width:20,height:18},title:{maxWidth:198,padding:"0 0 8px",fontSize:16,lineHeight:"22px",color:e.palette.primary.text1},alertTime:{fontSize:14,color:e.palette.primary.text6,"& span":{color:e.palette.primary.text1}},alertMessage:{width:"100%",height:40,margin:0,overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box","-webkit-line-clamp":2,"-webkit-box-orient":"vertical",whiteSpace:"pre-wrap",fontSize:14,lineHeight:"20px",color:e.palette.primary.text1},alertMessageFull:{marginBottom:8,fontSize:14,lineHeight:"20px",color:e.palette.primary.text1,whiteSpace:"pre-wrap"},alertInfo:{display:"flex",alignItems:"center",flexWrap:"wrap",marginBottom:8,fontSize:14,textTransform:"capitalize","& span":{color:e.palette.primary.text6,marginRight:8},"& .error":{color:e.palette.error.main},"& .warning":{color:"#ffa500"}},resolvedInfo:{display:"flex",alignItems:"center",marginBottom:8,color:e.palette.primary.text6,fontSize:14},infoIcon:{color:e.palette.info.main,marginRight:8,fontSize:16},popover:{marginLeft:8,width:270,minHeight:122,padding:12,display:"flex",flexDirection:"column",justifyContent:"space-between",backgroundColor:e.palette.background.b9,border:"1px solid ".concat(e.palette.primary.text9),boxShadow:"0px 3px 10px rgba(0, 0, 0, 0.4)",borderRadius:4,"& .MuiTooltip-tooltip":{backgroundColor:e.palette.background.b9,fontWeight:400,lineHeight:"20px",margin:0,padding:0}},message:{whiteSpace:"pre-wrap"},note:{marginBottom:4},ok:{color:"#F99500"}}})),f=function(e){return o.unix(e).format("DD MMM HH:mm (Z)")},g=function(r){var a=r.children,o=h(),n=i(a)({timestampFormatter:f}).split("**").map((function(e,r){return r%2==1?t("b",{children:e}):e}));return t("span",e({className:o.message},{children:n}))},u=function(i){var n,f,u,x=i.alert,b=i.anchorEl,w=i.alertIcon,v=i.children,y=h(),S=Math.max(x.statusUpdatedAt,x.lastCheckedAt),N=(void 0===u&&(u="MM/DD/YYYY HH:mm a"),(f=S)?o.unix(f).format(u):null);return t(l,{interactive:!0,children:v,PopperProps:{anchorEl:b,className:y.popover},placement:"right",title:r(a,{children:[t("div",e({className:y.title},{children:x.name})),r("span",e({className:y.alertInfo},{children:[t("span",{children:"Category:"})," ",x.category]})),r("span",e({className:y.alertInfo},{children:[t("span",{children:"Status:"})," ",x.status]})),r("span",e({className:y.alertInfo},{children:[t("span",{children:"Error Type:"}),t("div",e({className:y.errorIcon},{children:w})),t("span",e({className:x.state===m.issue?d.warning:d.error},{children:x.state}))]})),r("span",e({className:y.alertInfo},{children:[t("span",{children:"Score Deduction:"}),t("span",e({className:s(y,x.deductsFromScore,p(x.status))},{children:c(x.deductsFromScore,p(x.status))}))]})),r("div",e({className:y.alertMessageFull},{children:[x.isThrottled&&t("b",{children:"[Throttled]: "}),t(g,{children:x.message})]})),r("span",e({className:y.alertInfo},{children:[t("span",e({className:y.note},{children:"Note:"}))," ",(null===(n=x.note)||void 0===n?void 0:n.length)?x.note:"—"]})),r("span",e({className:y.alertTime},{children:["Updated at: ",t("span",{children:N})]}))]})})};export{u as DQAlertsTooltip};
@@ -3,7 +3,8 @@ import { AssetData } from '~/components/StatusBadge/constants';
3
3
  declare type DQUnvalidatedContentProps = {
4
4
  assetsData?: AssetData;
5
5
  maxHeight?: number;
6
+ onClick: () => void;
6
7
  };
7
- export declare const DQUnvalidatedContent: ({ assetsData, maxHeight }: DQUnvalidatedContentProps) => JSX.Element;
8
+ export declare const DQUnvalidatedContent: ({ assetsData, maxHeight, onClick }: DQUnvalidatedContentProps) => JSX.Element;
8
9
  export {};
9
10
  //# sourceMappingURL=DQUnvalidatedContent.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DQUnvalidatedContent.d.ts","sourceRoot":"","sources":["../../../../src/components/StatusBadge/components/DQUnvalidatedContent.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAC;AAK/D,aAAK,yBAAyB,GAAG;IAC/B,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAA;AAED,eAAO,MAAM,oBAAoB,8BAA+B,yBAAyB,KAAG,WAwC3F,CAAC"}
1
+ {"version":3,"file":"DQUnvalidatedContent.d.ts","sourceRoot":"","sources":["../../../../src/components/StatusBadge/components/DQUnvalidatedContent.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAC;AAK/D,aAAK,yBAAyB,GAAG;IAC/B,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAA;AAED,eAAO,MAAM,oBAAoB,uCAAwC,yBAAyB,KAAG,WAqDpG,CAAC"}
@@ -1 +1 @@
1
- import{__assign as a}from'./../../../ext-esm/tslib/tslib.es6.js';import{jsxs as r,jsx as e}from"react/jsx-runtime";import{useRef as t}from"react";import i from"classnames";import{Typography as s,Accordion as o,AccordionSummary as c,AccordionDetails as n}from"@material-ui/core";import m from"@material-ui/icons/ExpandMore";import{truncateString as l}from"../../Search/utils/truncate.js";import{useDQUnvalidatedContentStyles as d}from"../styles.js";import{DQAccordionDetailsContent as u}from"./DQAccordionDetailsContent.js";var h=function(h){var p=h.assetsData,f=h.maxHeight,v=t(null),x=d({maxHeight:f});return r("div",a({className:x.container,ref:v},{children:[r("div",{children:[e(s,a({className:x.headerText,"data-testid":"Status_badge__DQ_unvalidated_content"},{children:"Data Quality"})),e(s,a({className:x.subheaderText},{children:"Fusion real-time data quality rules for app data"}))]}),e("div",a({className:x.relative},{children:e("div",a({className:x.accordionsWrapper},{children:Object.keys(p).map((function(t){var s=p[t];return r(o,a({className:x.accordion,defaultExpanded:!0},{children:[e(c,a({className:i("large","stretched"),expandIcon:e(m,{})},{children:l(t,{maxChars:40,charsNumFromStart:18,charsNumFromEnd:17})})),e(n,{children:e(u,{anchorEl:null==v?void 0:v.current,assets:s})})]}),t)}))}))}))]}))};export{h as DQUnvalidatedContent};
1
+ import{__assign as r}from'./../../../ext-esm/tslib/tslib.es6.js';import{jsxs as e,jsx as a}from"react/jsx-runtime";import{useRef as t}from"react";import i from"classnames";import{Link as s}from"react-router";import{Typography as o,Accordion as n,AccordionSummary as l,AccordionDetails as c}from"@material-ui/core";import m from"@material-ui/icons/Link";import d from"../../Button/index.js";import{truncateString as u}from"../../Search/utils/truncate.js";import{useDQUnvalidatedContentStyles as p}from"../styles.js";import{DQAccordionDetailsContent as h}from"./DQAccordionDetailsContent.js";var f=function(f){var v=f.assetsData,N=f.maxHeight,x=f.onClick,D=t(null),j=p({maxHeight:N});return e("div",r({className:j.container,ref:D},{children:[e("div",{children:[a(o,r({className:j.headerText,"data-testid":"Status_badge__DQ_unvalidated_content"},{children:"Data Quality"})),a(o,r({className:j.subheaderText},{children:"Fusion real-time data quality rules for app data"}))]}),a("div",r({className:j.relative},{children:a("div",r({className:j.accordionsWrapper},{children:Object.keys(v).map((function(t){var o,d=v[t];return e(n,r({className:j.accordion,defaultExpanded:!0},{children:[a(l,r({className:i("large","stretched")},{children:e("div",r({className:j.headerWrapper},{children:[a("span",{children:u(t,{maxChars:35,charsNumFromStart:13,charsNumFromEnd:12})}),a(s,r({className:j.link,to:null===(o=d[0])||void 0===o?void 0:o.linkToDQPage},{children:a(m,{className:j.linkIcon})}))]}))})),a(c,{children:a(h,{anchorEl:null==D?void 0:D.current,assets:d})})]}),t)}))}))})),a("div",r({className:j.reportDQIssueButtonWrapper},{children:a(d,r({className:j.reportDQIssueButton,onClick:x,variation:"secondary"},{children:"report dq issue"}))}))]}))};export{f as DQUnvalidatedContent};
@@ -1,5 +1,8 @@
1
1
  export declare const MAX_MOBILE_WIDTH = 959;
2
2
  export declare type BadgeIconStatus = 'warning' | 'error' | 'success';
3
+ export declare const ALERT_STATUSES: {
4
+ RESOLVED: string;
5
+ };
3
6
  export declare const ALERT_ICONS: {
4
7
  Missing: import("@material-ui/core/OverridableComponent").OverridableComponent<import("@material-ui/core").SvgIconTypeMap<{}, "svg">>;
5
8
  Issue: import("@material-ui/core/OverridableComponent").OverridableComponent<import("@material-ui/core").SvgIconTypeMap<{}, "svg">>;
@@ -13,6 +16,8 @@ export declare const ALERT_STATES: {
13
16
  missing: Missing;
14
17
  };
15
18
  export declare type Alert = {
19
+ assetId: number;
20
+ deductsFromScore?: number;
16
21
  name: string;
17
22
  category: string;
18
23
  state: AlertState;
@@ -29,6 +34,7 @@ export declare type AssetItem = {
29
34
  issuesNum: number;
30
35
  missingNum: number;
31
36
  isResolved?: boolean;
37
+ linkToDQPage: string;
32
38
  alert: Alert;
33
39
  };
34
40
  export declare type AssetData = Record<string, AssetItem[]>;
@@ -1 +1 @@
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,aAAK,KAAK,GAAG,OAAO,CAAC;AACrB,aAAK,OAAO,GAAG,SAAS,CAAC;AAEzB,oBAAY,UAAU,GAAG,KAAK,GAAG,OAAO,CAAC;AAEzC,eAAO,MAAM,YAAY,EAAE;IAAE,KAAK,EAAE,KAAK,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAG1D,CAAC;AAEF,oBAAY,KAAK,GAAG;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,UAAU,CAAC;IAClB,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,oBAAY,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC;AAEpD,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,cAAc;;CAE1B,CAAC;AAEF,eAAO,MAAM,WAAW;;;;CAIvB,CAAC;AAEF,aAAK,KAAK,GAAG,OAAO,CAAC;AACrB,aAAK,OAAO,GAAG,SAAS,CAAC;AAEzB,oBAAY,UAAU,GAAG,KAAK,GAAG,OAAO,CAAC;AAEzC,eAAO,MAAM,YAAY,EAAE;IAAE,KAAK,EAAE,KAAK,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAG1D,CAAC;AAEF,oBAAY,KAAK,GAAG;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,UAAU,CAAC;IAClB,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,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,KAAK,CAAC;CACd,CAAC;AAEF,oBAAY,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC;AAEpD,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 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
+ import r from"@material-ui/icons/Warning";import s from"@material-ui/icons/Done";import i 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={RESOLVED:"resolved"},c={Missing:e,Issue:i,Resolved:o},t={missing:"Missing",issue:"Issue"},u={success:"success",warning:"warning",error:"error"},g=((n={})[u.success]=s,n[u.warning]=r,n[u.error]=e,n),l="Recommendations may be incorrect based on data quality errors";export{c as ALERT_ICONS,t as ALERT_STATES,m as ALERT_STATUSES,g as BADGE_ICONS,u as BADGE_ICON_STATUSES,a as MAX_MOBILE_WIDTH,l 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;AA+ErB,aAAK,gBAAgB,GAAG;IACtB,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC/B,aAAa,EAAE,MAAM,CAAC;IACtB,kBAAkB,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;IACnD,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACnC,CAAC;AAEF,eAAO,MAAM,WAAW,4HASrB,gBAAgB,KAAG,WA2ErB,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;AA8ErB,aAAK,gBAAgB,GAAG;IACtB,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC/B,aAAa,EAAE,MAAM,CAAC;IACtB,kBAAkB,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;IACnD,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACnC,CAAC;AAEF,eAAO,MAAM,WAAW,4HASrB,gBAAgB,KAAG,WA2ErB,CAAC"}
@@ -1 +1 @@
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":{position:"absolute",bottom:0,width:"max-content",transformOrigin:"center top",maxWidth:"none",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.DQIssueTooltipMaxHeight,T=s.iconType,w=s.className,D=s.lastTimestamp,_=s.onReportErrorClick,C=s.warningData,j=a(!1),W=j[0],N=j[1],Q=null==C?void 0:C.message,k=T==m.error,E=T==m.success,M=S<d,B=h({isIconExist:!!T,isSuccessTypeIcon:E,isErrorTypeIcon:k});k&&(b=e(u,{assetsData:y,maxHeight:I})),E&&(b=e(f,{onClick:function(){return N(!0)}}));return o("div",t({"data-testid":"Status_badge",className:i(B.statusBadgeWrapper,w)},{children:[o("div",t({className:B.statusBadgeContent},{children:[T&&e(p,t({leaveDelay:200,interactive:k||E,PopperProps:{className:B.popper},placement:"top-start",title:b},{children:e("div",t({className:B.DQIconWrapper,"data-testid":"".concat("Status_badge","__DQ_icon_").concat(T)},{children:e(g,{color:T,iconType:T})}))})),o(c,t({className:i(B.text,B.timestamp),variant:"body1"},{children:["Last Update: ",r.unix(D).format("M/D/YYYY h:mm a")]})),C&&o(n,{children:[e(p,t({placement:"top",title:Q?"".concat(l,". ").concat(Q):l},{children:e("div",t({"data-testid":"".concat("Status_badge","__DQ_icon_warning")},{children:e(g,{className:B.badgeIconWarning,color:m.warning,iconType:m.warning})}))})),!M&&e(c,t({className:i(B.text,B.warningMessage),variant:"body1"},{children:Q?"".concat(l,". ").concat(Q):l}))]})]})),E&&e(x,{open:W,onSave:function(t){_(t),N(!1)},onClose:function(){return N(!1)}})]}))};export{b as StatusBadge};
1
+ import{__assign as t}from'./../../ext-esm/tslib/tslib.es6.js';import{jsxs as e,jsx as o,Fragment as a}from"react/jsx-runtime";import{useState as n}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{ReportIssueModal as f}from"./components/ReportIssueModal.js";var x=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":{position:"absolute",bottom:0,width:"max-content",transformOrigin:"center top",maxWidth:"none",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"}}}}})),h=function(s){var h=s.assetsData,b=void 0===h?{}:h,v=s.appWidth,y=s.DQIssueTooltipMaxHeight,S=s.iconType,I=s.className,T=s.lastTimestamp,w=s.onReportErrorClick,D=s.warningData,_=n(!1),C=_[0],j=_[1],W=null==D?void 0:D.message,N=S==m.error,k=S==m.success,Q=v<d,E=x({isIconExist:!!S,isSuccessTypeIcon:k,isErrorTypeIcon:N});return e("div",t({"data-testid":"Status_badge",className:i(E.statusBadgeWrapper,I)},{children:[e("div",t({className:E.statusBadgeContent},{children:[S&&o(p,t({leaveDelay:200,interactive:!0,PopperProps:{className:E.popper},placement:"top-start",title:o(u,{assetsData:b,maxHeight:y,onClick:function(){return j(!0)}})},{children:o("div",t({className:E.DQIconWrapper,"data-testid":"".concat("Status_badge","__DQ_icon_").concat(S)},{children:o(g,{color:S,iconType:S})}))})),e(c,t({className:i(E.text,E.timestamp),variant:"body1"},{children:["Last Update: ",r.unix(T).format("M/D/YYYY h:mm a")]})),D&&e(a,{children:[o(p,t({placement:"top",title:W?"".concat(l,". ").concat(W):l},{children:o("div",t({"data-testid":"".concat("Status_badge","__DQ_icon_warning")},{children:o(g,{className:E.badgeIconWarning,color:m.warning,iconType:m.warning})}))})),!Q&&o(c,t({className:i(E.text,E.warningMessage),variant:"body1"},{children:W?"".concat(l,". ").concat(W):l}))]})]})),k&&o(f,{open:C,onSave:function(t){w(t),j(!1)},onClose:function(){return j(!1)}})]}))};export{h as StatusBadge};
@@ -1 +1 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/components/StatusBadge/styles.ts"],"names":[],"mappings":"AAEA,aAAK,8BAA8B,GAAG;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,6BAA6B,+FAqFvC,CAAC"}
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/components/StatusBadge/styles.ts"],"names":[],"mappings":"AAEA,aAAK,8BAA8B,GAAG;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,6BAA6B,+FA2GvC,CAAC"}
@@ -1 +1 @@
1
- import{makeStyles as e}from"@material-ui/core";var t=e((function(e){return{alertIcon:{width:16,height:16},assetWrapper:{display:"table-row"},assetTable:{display:"table"},assetCell:{display:"table-cell",padding:"5px 0",verticalAlign:"middle",width:111},assetName:{fontSize:"12px",width:89},container:{padding:"12px 0 4px 12px"},headerText:{lineHeight:"19px",fontSize:"16px",fontWeight:500},subheaderText:{lineHeight:"14px",fontSize:"12px",fontWeight:400,marginRight:16,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,height:22},missingContainer:{marginLeft:0},errorText:{marginLeft:4,fontSize:"14px"},errorNum:{fontSize:"16px",marginLeft:4},accordion:{"&:not(:first-child)":{marginTop:"16px !important"},marginTop:"8px !important",color:e.palette.primary.contrastText,"& .MuiAccordionSummary-content":{fontWeight:"400 !important"}},accordionsWrapper:{maxHeight:function(e){var t=e.maxHeight;return t},overflowY:"auto",paddingRight:16,"&::before, &::after":{content:'""',width:"100%",height:16,position:"absolute",zIndex:1},"&::before":{background:"linear-gradient(180deg, ".concat(e.palette.background.b9," 18.23%, rgba(59, 59, 59, 0) 100%)"),opacity:.8,top:0},"&::after":{background:"linear-gradient(0deg, ".concat(e.palette.background.b9," 18.23%, rgba(59, 59, 59, 0) 100%)"),opacity:.8,bottom:0}},relative:{position:"relative",padding:"8px 0"}}}));export{t as useDQUnvalidatedContentStyles};
1
+ import{makeStyles as e}from"@material-ui/core";var t=e((function(e){return{alertIcon:{width:16,height:16},assetWrapper:{display:"table-row"},assetTable:{display:"table"},assetCell:{display:"table-cell",padding:"5px 0",verticalAlign:"middle",width:111},assetName:{fontSize:"12px",width:89},container:{padding:"12px 0 4px 12px"},headerText:{lineHeight:"19px",fontSize:"16px",fontWeight:500},subheaderText:{lineHeight:"14px",fontSize:"12px",fontWeight:400,marginRight:16,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,height:22},missingContainer:{marginLeft:0},errorText:{marginLeft:4,fontSize:"14px"},errorNum:{fontSize:"16px",marginLeft:4},accordion:{"&:not(:first-child)":{marginTop:"16px !important"},marginTop:"8px !important",color:e.palette.primary.contrastText,"& .MuiAccordionSummary-content":{fontWeight:"400 !important"}},accordionsWrapper:{maxHeight:function(e){var t=e.maxHeight;return t},overflowY:"auto",paddingRight:16,"&::before, &::after":{content:'""',width:"100%",height:16,position:"absolute",zIndex:1},"&::before":{background:"linear-gradient(180deg, ".concat(e.palette.background.b9," 18.23%, rgba(59, 59, 59, 0) 100%)"),opacity:.8,top:0},"&::after":{background:"linear-gradient(0deg, ".concat(e.palette.background.b9," 18.23%, rgba(59, 59, 59, 0) 100%)"),opacity:.8,bottom:0}},relative:{position:"relative",padding:"8px 0"},reportDQIssueButtonWrapper:{display:"flex",justifyContent:"end"},reportDQIssueButton:{marginRight:12,marginBottom:8},headerWrapper:{display:"flex",alignItems:"center"},linkIcon:{width:16,height:16,marginLeft:12,color:e.palette.primary.main},link:{lineHeight:0,zIndex:1}}}));export{t as useDQUnvalidatedContentStyles};
@@ -0,0 +1,7 @@
1
+ export declare const isResolved: (status: string) => boolean;
2
+ declare type GetDeductsFromScoreClass = (styles: Record<string, string>, score: number, isResolved: boolean) => string;
3
+ export declare const getDeductsFromScoreClass: GetDeductsFromScoreClass;
4
+ declare type GetDeductsFromScoreValue = (deductsFromScore: number, isResolved: boolean) => string;
5
+ export declare const getDeductsFromScoreValue: GetDeductsFromScoreValue;
6
+ export {};
7
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/StatusBadge/utils.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAwD,CAAC;AAEtG,aAAK,wBAAwB,GAAG,CAC9B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC9B,KAAK,EAAE,MAAM,EACb,UAAU,EAAE,OAAO,KAChB,MAAM,CAAC;AAEZ,eAAO,MAAM,wBAAwB,EAAE,wBActC,CAAC;AAEF,aAAK,wBAAwB,GAAG,CAAC,gBAAgB,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,KAAK,MAAM,CAAC;AAE1F,eAAO,MAAM,wBAAwB,EAAE,wBAEtC,CAAC"}
@@ -0,0 +1 @@
1
+ import{ALERT_STATUSES as r}from"./constants.js";var n=function(n){return n===r.RESOLVED},o=function(r,n,o){return o||!n?"":n>40?r.error:n>10?r.warn:n>5?r.ok:r.good},t=function(r,n){return!n&&r>=0?"".concat(r,"%"):"—"};export{o as getDeductsFromScoreClass,t as getDeductsFromScoreValue,n as isResolved};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corva/ui",
3
- "version": "0.57.0-2",
3
+ "version": "0.57.0-4",
4
4
  "description": "Shared components/utils for Corva ui projects",
5
5
  "keywords": [
6
6
  "corva-ui"
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require('./../../../ext-esm/tslib/tslib.es6.js'),i=require("react/jsx-runtime"),t=require("@material-ui/core"),s=require("../../Button/index.js"),n=t.makeStyles((function(e){return{container:{display:"flex",flexDirection:"column",padding:12},title:{fontWeight:500,fontSize:"16px",lineHeight:"19px",marginBottom:4},subtitle:{color:e.palette.primary.text7,fontSize:"12px",lineHeight:"14px",marginBottom:4},button:{alignSelf:"end",marginTop:8}}}));exports.DQSuccessContent=function(r){var a=r.onClick,o=n();return i.jsxs("div",e.__assign({className:o.container},{children:[i.jsx(t.Typography,e.__assign({className:o.title},{children:"No Data Quality Issues"})),i.jsx(t.Typography,e.__assign({className:o.subtitle},{children:"If you have found any issues, inform us."})),i.jsx(s,e.__assign({color:"primary",className:o.button,onClick:a,variation:"secondary"},{children:"report dq issue"}))]}))};
@@ -1,5 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const DQSuccessContent: ({ onClick }: {
3
- onClick: () => void;
4
- }) => JSX.Element;
5
- //# sourceMappingURL=DQSuccessContent.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DQSuccessContent.d.ts","sourceRoot":"","sources":["../../../../src/components/StatusBadge/components/DQSuccessContent.tsx"],"names":[],"mappings":";AA2BA,eAAO,MAAM,gBAAgB;aAA4B,MAAM,IAAI;MAAK,WAqBvE,CAAC"}
@@ -1 +0,0 @@
1
- import{__assign as t}from'./../../../ext-esm/tslib/tslib.es6.js';import{jsxs as i,jsx as e}from"react/jsx-runtime";import{makeStyles as o,Typography as n}from"@material-ui/core";import r from"../../Button/index.js";var a=o((function(t){return{container:{display:"flex",flexDirection:"column",padding:12},title:{fontWeight:500,fontSize:"16px",lineHeight:"19px",marginBottom:4},subtitle:{color:t.palette.primary.text7,fontSize:"12px",lineHeight:"14px",marginBottom:4},button:{alignSelf:"end",marginTop:8}}})),l=function(o){var l=o.onClick,s=a();return i("div",t({className:s.container},{children:[e(n,t({className:s.title},{children:"No Data Quality Issues"})),e(n,t({className:s.subtitle},{children:"If you have found any issues, inform us."})),e(r,t({color:"primary",className:s.button,onClick:l,variation:"secondary"},{children:"report dq issue"}))]}))};export{l as DQSuccessContent};