@corva/ui 0.64.0-rc.3 → 0.64.0
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/DQAlertsTooltip.js +1 -1
- package/cjs-bundle/components/StatusBadge/index.js +1 -1
- package/cjs-bundle/components/VirtualizedTable/VirtualizedTable.js +1 -1
- package/components/FeedItem/feedItemTypes/BhaFeedItem/BhaFeedItem.d.ts.map +1 -1
- package/components/StatusBadge/components/DQAlertsTooltip.d.ts +1 -1
- package/components/StatusBadge/components/DQAlertsTooltip.d.ts.map +1 -1
- package/components/StatusBadge/components/DQAlertsTooltip.js +1 -1
- package/components/StatusBadge/index.d.ts +1 -2
- package/components/StatusBadge/index.d.ts.map +1 -1
- package/components/StatusBadge/index.js +1 -1
- package/components/VirtualizedTable/VirtualizedTable.d.ts.map +1 -1
- package/components/VirtualizedTable/VirtualizedTable.js +1 -1
- package/package.json +1 -1
- package/utils/bha.d.ts.map +1 -1
|
@@ -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("
|
|
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"),s=require("@material-ui/core"),i=require("@material-ui/icons/ArrowForward"),n=require("../../Tooltip/Tooltip.js");require("../../Tooltip/ScrollableTooltip.js");var l=require("../utils.js"),o=require("../constants.js"),c=require("../../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js"),p=require("../styles.js");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var m=d(a),g=d(i),u=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,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")}}})),x=function(e){return m.default.unix(e).format("DD MMM HH:mm (Z)")},h=function(a){var s=a.children,i=u(),n=r.template(s)({timestampFormatter:x}).split("**").map((function(e,a){return a%2==1?t.jsx("b",{children:e}):e}));return t.jsx("span",e.__assign({className:i.message},{children:n}))};exports.DQAlertsTooltip=function(a){var r,s,i,d=a.alert,x=a.alertIcon,f=a.children,_=a.linkToDQPage,j=u(),S=p.useDQUnvalidatedContentStyles({}),v=Math.max(d.statusUpdatedAt,d.lastCheckedAt),y=(void 0===i&&(i="MM/DD/YY hh:mm a"),(s=v)?m.default.unix(s).format(i):null);return t.jsx(n.Tooltip,{isFullScreen:!1,interactive:!0,children:f,PopperProps:{className:j.popover},placement:"right",title:d.emptyMessage?t.jsx("div",e.__assign({className:j.emptyMessage},{children:d.emptyMessage})):t.jsxs(t.Fragment,{children:[t.jsxs("div",e.__assign({className:j.title},{children:[d.name,t.jsx(n.Tooltip,e.__assign({isFullScreen:!1,title:"Go to Data Quality page"},{children:t.jsx("div",{children:t.jsx(c.UniversalLink,e.__assign({className:S.link,href:_},{children:t.jsx(g.default,{className:S.linkIcon})}))})}))]})),t.jsxs("span",e.__assign({className:j.alertInfo},{children:[t.jsx("span",{children:"Category:"})," ",d.category]})),t.jsxs("span",e.__assign({className:j.alertInfo},{children:[t.jsx("span",{children:"Status:"})," ",d.status]})),t.jsxs("span",e.__assign({className:j.alertInfo},{children:[t.jsx("span",{children:"Error Type:"}),t.jsx("div",e.__assign({className:j.errorIcon},{children:x})),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:j.alertInfo},{children:[t.jsx("span",{children:"Score Deduction:"}),t.jsx("span",e.__assign({className:l.getDeductsFromScoreClass(j,d.deductsFromScore,l.isResolved(d.status))},{children:l.getDeductsFromScoreValue(d.deductsFromScore,l.isResolved(d.status))}))]})),t.jsxs("div",e.__assign({className:j.alertMessageFull},{children:[d.isThrottled&&t.jsx("b",{children:"[Throttled]: "}),t.jsx(h,{children:d.message})]})),t.jsxs("span",e.__assign({className:j.alertInfo},{children:[t.jsx("span",e.__assign({className:j.note},{children:"Note:"}))," ",(null===(r=d.note)||void 0===r?void 0:r.length)?d.note:"—"]})),t.jsxs("span",e.__assign({className:j.alertTime},{children:["Updated at: ",t.jsx("span",{children:y})]}))]})})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require('./../../ext-esm/tslib/tslib.es6.js'),t=require("react/jsx-runtime"),n=require("react"),a=require("moment"),
|
|
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"),r=require("classnames"),s=require("@material-ui/core"),i=require("../Tooltip/Tooltip.js");require("../Tooltip/ScrollableTooltip.js");var o=require("./constants.js"),c=require("./components/DQStatusIcon.js"),u=require("./components/DQUnvalidatedContent.js"),l=require("./components/ReportIssueModal.js"),p=require("./api.js");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var g=d(a),m=d(r),f=window.innerHeight-212,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,n=e.isErrorTypeIcon,a=e.isIssueTypeIcon;return"12px 0 2px ".concat(t||n||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:{zIndex:function(e){return e.maximized?500: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,a=e.isIssueTypeIcon;return t?"rgba(244, 67, 54, 0.1)":n?"rgba(117, 219, 41, 0.2)":a?"rgba(255, 193, 7, 0.16)":"transparent"}}}}}));exports.StatusBadge=function(a){var r=a.assetsData,d=void 0===r?{}:r,_=a.appWidth,S=a.DQIssueTooltipMaxHeight,I=void 0===S?f:S,T=a.iconType,h=a.className,b=a.lastTimestamp,v=a.onReportErrorClick,y=a.warningData,j=a.hasSubscriptionsData,E=a.currentUser,N=a.segment,D=a.maximized,w=n.useState(!1),C=w[0],A=w[1],W=n.useState(!1),M=W[0],q=W[1],R=n.useRef(null),k=null==y?void 0:y.message,B=T===o.BADGE_ICON_STATUSES.error,O=T===o.BADGE_ICON_STATUSES.success,L=T===o.BADGE_ICON_STATUSES.issue,Q=_<o.MAX_MOBILE_WIDTH,G=x({isIconExist:!!T,isSuccessTypeIcon:O,isErrorTypeIcon:B,isIssueTypeIcon:L,maximized:D}),U=n.useRef(null),z=function(e){R.current&&!R.current.contains(e.target)&&q(!1)};n.useEffect((function(){return document.addEventListener("click",z),function(){document.removeEventListener("click",z),clearTimeout(U.current)}}),[]);var H=function(){clearTimeout(U.current),q(!0)},Y=function(e,t){void 0===t&&(t=700),U.current=setTimeout((function(){return q(!1)}),t)};return n.useEffect((function(){j&&(H(),Y(0,1e4))}),[JSON.stringify(d)]),t.jsxs("div",e.__assign({"data-testid":"Status_badge",className:m.default(G.statusBadgeWrapper,"c-status-badge--".concat(T),h)},{children:[t.jsxs("div",e.__assign({className:G.statusBadgeContent,ref:R},{children:[T&&t.jsx(i.Tooltip,e.__assign({isFullScreen:!1,disableHoverListener:!0,open:M,onMouseEnter:H,onMouseLeave:Y,PopperProps:{className:G.popper},placement:"top-start",title:t.jsx(u.DQUnvalidatedContent,{tooltipRef:R,onMouseEnter:H,onMouseLeave:Y,assetsData:d,maxHeight:I,onClick:function(){return A(!0)}})},{children:t.jsx("div",e.__assign({className:G.DQIconWrapper,"data-testid":"".concat("Status_badge","__DQ_icon_").concat(T)},{children:t.jsx(c.DQStatusIcon,{color:T,iconType:T})}))})),b&&t.jsxs(s.Typography,e.__assign({className:m.default(G.text,G.timestamp),variant:"body1"},{children:["Last Update: ",g.default.unix(b).format("M/D/YYYY h:mm a")]})),y&&t.jsxs(t.Fragment,{children:[t.jsx(i.Tooltip,e.__assign({placement:"top",title:k?"".concat(o.WARNING,". ").concat(k):o.WARNING},{children:t.jsx("div",e.__assign({"data-testid":"".concat("Status_badge","__DQ_icon_warning")},{children:t.jsx(c.DQStatusIcon,{className:G.badgeIconWarning,color:o.BADGE_ICON_STATUSES.warning,iconType:o.BADGE_ICON_STATUSES.warning})}))})),!Q&&t.jsx(s.Typography,e.__assign({className:m.default(G.text,G.warningMessage),variant:"body1"},{children:k?"".concat(o.WARNING,". ").concat(k):o.WARNING}))]})]})),C&&t.jsx(l.ReportIssueModal,{assets:Object.keys(d).map((function(e){return{name:e,id:d[e][0].alert.assetId}})),onSave:v||function(e,t){p.postReportError(t,e,E,N)},onClose:function(){return A(!1)}})]}))};
|
|
@@ -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"),r=require("react"),n=require("prop-types"),i=require("classnames"),a=require("react-virtualized"),o=require("@material-ui/core"),l=require("@material-ui/icons"),u=require("../../utils/convert.js");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=s(n),c=s(i);function f(e,t){var r=e.find((function(e){return e.key===t}))||{},n=r.unitType,i=r.customUnit;return i?"(".concat(i,")"):n?"(".concat(u.getUnitDisplay(n),")"):""}function h(e,t){return(e.find((function(e){return e.key===t}))||{}).headerLabelClassName||""}function m(e,t){return(e.find((function(e){return e.key===t}))||{}).headerLabelUnitClassName||""}var g=function(n){var i=n.columns,u=n.data,s=n.useColumnSetting,d=n.useFixedColumnWidth,g=n.onOpenSettingDlg,p=n.classes,b=n.width,y=n.height,w=n.headerHeight,_=n.rowHeight,x=n.showTopSettingIcon,S=n.customMuiStyles,R=n.isTopSettingIconShownAlways,q=n.CustomCellRenderer,v=n.customRowStyle,C=n.sort,
|
|
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"),n=require("prop-types"),i=require("classnames"),a=require("react-virtualized"),o=require("@material-ui/core"),l=require("@material-ui/icons"),u=require("../../utils/convert.js");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=s(n),c=s(i);function f(e,t){var r=e.find((function(e){return e.key===t}))||{},n=r.unitType,i=r.customUnit;return i?"(".concat(i,")"):n?"(".concat(u.getUnitDisplay(n),")"):""}function h(e,t){return(e.find((function(e){return e.key===t}))||{}).headerLabelClassName||""}function m(e,t){return(e.find((function(e){return e.key===t}))||{}).headerLabelUnitClassName||""}var g=function(n){var i=n.columns,u=n.data,s=n.useColumnSetting,d=n.useFixedColumnWidth,g=n.onOpenSettingDlg,p=n.classes,b=n.width,y=n.height,w=n.headerHeight,_=n.rowHeight,x=n.showTopSettingIcon,S=n.customMuiStyles,R=n.isTopSettingIconShownAlways,q=n.CustomCellRenderer,v=n.customRowStyle,C=n.sort,T=n.sortBy,j=n.sortDirection,z=e.__assign(e.__assign({},p),S),k=r.useMemo((function(){return{label:"",key:"setting",width:s?25:0}}),[s]),I=r.useMemo((function(){return i.filter((function(e){return e.show}))}),[i]),D=r.useMemo((function(){return s?e.__spreadArray(e.__spreadArray([],I,!0),[k],!1):I}),[I,s,k]),N=r.useMemo((function(){var e;if(b<=0)return{};var t=((e={})[k.key]=k.width,e),r=[];return I.filter((function(e){return Number.isFinite(e.width)})).forEach((function(e){t[e.key]=e.width-1,r.push(e.width-1)})),I.filter((function(e){return!Number.isFinite(e.width)})).forEach((function(e){var n=r.reduce((function(e,t){return e+t}),0),i=Math.floor((b-n-k.width)/(I.length-r.length)),a=e.minWidth||65,o=i<a?a:i;t[e.key]=o-1,r.push(o-1)})),t}),[b,I,k]),L=r.useMemo((function(){return Object.values(N).reduce((function(e,t){return e+t}),0)}),[N]),M=R||L-12.5>=b;r.useEffect((function(){x(M)}),[M]);var A=function(r){var n=r.label,u=r.dataKey,s=T||j||C;return u===k.key?M?null:t.jsx(o.IconButton,e.__assign({size:"small","aria-label":"customize columns",className:z.settingIcon,onClick:g},{children:t.jsx(l.Settings,{fontSize:"inherit"})})):t.jsxs(o.Typography,e.__assign({variant:"body2",className:c.default(z.headerLabel,h(i,u))},{children:[n," ",t.jsx("span",e.__assign({className:c.default(z.unitLabel,m(i,u))},{children:f(i,u)})),s&&u!==T&&t.jsx(o.Tooltip,e.__assign({title:"Sort A-Z"},{children:t.jsx(l.Sort,{fontSize:"small",className:p.sortIcon})})),s&&u===T&&(j===a.SortDirection.ASC?t.jsx(l.ArrowUpward,{fontSize:"small",className:p.sortIcon}):t.jsx(l.ArrowDownward,{fontSize:"small",className:p.sortIcon}))]}))},H=function(r){var n=r.dataKey,i=r.rowData;return q?t.jsx(q,{columnKey:n,value:i[n]}):t.jsx(o.Typography,e.__assign({variant:"body2",className:z.cellData},{children:i[n]}))};return t.jsx(a.Table,e.__assign({width:d?L:b,height:y,headerHeight:w,rowClassName:function(e){var t,r=e.index;return c.default(((t={})[z.oddRow]=r%2==1,t))},rowHeight:_,rowCount:u.length,rowGetter:function(e){var t=e.index;return u[t]},rowStyle:v||{},className:z.table,sort:C,sortBy:T,sortDirection:j},{children:D.map((function(e){return t.jsx(a.Column,{width:N[e.key]||0,dataKey:e.key,label:e.label,headerRenderer:A,cellRenderer:H},e.key)}))}))},p={columns:d.default.arrayOf(d.default.shape({show:d.default.bool,minWidth:d.default.number,width:d.default.number,key:d.default.string,label:d.default.string})).isRequired,data:d.default.arrayOf(d.default.shape({})).isRequired,useColumnSetting:d.default.bool.isRequired,useFixedColumnWidth:d.default.bool.isRequired,headerHeight:d.default.number.isRequired,rowHeight:d.default.number.isRequired,width:d.default.number.isRequired,height:d.default.number.isRequired,onOpenSettingDlg:d.default.func.isRequired,showTopSettingIcon:d.default.func.isRequired,sort:d.default.func,sortBy:d.default.string,sortDirection:d.default.string,classes:d.default.shape({sortIcon:d.default.string}).isRequired,customMuiStyles:d.default.shape({table:d.default.string,oddRow:d.default.string,headerLabel:d.default.string,cellData:d.default.string,unitLabel:d.default.string,settingIcon:d.default.string}).isRequired,isTopSettingIconShownAlways:d.default.bool.isRequired,CustomCellRenderer:d.default.func,customRowStyle:d.default.func};g.propTypes=p,g.defaultProps={CustomCellRenderer:null,customRowStyle:null,sort:null,sortBy:null,sortDirection:null};var b=o.withStyles((function(e){return{table:{"& .ReactVirtualized__Table__headerRow":{textTransform:"none",borderBottom:e.isLightTheme?"1px solid rgba(224, 224, 224, 1)":"1px solid rgba(81, 81, 81, 1)"},"& .ReactVirtualized__Table__row":{borderBottom:e.isLightTheme?"1px solid rgba(224, 224, 224, 1)":"1px solid rgba(81, 81, 81, 1)"},"& .ReactVirtualized__Table__Grid":{outline:"none"},"& .ReactVirtualized__Table__headerColumn":{outline:"none"}},oddRow:{backgroundColor:e.isLightTheme?"rgba(189, 189, 189, 0.1)":"#303030"},headerLabel:{lineHeight:"14px",fontSize:"12px",fontStyle:"normal",letterSpacing:"-0.25px",display:"flex",alignItems:"center",flexWrap:"wrap"},cellData:{lineHeight:"14px",fontSize:"12px",fontWeight:"normal",fontStyle:"normal",letterSpacing:"0.15px"},unitLabel:{fontSize:"10px",opacity:.5},settingIcon:{padding:"3px",fontSize:"20px"},sortIcon:{fontSize:"16px"}}}))(g);exports.VirtualizedTableComponent=g,exports.default=b;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BhaFeedItem.d.ts","sourceRoot":"","sources":["../../../../../src/components/FeedItem/feedItemTypes/BhaFeedItem/BhaFeedItem.js"],"names":[],"mappings":";AAcA;;;;;;
|
|
1
|
+
{"version":3,"file":"BhaFeedItem.d.ts","sourceRoot":"","sources":["../../../../../src/components/FeedItem/feedItemTypes/BhaFeedItem/BhaFeedItem.js"],"names":[],"mappings":";AAcA;;;;;;gBA+CC"}
|
|
@@ -6,6 +6,6 @@ declare type DQCountryCheckTooltipProps = {
|
|
|
6
6
|
children: ReactElement<any, any>;
|
|
7
7
|
linkToDQPage: string;
|
|
8
8
|
};
|
|
9
|
-
export declare const DQAlertsTooltip:
|
|
9
|
+
export declare const DQAlertsTooltip: ({ alert, alertIcon, children, linkToDQPage, }: DQCountryCheckTooltipProps) => JSX.Element;
|
|
10
10
|
export {};
|
|
11
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,
|
|
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;AAWrC,OAAO,EAAE,KAAK,EAAqC,MAAM,oCAAoC,CAAC;AAqI9F,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,kDAKzB,0BAA0B,KAAG,WA0E/B,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
|
|
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 l from"@material-ui/icons/ArrowForward";import{Tooltip as s}from"../../Tooltip/Tooltip.js";import"../../Tooltip/ScrollableTooltip.js";import{getDeductsFromScoreClass as p,isResolved as c,getDeductsFromScoreValue as m}from"../utils.js";import{ALERT_STATES as d,BADGE_ICON_STATUSES as h}from"../constants.js";import{UniversalLink as g}from"../../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import{useDQUnvalidatedContentStyles as f}from"../styles.js";var u=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,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")}}})),x=function(e){return i.unix(e).format("DD MMM HH:mm (Z)")},y=function(r){var a=r.children,i=u(),n=o(a)({timestampFormatter:x}).split("**").map((function(e,r){return r%2==1?t("b",{children:e}):e}));return t("span",e({className:i.message},{children:n}))},v=function(o){var n,x,v,w=o.alert,b=o.alertIcon,S=o.children,N=o.linkToDQPage,I=u(),k=f({}),M=Math.max(w.statusUpdatedAt,w.lastCheckedAt),T=(void 0===v&&(v="MM/DD/YY hh:mm a"),(x=M)?i.unix(x).format(v):null);return t(s,{isFullScreen:!1,interactive:!0,children:S,PopperProps:{className:I.popover},placement:"right",title:w.emptyMessage?t("div",e({className:I.emptyMessage},{children:w.emptyMessage})):r(a,{children:[r("div",e({className:I.title},{children:[w.name,t(s,e({isFullScreen:!1,title:"Go to Data Quality page"},{children:t("div",{children:t(g,e({className:k.link,href:N},{children:t(l,{className:k.linkIcon})}))})}))]})),r("span",e({className:I.alertInfo},{children:[t("span",{children:"Category:"})," ",w.category]})),r("span",e({className:I.alertInfo},{children:[t("span",{children:"Status:"})," ",w.status]})),r("span",e({className:I.alertInfo},{children:[t("span",{children:"Error Type:"}),t("div",e({className:I.errorIcon},{children:b})),t("span",e({className:w.state===d.issue?h.warning:h.error},{children:w.state}))]})),r("span",e({className:I.alertInfo},{children:[t("span",{children:"Score Deduction:"}),t("span",e({className:p(I,w.deductsFromScore,c(w.status))},{children:m(w.deductsFromScore,c(w.status))}))]})),r("div",e({className:I.alertMessageFull},{children:[w.isThrottled&&t("b",{children:"[Throttled]: "}),t(y,{children:w.message})]})),r("span",e({className:I.alertInfo},{children:[t("span",e({className:I.note},{children:"Note:"}))," ",(null===(n=w.note)||void 0===n?void 0:n.length)?w.note:"—"]})),r("span",e({className:I.alertTime},{children:["Updated at: ",t("span",{children:T})]}))]})})};export{v as DQAlertsTooltip};
|
|
@@ -13,8 +13,7 @@ declare type StatusBadgeProps = {
|
|
|
13
13
|
currentUser: Record<string, any>;
|
|
14
14
|
segment: 'drilling' | 'completion';
|
|
15
15
|
maximized?: boolean;
|
|
16
|
-
statusBadgeContentClassName?: string;
|
|
17
16
|
};
|
|
18
|
-
export declare const StatusBadge: ({ assetsData, appWidth, DQIssueTooltipMaxHeight, iconType, className, lastTimestamp, onReportErrorClick: customOnReportErrorClick, warningData, hasSubscriptionsData, currentUser, segment, maximized,
|
|
17
|
+
export declare const StatusBadge: ({ assetsData, appWidth, DQIssueTooltipMaxHeight, iconType, className, lastTimestamp, onReportErrorClick: customOnReportErrorClick, warningData, hasSubscriptionsData, currentUser, segment, maximized, }: StatusBadgeProps) => JSX.Element;
|
|
19
18
|
export {};
|
|
20
19
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -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;AAqFxF,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,GAAG,OAAO,GAAG,EAAE,CAAC;IAC9C,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,kBAAkB,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACpE,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAClC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACjC,OAAO,EAAE,UAAU,GAAG,YAAY,CAAC;IACnC,SAAS,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/StatusBadge/index.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAkD,SAAS,EAAE,MAAM,aAAa,CAAC;AAqFxF,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,GAAG,OAAO,GAAG,EAAE,CAAC;IAC9C,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,kBAAkB,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACpE,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAClC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACjC,OAAO,EAAE,UAAU,GAAG,YAAY,CAAC;IACnC,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,WAAW,6MAarB,gBAAgB,KAAG,WA8HrB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as
|
|
1
|
+
import{__assign as e}from'./../../ext-esm/tslib/tslib.es6.js';import{jsxs as t,jsx as n,Fragment as o}from"react/jsx-runtime";import{useState as r,useRef as i,useEffect as a}from"react";import s from"moment";import c from"classnames";import{makeStyles as p,Typography as l}from"@material-ui/core";import{Tooltip as m}from"../Tooltip/Tooltip.js";import"../Tooltip/ScrollableTooltip.js";import{WARNING as u,BADGE_ICON_STATUSES as d,MAX_MOBILE_WIDTH as g}from"./constants.js";import{DQStatusIcon as f}from"./components/DQStatusIcon.js";import{DQUnvalidatedContent as x}from"./components/DQUnvalidatedContent.js";import{ReportIssueModal as h}from"./components/ReportIssueModal.js";import{postReportError as b}from"./api.js";var v=window.innerHeight-212,I=p((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,o=e.isIssueTypeIcon;return"12px 0 2px ".concat(t||n||o?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:function(e){return e.maximized?500: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,o=e.isIssueTypeIcon;return t?"rgba(244, 67, 54, 0.1)":n?"rgba(117, 219, 41, 0.2)":o?"rgba(255, 193, 7, 0.16)":"transparent"}}}}})),y=function(p){var y=p.assetsData,T=void 0===y?{}:y,S=p.appWidth,w=p.DQIssueTooltipMaxHeight,D=void 0===w?v:w,_=p.iconType,j=p.className,k=p.lastTimestamp,C=p.onReportErrorClick,E=p.warningData,M=p.hasSubscriptionsData,W=p.currentUser,L=p.segment,N=p.maximized,z=r(!1),Q=z[0],H=z[1],B=r(!1),O=B[0],R=B[1],Y=i(null),U=null==E?void 0:E.message,P=_===d.error,F=_===d.success,J=_===d.issue,q=S<g,A=I({isIconExist:!!_,isSuccessTypeIcon:F,isErrorTypeIcon:P,isIssueTypeIcon:J,maximized:N}),G=i(null),K=function(e){Y.current&&!Y.current.contains(e.target)&&R(!1)};a((function(){return document.addEventListener("click",K),function(){document.removeEventListener("click",K),clearTimeout(G.current)}}),[]);var V=function(){clearTimeout(G.current),R(!0)},X=function(e,t){void 0===t&&(t=700),G.current=setTimeout((function(){return R(!1)}),t)};return a((function(){M&&(V(),X(0,1e4))}),[JSON.stringify(T)]),t("div",e({"data-testid":"Status_badge",className:c(A.statusBadgeWrapper,"c-status-badge--".concat(_),j)},{children:[t("div",e({className:A.statusBadgeContent,ref:Y},{children:[_&&n(m,e({isFullScreen:!1,disableHoverListener:!0,open:O,onMouseEnter:V,onMouseLeave:X,PopperProps:{className:A.popper},placement:"top-start",title:n(x,{tooltipRef:Y,onMouseEnter:V,onMouseLeave:X,assetsData:T,maxHeight:D,onClick:function(){return H(!0)}})},{children:n("div",e({className:A.DQIconWrapper,"data-testid":"".concat("Status_badge","__DQ_icon_").concat(_)},{children:n(f,{color:_,iconType:_})}))})),k&&t(l,e({className:c(A.text,A.timestamp),variant:"body1"},{children:["Last Update: ",s.unix(k).format("M/D/YYYY h:mm a")]})),E&&t(o,{children:[n(m,e({placement:"top",title:U?"".concat(u,". ").concat(U):u},{children:n("div",e({"data-testid":"".concat("Status_badge","__DQ_icon_warning")},{children:n(f,{className:A.badgeIconWarning,color:d.warning,iconType:d.warning})}))})),!q&&n(l,e({className:c(A.text,A.warningMessage),variant:"body1"},{children:U?"".concat(u,". ").concat(U):u}))]})]})),Q&&n(h,{assets:Object.keys(T).map((function(e){return{name:e,id:T[e][0].alert.assetId}})),onSave:C||function(e,t){b(t,e,W,L)},onClose:function(){return H(!1)}})]}))};export{y as StatusBadge};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VirtualizedTable.d.ts","sourceRoot":"","sources":["../../../src/components/VirtualizedTable/VirtualizedTable.tsx"],"names":[],"mappings":";AACA,OAAO,SAAS,MAAM,YAAY,CAAC;AA4FnC,aAAK,8BAA8B,GAAG,SAAS,CAAC,UAAU,CAAC,OAAO,kCAAkC,CAAC,CAAC;AAEtG,eAAO,MAAM,yBAAyB;sQAmBnC,8BAA8B,GAAG,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"VirtualizedTable.d.ts","sourceRoot":"","sources":["../../../src/components/VirtualizedTable/VirtualizedTable.tsx"],"names":[],"mappings":";AACA,OAAO,SAAS,MAAM,YAAY,CAAC;AA4FnC,aAAK,8BAA8B,GAAG,SAAS,CAAC,UAAU,CAAC,OAAO,kCAAkC,CAAC,CAAC;AAEtG,eAAO,MAAM,yBAAyB;sQAmBnC,8BAA8B,GAAG,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6K9C,CAAA;AAED,QAAA,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwCvC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAaF,wBAAgE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as e,__spreadArray as t}from'./../../ext-esm/tslib/tslib.es6.js';import{jsx as r,
|
|
1
|
+
import{__assign as e,__spreadArray as t}from'./../../ext-esm/tslib/tslib.es6.js';import{jsx as r,jsxs as n}from"react/jsx-runtime";import{useMemo as i,useEffect as o}from"react";import a from"prop-types";import l from"classnames";import{Table as s,Column as u,SortDirection as c}from"react-virtualized";import{withStyles as d,IconButton as m,Typography as h,Tooltip as f}from"@material-ui/core";import{Settings as g,Sort as p,ArrowUpward as b,ArrowDownward as y}from"@material-ui/icons";import{getUnitDisplay as w}from"../../utils/convert.js";function S(e,t){var r=e.find((function(e){return e.key===t}))||{},n=r.unitType,i=r.customUnit;return i?"(".concat(i,")"):n?"(".concat(w(n),")"):""}function R(e,t){return(e.find((function(e){return e.key===t}))||{}).headerLabelClassName||""}function x(e,t){return(e.find((function(e){return e.key===t}))||{}).headerLabelUnitClassName||""}var v=function(a){var d=a.columns,w=a.data,v=a.useColumnSetting,C=a.useFixedColumnWidth,_=a.onOpenSettingDlg,z=a.classes,k=a.width,T=a.height,q=a.headerHeight,I=a.rowHeight,N=a.showTopSettingIcon,L=a.customMuiStyles,D=a.isTopSettingIconShownAlways,H=a.CustomCellRenderer,B=a.customRowStyle,W=a.sort,O=a.sortBy,j=a.sortDirection,A=e(e({},z),L),F=i((function(){return{label:"",key:"setting",width:v?25:0}}),[v]),K=i((function(){return d.filter((function(e){return e.show}))}),[d]),V=i((function(){return v?t(t([],K,!0),[F],!1):K}),[K,v,F]),M=i((function(){var e;if(k<=0)return{};var t=((e={})[F.key]=F.width,e),r=[];return K.filter((function(e){return Number.isFinite(e.width)})).forEach((function(e){t[e.key]=e.width-1,r.push(e.width-1)})),K.filter((function(e){return!Number.isFinite(e.width)})).forEach((function(e){var n=r.reduce((function(e,t){return e+t}),0),i=Math.floor((k-n-F.width)/(K.length-r.length)),o=e.minWidth||65,a=i<o?o:i;t[e.key]=a-1,r.push(a-1)})),t}),[k,K,F]),E=i((function(){return Object.values(M).reduce((function(e,t){return e+t}),0)}),[M]),G=D||E-12.5>=k;o((function(){N(G)}),[G]);var U=function(t){var i=t.label,o=t.dataKey,a=O||j||W;return o===F.key?G?null:r(m,e({size:"small","aria-label":"customize columns",className:A.settingIcon,onClick:_},{children:r(g,{fontSize:"inherit"})})):n(h,e({variant:"body2",className:l(A.headerLabel,R(d,o))},{children:[i," ",r("span",e({className:l(A.unitLabel,x(d,o))},{children:S(d,o)})),a&&o!==O&&r(f,e({title:"Sort A-Z"},{children:r(p,{fontSize:"small",className:z.sortIcon})})),a&&o===O&&(j===c.ASC?r(b,{fontSize:"small",className:z.sortIcon}):r(y,{fontSize:"small",className:z.sortIcon}))]}))},P=function(t){var n=t.dataKey,i=t.rowData;return H?r(H,{columnKey:n,value:i[n]}):r(h,e({variant:"body2",className:A.cellData},{children:i[n]}))};return r(s,e({width:C?E:k,height:T,headerHeight:q,rowClassName:function(e){var t,r=e.index;return l(((t={})[A.oddRow]=r%2==1,t))},rowHeight:I,rowCount:w.length,rowGetter:function(e){var t=e.index;return w[t]},rowStyle:B||{},className:A.table,sort:W,sortBy:O,sortDirection:j},{children:V.map((function(e){return r(u,{width:M[e.key]||0,dataKey:e.key,label:e.label,headerRenderer:U,cellRenderer:P},e.key)}))}))},C={columns:a.arrayOf(a.shape({show:a.bool,minWidth:a.number,width:a.number,key:a.string,label:a.string})).isRequired,data:a.arrayOf(a.shape({})).isRequired,useColumnSetting:a.bool.isRequired,useFixedColumnWidth:a.bool.isRequired,headerHeight:a.number.isRequired,rowHeight:a.number.isRequired,width:a.number.isRequired,height:a.number.isRequired,onOpenSettingDlg:a.func.isRequired,showTopSettingIcon:a.func.isRequired,sort:a.func,sortBy:a.string,sortDirection:a.string,classes:a.shape({sortIcon:a.string}).isRequired,customMuiStyles:a.shape({table:a.string,oddRow:a.string,headerLabel:a.string,cellData:a.string,unitLabel:a.string,settingIcon:a.string}).isRequired,isTopSettingIconShownAlways:a.bool.isRequired,CustomCellRenderer:a.func,customRowStyle:a.func};v.propTypes=C,v.defaultProps={CustomCellRenderer:null,customRowStyle:null,sort:null,sortBy:null,sortDirection:null};var _=d((function(e){return{table:{"& .ReactVirtualized__Table__headerRow":{textTransform:"none",borderBottom:e.isLightTheme?"1px solid rgba(224, 224, 224, 1)":"1px solid rgba(81, 81, 81, 1)"},"& .ReactVirtualized__Table__row":{borderBottom:e.isLightTheme?"1px solid rgba(224, 224, 224, 1)":"1px solid rgba(81, 81, 81, 1)"},"& .ReactVirtualized__Table__Grid":{outline:"none"},"& .ReactVirtualized__Table__headerColumn":{outline:"none"}},oddRow:{backgroundColor:e.isLightTheme?"rgba(189, 189, 189, 0.1)":"#303030"},headerLabel:{lineHeight:"14px",fontSize:"12px",fontStyle:"normal",letterSpacing:"-0.25px",display:"flex",alignItems:"center",flexWrap:"wrap"},cellData:{lineHeight:"14px",fontSize:"12px",fontWeight:"normal",fontStyle:"normal",letterSpacing:"0.15px"},unitLabel:{fontSize:"10px",opacity:.5},settingIcon:{padding:"3px",fontSize:"20px"},sortIcon:{fontSize:"16px"}}}))(v);export{v as VirtualizedTableComponent,_ as default};
|
package/package.json
CHANGED
package/utils/bha.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bha.d.ts","sourceRoot":"","sources":["../../src/utils/bha.js"],"names":[],"mappings":"AAwBO,uFASN;AAOM,mDAFK,MAAM,
|
|
1
|
+
{"version":3,"file":"bha.d.ts","sourceRoot":"","sources":["../../src/utils/bha.js"],"names":[],"mappings":"AAwBO,uFASN;AAOM,mDAFK,MAAM,CAWjB;AAEM,uDAKN;AA0BM,yFAoCN;AAuCM,iEAkCN;AAGM,8DAEN;AAEM,iEAoFN;AAYM,gFAqBN;AAEM,wDAuBN"}
|