@corva/ui 0.68.0-15 → 0.68.0-16
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'),t=require("react/jsx-runtime"),
|
|
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("react"),a=require("moment"),s=require("lodash"),i=require("@material-ui/core"),n=require("@material-ui/icons/ArrowForward"),l=require("../../Tooltip/Tooltip.js");require("../../Tooltip/ScrollableTooltip.js");var o=require("../utils.js"),c=require("../constants.js"),p=require("../../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js"),d=require("../styles.js"),m=require("../../../constants/mixpanel.js");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var g=u(a),x=u(n),h=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,display:"flex",alignItems:"center"},emptyMessage:{padding:"0",fontSize:16,lineHeight:"22px",color:e.palette.primary.contrastText},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:77,width:270,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,zIndex:500,"& .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 !important"},good:{color:"".concat(e.palette.warning.light," !important")}}})),f=function(e,t){return void 0===t&&(t="MMM D YYYY, h:mm A"),e?g.default.unix(e).format(t):null},_=function(e){return g.default.unix(e).format("DD MMM HH:mm (Z)")},j=function(r){var a=r.children,i=h(),n=s.template(a)({timestampFormatter:_}).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}))},S=r.memo((function(r){var a,s=r.alert,i=r.alertIcon,n=r.children,u=r.linkToDQPage,g=h(),_=d.useDQUnvalidatedContentStyles({}),S=Math.max(s.statusUpdatedAt,s.lastCheckedAt),v=f(S);return t.jsx(l.Tooltip,{interactive:!0,children:n,PopperProps:{className:g.popover},placement:"right",title:t.jsxs(t.Fragment,{children:[s.emptyMessage&&t.jsx("div",e.__assign({className:g.emptyMessage},{children:s.statusUpdatedAt?f(s.statusUpdatedAt):s.emptyMessage})),!s.emptyMessage&&t.jsxs(t.Fragment,{children:[t.jsxs("div",e.__assign({className:g.title},{children:[s.name,t.jsx(l.Tooltip,e.__assign({isFullScreen:!1,title:"Go to Data Quality page"},{children:t.jsx("div",{children:t.jsx(p.UniversalLink,e.__assign({className:_.link,href:u,onClick:function(){var e;null===(e=window[Symbol.for("logToMixpanel")])||void 0===e||e.call(window,m.MIXPANEL_ACTION_TYPES.REDIRECT.ASSET_DASHBOARD,{referer:"DQ Badge"})}},{children:t.jsx(x.default,{className:_.linkIcon})}))})}))]})),t.jsxs("span",e.__assign({className:g.alertInfo},{children:[t.jsx("span",{children:"Category:"})," ",s.category]})),t.jsxs("span",e.__assign({className:g.alertInfo},{children:[t.jsx("span",{children:"Status:"})," ",s.status]})),t.jsxs("span",e.__assign({className:g.alertInfo},{children:[t.jsx("span",{children:"Error Type:"}),t.jsx("div",e.__assign({className:g.errorIcon},{children:i})),t.jsx("span",e.__assign({className:s.state===c.ALERT_STATES.issue?c.BADGE_ICON_STATUSES.warning:c.BADGE_ICON_STATUSES.error},{children:s.state}))]})),t.jsxs("span",e.__assign({className:g.alertInfo},{children:[t.jsx("span",{children:"Score Deduction:"}),t.jsx("span",e.__assign({className:o.getDeductsFromScoreClass(g,s.deductsFromScore,o.isResolved(s.status))},{children:o.getDeductsFromScoreValue(s.deductsFromScore,o.isResolved(s.status))}))]})),t.jsxs("div",e.__assign({className:g.alertMessageFull},{children:[s.isThrottled&&t.jsx("b",{children:"[Throttled]: "}),t.jsx(j,{children:s.message})]})),t.jsxs("span",e.__assign({className:g.alertInfo},{children:[t.jsx("span",e.__assign({className:g.note},{children:"Note:"}))," ",(null===(a=s.note)||void 0===a?void 0:a.length)?s.note:"—"]})),t.jsxs("span",e.__assign({className:g.alertTime},{children:["Updated at: ",t.jsx("span",{children:v})]}))]})]})})}),(function(e,t){return s.isEqual(e.alert,t.alert)}));exports.DQAlertsTooltip=S;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DQAlertsTooltip.d.ts","sourceRoot":"","sources":["../../../../src/components/StatusBadge/components/DQAlertsTooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAQ,MAAM,OAAO,CAAC;AAW3C,OAAO,EAAE,KAAK,EAAqC,MAAM,oCAAoC,CAAC;AAsI9F,aAAK,0BAA0B,GAAG;IAChC,KAAK,EAAE,KAAK,CAAC;IACb,SAAS,EAAE,YAAY,CAAC;IACxB,QAAQ,EAAE,YAAY,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IACjC,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,eAAe,qFACqB,0BAA0B,KAAG,WAAW,
|
|
1
|
+
{"version":3,"file":"DQAlertsTooltip.d.ts","sourceRoot":"","sources":["../../../../src/components/StatusBadge/components/DQAlertsTooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAQ,MAAM,OAAO,CAAC;AAW3C,OAAO,EAAE,KAAK,EAAqC,MAAM,oCAAoC,CAAC;AAsI9F,aAAK,0BAA0B,GAAG;IAChC,KAAK,EAAE,KAAK,CAAC;IACb,SAAS,EAAE,YAAY,CAAC;IACxB,QAAQ,EAAE,YAAY,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IACjC,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,eAAe,qFACqB,0BAA0B,KAAG,WAAW,CA0FxF,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{memo as o}from"react";import i from"moment";import{isEqual as n,template as l}from"lodash";import{makeStyles as s}from"@material-ui/core";import p from"@material-ui/icons/ArrowForward";import{Tooltip as c}from"../../Tooltip/Tooltip.js";import"../../Tooltip/ScrollableTooltip.js";import{getDeductsFromScoreClass as m,isResolved as d,getDeductsFromScoreValue as h}from"../utils.js";import{ALERT_STATES as f,BADGE_ICON_STATUSES as g}from"../constants.js";import{UniversalLink as u}from"../../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import{useDQUnvalidatedContentStyles as x}from"../styles.js";import{MIXPANEL_ACTION_TYPES as w}from"../../../constants/mixpanel.js";var y=s((function(e){return{errorIcon:{width:20,height:18},title:{maxWidth:198,padding:"0 0 8px",fontSize:16,lineHeight:"22px",color:e.palette.primary.text1,display:"flex",alignItems:"center"},emptyMessage:{padding:"0",fontSize:16,lineHeight:"22px",color:e.palette.primary.contrastText},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:77,width:270,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,zIndex:500,"& .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 !important"},good:{color:"".concat(e.palette.warning.light," !important")}}})),v=function(e,t){return void 0===t&&(t="
|
|
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{memo as o}from"react";import i from"moment";import{isEqual as n,template as l}from"lodash";import{makeStyles as s}from"@material-ui/core";import p from"@material-ui/icons/ArrowForward";import{Tooltip as c}from"../../Tooltip/Tooltip.js";import"../../Tooltip/ScrollableTooltip.js";import{getDeductsFromScoreClass as m,isResolved as d,getDeductsFromScoreValue as h}from"../utils.js";import{ALERT_STATES as f,BADGE_ICON_STATUSES as g}from"../constants.js";import{UniversalLink as u}from"../../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import{useDQUnvalidatedContentStyles as x}from"../styles.js";import{MIXPANEL_ACTION_TYPES as w}from"../../../constants/mixpanel.js";var y=s((function(e){return{errorIcon:{width:20,height:18},title:{maxWidth:198,padding:"0 0 8px",fontSize:16,lineHeight:"22px",color:e.palette.primary.text1,display:"flex",alignItems:"center"},emptyMessage:{padding:"0",fontSize:16,lineHeight:"22px",color:e.palette.primary.contrastText},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:77,width:270,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,zIndex:500,"& .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 !important"},good:{color:"".concat(e.palette.warning.light," !important")}}})),v=function(e,t){return void 0===t&&(t="MMM D YYYY, h:mm A"),e?i.unix(e).format(t):null},b=function(e){return i.unix(e).format("DD MMM HH:mm (Z)")},S=function(r){var a=r.children,o=y(),i=l(a)({timestampFormatter:b}).split("**").map((function(e,r){return r%2==1?t("b",{children:e}):e}));return t("span",e({className:o.message},{children:i}))},N=o((function(o){var i,n=o.alert,l=o.alertIcon,s=o.children,b=o.linkToDQPage,N=y(),I=x({}),M=Math.max(n.statusUpdatedAt,n.lastCheckedAt),T=v(M);return t(c,{interactive:!0,children:s,PopperProps:{className:N.popover},placement:"right",title:r(a,{children:[n.emptyMessage&&t("div",e({className:N.emptyMessage},{children:n.statusUpdatedAt?v(n.statusUpdatedAt):n.emptyMessage})),!n.emptyMessage&&r(a,{children:[r("div",e({className:N.title},{children:[n.name,t(c,e({isFullScreen:!1,title:"Go to Data Quality page"},{children:t("div",{children:t(u,e({className:I.link,href:b,onClick:function(){var e;null===(e=window[Symbol.for("logToMixpanel")])||void 0===e||e.call(window,w.REDIRECT.ASSET_DASHBOARD,{referer:"DQ Badge"})}},{children:t(p,{className:I.linkIcon})}))})}))]})),r("span",e({className:N.alertInfo},{children:[t("span",{children:"Category:"})," ",n.category]})),r("span",e({className:N.alertInfo},{children:[t("span",{children:"Status:"})," ",n.status]})),r("span",e({className:N.alertInfo},{children:[t("span",{children:"Error Type:"}),t("div",e({className:N.errorIcon},{children:l})),t("span",e({className:n.state===f.issue?g.warning:g.error},{children:n.state}))]})),r("span",e({className:N.alertInfo},{children:[t("span",{children:"Score Deduction:"}),t("span",e({className:m(N,n.deductsFromScore,d(n.status))},{children:h(n.deductsFromScore,d(n.status))}))]})),r("div",e({className:N.alertMessageFull},{children:[n.isThrottled&&t("b",{children:"[Throttled]: "}),t(S,{children:n.message})]})),r("span",e({className:N.alertInfo},{children:[t("span",e({className:N.note},{children:"Note:"}))," ",(null===(i=n.note)||void 0===i?void 0:i.length)?n.note:"—"]})),r("span",e({className:N.alertTime},{children:["Updated at: ",t("span",{children:T})]}))]})]})})}),(function(e,t){return n(e.alert,t.alert)}));export{N as DQAlertsTooltip};
|