@corva/ui 0.61.0-13 → 0.61.0-14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs-bundle/components/StatusBadge/components/DQUnvalidatedContent.js +1 -1
- package/cjs-bundle/components/StatusBadge/index.js +1 -1
- package/components/StatusBadge/components/DQUnvalidatedContent.d.ts +3 -1
- package/components/StatusBadge/components/DQUnvalidatedContent.d.ts.map +1 -1
- package/components/StatusBadge/components/DQUnvalidatedContent.js +1 -1
- package/components/StatusBadge/index.d.ts.map +1 -1
- package/components/StatusBadge/index.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require('./../../../ext-esm/tslib/tslib.es6.js'),s=require("react/jsx-runtime"),a=require("classnames"),r=require("@material-ui/core"),i=require("@material-ui/icons/Link"),n=require("../../Button/index.js"),t=require("../../Search/utils/truncate.js"),c=require("../styles.js"),l=require("../../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js"),
|
|
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("classnames"),r=require("@material-ui/core"),i=require("@material-ui/icons/Link"),n=require("../../Button/index.js"),t=require("../../Search/utils/truncate.js"),c=require("../styles.js"),l=require("../../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js"),o=require("./DQAccordionDetailsContent.js");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=d(a),_=d(i);exports.DQUnvalidatedContent=function(a){var i=a.assetsData,d=a.maxHeight,m=a.onClick,h=a.onMouseLeave,x=a.onMouseEnter,j=c.useDQUnvalidatedContentStyles({maxHeight:d});return s.jsxs("div",e.__assign({className:j.container,onMouseLeave:h,onMouseEnter:x},{children:[s.jsxs("div",{children:[s.jsx(r.Typography,e.__assign({className:j.headerText,"data-testid":"Status_badge__DQ_unvalidated_content"},{children:"Data Quality"})),s.jsx(r.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(i).map((function(a){var n,c=i[a];return s.jsxs(r.Accordion,e.__assign({className:j.accordion,defaultExpanded:!0},{children:[s.jsx(r.AccordionSummary,e.__assign({className:u.default("large","stretched")},{children:s.jsxs("div",e.__assign({className:j.headerWrapper},{children:[s.jsx("span",{children:t.truncateString(a,{maxChars:35,charsNumFromStart:13,charsNumFromEnd:12})}),s.jsx(l.UniversalLink,e.__assign({className:j.link,href:null===(n=c[0])||void 0===n?void 0:n.linkToDQPage},{children:s.jsx(_.default,{className:j.linkIcon})}))]}))})),s.jsx(r.AccordionDetails,e.__assign({className:j.accordionDetails},{children:s.jsx(o.DQAccordionDetailsContent,{assets:c})}))]}),a)}))}))})),s.jsx("div",e.__assign({className:j.reportDQIssueButtonWrapper},{children:s.jsx(n,e.__assign({className:j.reportDQIssueButton,onClick:m,variation:"secondary"},{children:"report data issue"}))}))]}))};
|
|
@@ -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"),n=require("react"),a=require("moment"),s=require("classnames"),r=require("@material-ui/core"),o=require("../Tooltip/Tooltip.js");require("../Tooltip/ScrollableTooltip.js");var i=require("./constants.js"),c=require("./components/DQStatusIcon.js"),l=require("./components/DQUnvalidatedContent.js"),p=require("./components/ReportIssueModal.js");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=u(a),g=u(s),m=r.makeStyles((function(e){return{statusBadgeWrapper:{backgroundColor:e.palette.background.b4,display:"flex",height:30},statusBadgeContent:{display:"flex",padding:function(e){var t=e.isSuccessTypeIcon,n=e.isErrorTypeIcon;return"12px 0 2px ".concat(t||n?6:2,"px")},whiteSpace:"nowrap",width:"calc(100% - 140px)"},text:{fontSize:"10px",lineHeight:"12px",alignSelf:"center"},timestamp:{color:e.palette.primary.text6,marginLeft:function(e){return e.isIconExist&&4}},warningMessage:{color:e.palette.primary.text1,marginLeft:4,textOverflow:"ellipsis",overflow:"hidden",fontSize:"12px"},badgeIconWarning:{marginLeft:8},popper:{zIndex:1,"& .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,minWidth:24,borderRadius:12,"&:hover":{backgroundColor:function(e){var t=e.isErrorTypeIcon,n=e.isSuccessTypeIcon;return t?"rgba(244, 67, 54, 0.1)":n?"rgba(117, 219, 41, 0.2)":"transparent"}}}}}));exports.StatusBadge=function(a){var s=a.assetsData,u=void 0===s?{}:s,x=a.appWidth,f=a.DQIssueTooltipMaxHeight,_=a.iconType,S=a.className,T=a.lastTimestamp,h=a.onReportErrorClick,I=a.warningData,b=n.useState(!1),v=b[0],j=b[1],y=n.useState(!1),N=y[0],D=y[1],E=n.useState(null),C=E[0],W=E[1],w=null==I?void 0:I.message,M=_==i.BADGE_ICON_STATUSES.error,A=_==i.BADGE_ICON_STATUSES.success,q=x<i.MAX_MOBILE_WIDTH,B=m({isIconExist:!!_,isSuccessTypeIcon:A,isErrorTypeIcon:M});n.useEffect((function(){return function(){return clearTimeout(C)}}),[]);var Q=function(){clearTimeout(C),D(!0)},k=function(){var e=setTimeout((function(){return D(!1)}),700);W(e)};return t.jsxs("div",e.__assign({"data-testid":"Status_badge",className:g.default(B.statusBadgeWrapper,"c-status-badge--".concat(_),S)},{children:[t.jsxs("div",e.__assign({className:B.statusBadgeContent},{children:[_&&t.jsx(o.Tooltip,e.__assign({disableHoverListener:!0,open:N,onMouseEnter:Q,onMouseLeave:k,PopperProps:{className:B.popper},placement:"top-start",title:t.jsx(l.DQUnvalidatedContent,{onMouseEnter:Q,onMouseLeave:k,assetsData:u,maxHeight:f,onClick:function(){return j(!0)}})},{children:t.jsx("div",e.__assign({className:B.DQIconWrapper,"data-testid":"".concat("Status_badge","__DQ_icon_").concat(_)},{children:t.jsx(c.DQStatusIcon,{color:_,iconType:_})}))})),T&&t.jsxs(r.Typography,e.__assign({className:g.default(B.text,B.timestamp),variant:"body1"},{children:["Last Update: ",d.default.unix(T).format("M/D/YYYY h:mm a")]})),I&&t.jsxs(t.Fragment,{children:[t.jsx(o.Tooltip,e.__assign({placement:"top",title:w?"".concat(i.WARNING,". ").concat(w):i.WARNING},{children:t.jsx("div",e.__assign({"data-testid":"".concat("Status_badge","__DQ_icon_warning")},{children:t.jsx(c.DQStatusIcon,{className:B.badgeIconWarning,color:i.BADGE_ICON_STATUSES.warning,iconType:i.BADGE_ICON_STATUSES.warning})}))})),!q&&t.jsx(r.Typography,e.__assign({className:g.default(B.text,B.warningMessage),variant:"body1"},{children:w?"".concat(i.WARNING,". ").concat(w):i.WARNING}))]})]})),t.jsx(p.ReportIssueModal,{assets:Object.keys(u).map((function(e){return{name:e,id:u[e][0].alert.assetId}})),open:v,onSave:h,onClose:function(){return j(!1)}})]}))};
|
|
@@ -4,7 +4,9 @@ declare type DQUnvalidatedContentProps = {
|
|
|
4
4
|
assetsData?: AssetData;
|
|
5
5
|
maxHeight?: number;
|
|
6
6
|
onClick: () => void;
|
|
7
|
+
onMouseLeave: () => void;
|
|
8
|
+
onMouseEnter: () => void;
|
|
7
9
|
};
|
|
8
|
-
export declare const DQUnvalidatedContent: ({ assetsData, maxHeight, onClick }: DQUnvalidatedContentProps) => JSX.Element;
|
|
10
|
+
export declare const DQUnvalidatedContent: ({ assetsData, maxHeight, onClick, onMouseLeave, onMouseEnter, }: DQUnvalidatedContentProps) => JSX.Element;
|
|
9
11
|
export {};
|
|
10
12
|
//# 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;AAM/D,aAAK,yBAAyB,GAAG;IAC/B,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,IAAI,CAAC;
|
|
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;AAM/D,aAAK,yBAAyB,GAAG;IAC/B,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,YAAY,EAAE,MAAM,IAAI,CAAC;CAC1B,CAAA;AAED,eAAO,MAAM,oBAAoB,oEAM9B,yBAAyB,KAAG,WAwD9B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as e}from'./../../../ext-esm/tslib/tslib.es6.js';import{jsxs as a,jsx as r}from"react/jsx-runtime";import
|
|
1
|
+
import{__assign as e}from'./../../../ext-esm/tslib/tslib.es6.js';import{jsxs as a,jsx as r}from"react/jsx-runtime";import s from"classnames";import{Typography as t,Accordion as i,AccordionSummary as n,AccordionDetails as o}from"@material-ui/core";import l from"@material-ui/icons/Link";import c from"../../Button/index.js";import{truncateString as m}from"../../Search/utils/truncate.js";import{useDQUnvalidatedContentStyles as d}from"../styles.js";import{UniversalLink as u}from"../../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import{DQAccordionDetailsContent as h}from"./DQAccordionDetailsContent.js";var p=function(p){var v=p.assetsData,f=p.maxHeight,N=p.onClick,D=p.onMouseLeave,x=p.onMouseEnter,k=d({maxHeight:f});return a("div",e({className:k.container,onMouseLeave:D,onMouseEnter:x},{children:[a("div",{children:[r(t,e({className:k.headerText,"data-testid":"Status_badge__DQ_unvalidated_content"},{children:"Data Quality"})),r(t,e({className:k.subheaderText},{children:"Fusion real-time data quality rules for app data"}))]}),r("div",e({className:k.relative},{children:r("div",e({className:k.accordionsWrapper},{children:Object.keys(v).map((function(t){var c,d=v[t];return a(i,e({className:k.accordion,defaultExpanded:!0},{children:[r(n,e({className:s("large","stretched")},{children:a("div",e({className:k.headerWrapper},{children:[r("span",{children:m(t,{maxChars:35,charsNumFromStart:13,charsNumFromEnd:12})}),r(u,e({className:k.link,href:null===(c=d[0])||void 0===c?void 0:c.linkToDQPage},{children:r(l,{className:k.linkIcon})}))]}))})),r(o,e({className:k.accordionDetails},{children:r(h,{assets:d})}))]}),t)}))}))})),r("div",e({className:k.reportDQIssueButtonWrapper},{children:r(c,e({className:k.reportDQIssueButton,onClick:N,variation:"secondary"},{children:"report data issue"}))}))]}))};export{p as DQUnvalidatedContent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/StatusBadge/index.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAkD,SAAS,EAAE,MAAM,aAAa,CAAC;AAgFxF,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,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACnE,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACnC,CAAC;AAEF,eAAO,MAAM,WAAW,4HASrB,gBAAgB,KAAG,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/StatusBadge/index.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAkD,SAAS,EAAE,MAAM,aAAa,CAAC;AAgFxF,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,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACnE,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACnC,CAAC;AAEF,eAAO,MAAM,WAAW,4HASrB,gBAAgB,KAAG,WAuGrB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as t}from'./../../ext-esm/tslib/tslib.es6.js';import{jsxs as e,jsx as o,Fragment as
|
|
1
|
+
import{__assign as t}from'./../../ext-esm/tslib/tslib.es6.js';import{jsxs as e,jsx as o,Fragment as n}from"react/jsx-runtime";import{useState as a,useEffect as r}from"react";import i from"moment";import s from"classnames";import{makeStyles as c,Typography as p}from"@material-ui/core";import{Tooltip as l}from"../Tooltip/Tooltip.js";import"../Tooltip/ScrollableTooltip.js";import{WARNING as m,BADGE_ICON_STATUSES as d,MAX_MOBILE_WIDTH as u}from"./constants.js";import{DQStatusIcon as g}from"./components/DQStatusIcon.js";import{DQUnvalidatedContent as f}from"./components/DQUnvalidatedContent.js";import{ReportIssueModal as x}from"./components/ReportIssueModal.js";var h=c((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:{zIndex:1,"& .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,minWidth: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(c){var b=c.assetsData,v=void 0===b?{}:b,T=c.appWidth,y=c.DQIssueTooltipMaxHeight,I=c.iconType,S=c.className,w=c.lastTimestamp,_=c.onReportErrorClick,D=c.warningData,j=a(!1),C=j[0],M=j[1],W=a(!1),k=W[0],E=W[1],N=a(null),L=N[0],Q=N[1],H=null==D?void 0:D.message,z=I==d.error,B=I==d.success,Y=T<u,O=h({isIconExist:!!I,isSuccessTypeIcon:B,isErrorTypeIcon:z});r((function(){return function(){return clearTimeout(L)}}),[]);var R=function(){clearTimeout(L),E(!0)},P=function(){var t=setTimeout((function(){return E(!1)}),700);Q(t)};return e("div",t({"data-testid":"Status_badge",className:s(O.statusBadgeWrapper,"c-status-badge--".concat(I),S)},{children:[e("div",t({className:O.statusBadgeContent},{children:[I&&o(l,t({disableHoverListener:!0,open:k,onMouseEnter:R,onMouseLeave:P,PopperProps:{className:O.popper},placement:"top-start",title:o(f,{onMouseEnter:R,onMouseLeave:P,assetsData:v,maxHeight:y,onClick:function(){return M(!0)}})},{children:o("div",t({className:O.DQIconWrapper,"data-testid":"".concat("Status_badge","__DQ_icon_").concat(I)},{children:o(g,{color:I,iconType:I})}))})),w&&e(p,t({className:s(O.text,O.timestamp),variant:"body1"},{children:["Last Update: ",i.unix(w).format("M/D/YYYY h:mm a")]})),D&&e(n,{children:[o(l,t({placement:"top",title:H?"".concat(m,". ").concat(H):m},{children:o("div",t({"data-testid":"".concat("Status_badge","__DQ_icon_warning")},{children:o(g,{className:O.badgeIconWarning,color:d.warning,iconType:d.warning})}))})),!Y&&o(p,t({className:s(O.text,O.warningMessage),variant:"body1"},{children:H?"".concat(m,". ").concat(H):m}))]})]})),o(x,{assets:Object.keys(v).map((function(t){return{name:t,id:v[t][0].alert.assetId}})),open:C,onSave:_,onClose:function(){return M(!1)}})]}))};export{b as StatusBadge};
|