@corva/ui 0.67.0-5 → 0.67.0-7
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 r=require("@babel/runtime/helpers/defineProperty"),e=require("@material-ui/core"),t=require("lodash"),o=require("react"),s=require("../formations.js");function a(r){return r&&"object"==typeof r&&"default"in r?r:{default:r}}var i=a(r);function n(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),t.push.apply(t,o)}return t}function c(r){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?n(Object(t),!0).forEach((function(e){i.default(r,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):n(Object(t)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(t,e))}))}return r}var u=e.makeStyles({axisGrab:{cursor:"grab"},axisCrosshair:{cursor:"crosshair"}});exports.useChartModifier=function(r){var e=r.chart,a=r.chartOptions,i=r.isZoomEnabled,n=r.isMinHeightChart,l=r.handleChartSelection,f=r.onZoomChangeCallback,p=r.isAxesCoordinatesShown,h=u();o.useEffect((function(){if(!t.isEmpty(e)){var r={zIndex:1,color:"#ffffff",dashStyle:"dash"};e.plotBackground.element.style.cursor=n||!i?"grab":"crosshair",e.series.forEach((function(r){return r.group.css({cursor:n||!i?"grab":"crosshair"})})),e.update({chart:c(c({},a),{},{plotBackgroundColor:"transparent",zoomType:n||!i?"none":a.zoomType}),xAxis:{crosshair:p?r:null,className:i?h.axisCrosshair:h.axisGrab,events:{afterSetExtremes:function(r){var t;"zoom"!==r.trigger&&"navigator"!==r.trigger||l(),null!==(t=e.xAxis[0].userOptions.plotLines)&&void 0!==t&&t.length&&s.updateAxisStyles({chart:e}),f(r)}}},yAxis:{crosshair:p?r:null,className:i?h.axisCrosshair:h.axisGrab,events:{afterSetExtremes:function(r){"zoom"!==r.trigger&&"navigator"!==r.trigger||l(),f(r)}}},plotOptions:{series:{cursor:n||!i?"grab":"crosshair"}}})}}),[i,l,p])};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var r=require("@babel/runtime/helpers/defineProperty"),e=require("@material-ui/core"),t=require("lodash"),o=require("react"),s=require("../formations.js");function a(r){return r&&"object"==typeof r&&"default"in r?r:{default:r}}var i=a(r);function n(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),t.push.apply(t,o)}return t}function c(r){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?n(Object(t),!0).forEach((function(e){i.default(r,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):n(Object(t)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(t,e))}))}return r}var u=e.makeStyles({axisGrab:{cursor:"grab"},axisCrosshair:{cursor:"crosshair"}});exports.useChartModifier=function(r){var e=r.chart,a=r.chartOptions,i=r.isZoomEnabled,n=r.isMinHeightChart,l=r.handleChartSelection,f=r.onZoomChangeCallback,p=r.isAxesCoordinatesShown,h=u();o.useEffect((function(){if(!t.isEmpty(e)){var r={zIndex:1,color:"#ffffff",dashStyle:"dash"};e.plotBackground.element.style.cursor=n||!i?"grab":"crosshair",e.series.forEach((function(r){var e;return null==r||null===(e=r.group)||void 0===e?void 0:e.css({cursor:n||!i?"grab":"crosshair"})})),e.update({chart:c(c({},a),{},{plotBackgroundColor:"transparent",zoomType:n||!i?"none":a.zoomType}),xAxis:{crosshair:p?r:null,className:i?h.axisCrosshair:h.axisGrab,events:{afterSetExtremes:function(r){var t;"zoom"!==r.trigger&&"navigator"!==r.trigger||l(),null!==(t=e.xAxis[0].userOptions.plotLines)&&void 0!==t&&t.length&&s.updateAxisStyles({chart:e}),f(r)}}},yAxis:{crosshair:p?r:null,className:i?h.axisCrosshair:h.axisGrab,events:{afterSetExtremes:function(r){"zoom"!==r.trigger&&"navigator"!==r.trigger||l(),f(r)}}},plotOptions:{series:{cursor:n||!i?"grab":"crosshair"}}})}}),[i,l,p])};
|
|
@@ -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"),o=require("moment"),a=require("classnames"),
|
|
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"),o=require("moment"),a=require("classnames"),i=require("@material-ui/core"),s=require("../Tooltip/Tooltip.js");require("../Tooltip/ScrollableTooltip.js");var r=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 m=d(o),g=d(a),f=window.innerHeight-212,x=i.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,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:400},"& .MuiTooltip-tooltip":{position:"absolute",bottom:function(e){return e.tooltipPlacement.includes("top")?0:"auto"},top:function(e){return e.tooltipPlacement.includes("bottom")?0:"auto"},left:function(e){return e.tooltipPlacement.includes("right")?0:"auto"},right:function(e){return e.tooltipPlacement.includes("left")?0:"auto"},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"}}}}}));exports.StatusBadge=function(o){var a=o.assetsData,d=void 0===a?{}:a,_=o.setAssetsData,S=void 0===_?function(){}:_,I=o.appWidth,T=o.DQIssueTooltipMaxHeight,h=void 0===T?f:T,b=o.iconType,v=o.className,y=o.lastTimestamp,j=o.onReportErrorClick,E=o.warningData,N=o.hasSubscriptionsData,D=o.currentUser,C=o.segment,w=o.maximized,A=o.statusBadgeContentClassName,W=o.tooltipPlacement,M=void 0===W?"top-start":W,q=n.useState(!1),B=q[0],R=q[1],k=n.useState(!1),O=k[0],L=k[1],Q=n.useRef(null),G=null==E?void 0:E.message,P=b===r.BADGE_ICON_STATUSES.error,U=b===r.BADGE_ICON_STATUSES.success,z=b===r.BADGE_ICON_STATUSES.issue,H=I<r.MAX_MOBILE_WIDTH,Y=x({isIconExist:!!b,isSuccessTypeIcon:U,isErrorTypeIcon:P,isIssueTypeIcon:z,maximized:w,tooltipPlacement:M}),F=n.useRef(null),J=function(e){Q.current&&!Q.current.contains(e.target)&&L(!1)};n.useEffect((function(){return function(){S({hasSubscriptionsData:!1})}}),[]),n.useEffect((function(){return document.addEventListener("click",J),function(){document.removeEventListener("click",J),clearTimeout(F.current)}}),[]);var X=function(){clearTimeout(F.current),L(!0)},K=function(e,t){void 0===t&&(t=700),F.current=setTimeout((function(){return L(!1)}),t)};return n.useEffect((function(){N&&(X(),K(0,1e4))}),[JSON.stringify(d)]),t.jsxs("div",e.__assign({"data-testid":"Status_badge",className:g.default(Y.statusBadgeWrapper,"c-status-badge--".concat(b),v)},{children:[t.jsxs("div",e.__assign({className:g.default(Y.statusBadgeContent,A),ref:Q},{children:[b&&t.jsx(s.Tooltip,e.__assign({disableHoverListener:!0,open:O,onMouseEnter:X,onMouseLeave:K,PopperProps:{className:Y.popper},placement:M,title:t.jsx(u.DQUnvalidatedContent,{tooltipRef:Q,onMouseEnter:X,onMouseLeave:K,assetsData:d,maxHeight:h,onClick:function(){return R(!0)}})},{children:t.jsx("div",e.__assign({className:Y.DQIconWrapper,"data-testid":"".concat("Status_badge","__DQ_icon_").concat(b)},{children:t.jsx(c.DQStatusIcon,{color:b,iconType:b})}))})),Number.isFinite(y)&&t.jsxs(i.Typography,e.__assign({className:g.default(Y.text,Y.timestamp),variant:"body1"},{children:["Last Update: ",m.default.unix(y).format("M/D/YYYY h:mm a")]})),E&&t.jsxs(t.Fragment,{children:[t.jsx(s.Tooltip,e.__assign({placement:"top",title:G?"".concat(r.WARNING,". ").concat(G):r.WARNING},{children:t.jsx("div",e.__assign({"data-testid":"".concat("Status_badge","__DQ_icon_warning")},{children:t.jsx(c.DQStatusIcon,{className:Y.badgeIconWarning,color:r.BADGE_ICON_STATUSES.warning,iconType:r.BADGE_ICON_STATUSES.warning})}))})),!H&&t.jsx(i.Typography,e.__assign({className:g.default(Y.text,Y.warningMessage),variant:"body1"},{children:G?"".concat(r.WARNING,". ").concat(G):r.WARNING}))]})]})),B&&t.jsx(l.ReportIssueModal,{assets:Object.keys(d).map((function(e){return{name:e,id:d[e][0].alert.assetId}})),onSave:j||function(e,t){p.postReportError(t,e,D,C)},onClose:function(){return R(!1)}})]}))};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import r from"@babel/runtime/helpers/defineProperty";import{makeStyles as e}from"@material-ui/core";import{isEmpty as o}from"lodash";import{useEffect as t}from"react";import{updateAxisStyles as s}from"../formations.js";function a(r,e){var o=Object.keys(r);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(r);e&&(t=t.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),o.push.apply(o,t)}return o}function i(e){for(var o=1;o<arguments.length;o++){var t=null!=arguments[o]?arguments[o]:{};o%2?a(Object(t),!0).forEach((function(o){r(e,o,t[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):a(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}var n=e({axisGrab:{cursor:"grab"},axisCrosshair:{cursor:"crosshair"}}),c=function(r){var e=r.chart,a=r.chartOptions,c=r.isZoomEnabled,l=r.isMinHeightChart,p=r.handleChartSelection,f=r.onZoomChangeCallback,u=r.isAxesCoordinatesShown,h=n();t((function(){if(!o(e)){var r={zIndex:1,color:"#ffffff",dashStyle:"dash"};e.plotBackground.element.style.cursor=l||!c?"grab":"crosshair",e.series.forEach((function(r){return r.group.css({cursor:l||!c?"grab":"crosshair"})})),e.update({chart:i(i({},a),{},{plotBackgroundColor:"transparent",zoomType:l||!c?"none":a.zoomType}),xAxis:{crosshair:u?r:null,className:c?h.axisCrosshair:h.axisGrab,events:{afterSetExtremes:function(r){var o;"zoom"!==r.trigger&&"navigator"!==r.trigger||p(),null!==(o=e.xAxis[0].userOptions.plotLines)&&void 0!==o&&o.length&&s({chart:e}),f(r)}}},yAxis:{crosshair:u?r:null,className:c?h.axisCrosshair:h.axisGrab,events:{afterSetExtremes:function(r){"zoom"!==r.trigger&&"navigator"!==r.trigger||p(),f(r)}}},plotOptions:{series:{cursor:l||!c?"grab":"crosshair"}}})}}),[c,p,u])};export{c as useChartModifier};
|
|
1
|
+
import r from"@babel/runtime/helpers/defineProperty";import{makeStyles as e}from"@material-ui/core";import{isEmpty as o}from"lodash";import{useEffect as t}from"react";import{updateAxisStyles as s}from"../formations.js";function a(r,e){var o=Object.keys(r);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(r);e&&(t=t.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),o.push.apply(o,t)}return o}function i(e){for(var o=1;o<arguments.length;o++){var t=null!=arguments[o]?arguments[o]:{};o%2?a(Object(t),!0).forEach((function(o){r(e,o,t[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):a(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}var n=e({axisGrab:{cursor:"grab"},axisCrosshair:{cursor:"crosshair"}}),c=function(r){var e=r.chart,a=r.chartOptions,c=r.isZoomEnabled,l=r.isMinHeightChart,p=r.handleChartSelection,f=r.onZoomChangeCallback,u=r.isAxesCoordinatesShown,h=n();t((function(){if(!o(e)){var r={zIndex:1,color:"#ffffff",dashStyle:"dash"};e.plotBackground.element.style.cursor=l||!c?"grab":"crosshair",e.series.forEach((function(r){var e;return null==r||null===(e=r.group)||void 0===e?void 0:e.css({cursor:l||!c?"grab":"crosshair"})})),e.update({chart:i(i({},a),{},{plotBackgroundColor:"transparent",zoomType:l||!c?"none":a.zoomType}),xAxis:{crosshair:u?r:null,className:c?h.axisCrosshair:h.axisGrab,events:{afterSetExtremes:function(r){var o;"zoom"!==r.trigger&&"navigator"!==r.trigger||p(),null!==(o=e.xAxis[0].userOptions.plotLines)&&void 0!==o&&o.length&&s({chart:e}),f(r)}}},yAxis:{crosshair:u?r:null,className:c?h.axisCrosshair:h.axisGrab,events:{afterSetExtremes:function(r){"zoom"!==r.trigger&&"navigator"!==r.trigger||p(),f(r)}}},plotOptions:{series:{cursor:l||!c?"grab":"crosshair"}}})}}),[c,p,u])};export{c as useChartModifier};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as t}from'./../../ext-esm/tslib/tslib.es6.js';import{jsxs as e,jsx as n,Fragment as o}from"react/jsx-runtime";import{useState as i,useRef as r,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 u}from"../Tooltip/Tooltip.js";import"../Tooltip/ScrollableTooltip.js";import{WARNING as m,BADGE_ICON_STATUSES as d,MAX_MOBILE_WIDTH as f}from"./constants.js";import{DQStatusIcon as g}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(t){return{statusBadgeWrapper:{backgroundColor:t.palette.background.b4,display:"flex",height:30},statusBadgeContent:{display:"flex",padding:function(t){var e=t.isSuccessTypeIcon,n=t.isErrorTypeIcon,o=t.isIssueTypeIcon;return"12px 0 2px ".concat(e||n||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:function(t){return t.maximized?500:400},"& .MuiTooltip-tooltip":{position:"absolute",bottom:function(t){return t.tooltipPlacement.includes("top")?0:"auto"},top:function(t){return t.tooltipPlacement.includes("bottom")?0:"auto"},left:function(t){return t.tooltipPlacement.includes("right")?0:"auto"},right:function(t){return t.tooltipPlacement.includes("left")?0:"auto"},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,n=t.isSuccessTypeIcon,o=t.isIssueTypeIcon;return e?"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.setAssetsData,w=void 0===S?function(){}:S,D=p.appWidth,C=p.DQIssueTooltipMaxHeight,_=void 0===C?v:C,j=p.iconType,
|
|
1
|
+
import{__assign as t}from'./../../ext-esm/tslib/tslib.es6.js';import{jsxs as e,jsx as n,Fragment as o}from"react/jsx-runtime";import{useState as i,useRef as r,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 u}from"../Tooltip/Tooltip.js";import"../Tooltip/ScrollableTooltip.js";import{WARNING as m,BADGE_ICON_STATUSES as d,MAX_MOBILE_WIDTH as f}from"./constants.js";import{DQStatusIcon as g}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(t){return{statusBadgeWrapper:{backgroundColor:t.palette.background.b4,display:"flex",height:30},statusBadgeContent:{display:"flex",padding:function(t){var e=t.isSuccessTypeIcon,n=t.isErrorTypeIcon,o=t.isIssueTypeIcon;return"12px 0 2px ".concat(e||n||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:function(t){return t.maximized?500:400},"& .MuiTooltip-tooltip":{position:"absolute",bottom:function(t){return t.tooltipPlacement.includes("top")?0:"auto"},top:function(t){return t.tooltipPlacement.includes("bottom")?0:"auto"},left:function(t){return t.tooltipPlacement.includes("right")?0:"auto"},right:function(t){return t.tooltipPlacement.includes("left")?0:"auto"},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,n=t.isSuccessTypeIcon,o=t.isIssueTypeIcon;return e?"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.setAssetsData,w=void 0===S?function(){}:S,D=p.appWidth,C=p.DQIssueTooltipMaxHeight,_=void 0===C?v:C,j=p.iconType,N=p.className,k=p.lastTimestamp,E=p.onReportErrorClick,M=p.warningData,W=p.hasSubscriptionsData,L=p.currentUser,P=p.segment,z=p.maximized,Q=p.statusBadgeContentClassName,H=p.tooltipPlacement,B=void 0===H?"top-start":H,O=i(!1),R=O[0],Y=O[1],U=i(!1),A=U[0],F=U[1],J=r(null),q=null==M?void 0:M.message,G=j===d.error,K=j===d.success,V=j===d.issue,X=D<f,Z=I({isIconExist:!!j,isSuccessTypeIcon:K,isErrorTypeIcon:G,isIssueTypeIcon:V,maximized:z,tooltipPlacement:B}),$=r(null),tt=function(t){J.current&&!J.current.contains(t.target)&&F(!1)};a((function(){return function(){w({hasSubscriptionsData:!1})}}),[]),a((function(){return document.addEventListener("click",tt),function(){document.removeEventListener("click",tt),clearTimeout($.current)}}),[]);var et=function(){clearTimeout($.current),F(!0)},nt=function(t,e){void 0===e&&(e=700),$.current=setTimeout((function(){return F(!1)}),e)};return a((function(){W&&(et(),nt(0,1e4))}),[JSON.stringify(T)]),e("div",t({"data-testid":"Status_badge",className:c(Z.statusBadgeWrapper,"c-status-badge--".concat(j),N)},{children:[e("div",t({className:c(Z.statusBadgeContent,Q),ref:J},{children:[j&&n(u,t({disableHoverListener:!0,open:A,onMouseEnter:et,onMouseLeave:nt,PopperProps:{className:Z.popper},placement:B,title:n(x,{tooltipRef:J,onMouseEnter:et,onMouseLeave:nt,assetsData:T,maxHeight:_,onClick:function(){return Y(!0)}})},{children:n("div",t({className:Z.DQIconWrapper,"data-testid":"".concat("Status_badge","__DQ_icon_").concat(j)},{children:n(g,{color:j,iconType:j})}))})),Number.isFinite(k)&&e(l,t({className:c(Z.text,Z.timestamp),variant:"body1"},{children:["Last Update: ",s.unix(k).format("M/D/YYYY h:mm a")]})),M&&e(o,{children:[n(u,t({placement:"top",title:q?"".concat(m,". ").concat(q):m},{children:n("div",t({"data-testid":"".concat("Status_badge","__DQ_icon_warning")},{children:n(g,{className:Z.badgeIconWarning,color:d.warning,iconType:d.warning})}))})),!X&&n(l,t({className:c(Z.text,Z.warningMessage),variant:"body1"},{children:q?"".concat(m,". ").concat(q):m}))]})]})),R&&n(h,{assets:Object.keys(T).map((function(t){return{name:t,id:T[t][0].alert.assetId}})),onSave:E||function(t,e){b(e,t,L,P)},onClose:function(){return Y(!1)}})]}))};export{y as StatusBadge};
|