@corva/ui 0.61.0-1 → 0.61.0-2
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/DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js +1 -1
- package/cjs-bundle/components/StatusBadge/index.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.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";require('./../../../ext-esm/style-inject/dist/style-inject.es.js')(".DevCenterAppContainer_container__6zeRh{background-color:#201f1f;bottom:0;left:0;overflow:hidden;position:absolute;right:0;top:0}.dc-app-container__light-theme{background-color:#fff;box-shadow:inset 0 0 0 2px #ccc;color:rgba(0,0,0,.87)}.dc-app-container__pdf-report{zoom:.5}.c-dashboard-report__app--light-theme,.dc-app-container__light-theme{scrollbar-color:hsla(0,0%,50%,.6) transparent!important}.DevCenterAppContainer_containerContent__Jxol2{height:100%;overflow:hidden;width:100%}.DevCenterAppContainer_containerMaximized__rJ5mZ{bottom:10px;box-shadow:0 0 18px 3px rgba(0,0,0,.75);height:auto;left:10px;overflow:hidden;position:fixed;right:10px;top:10px;width:auto;z-index:500}.DevCenterAppContainer_containerMaximized__rJ5mZ .DevCenterAppContainer_containerContent__Jxol2{margin-right:28px;width:auto}.DevCenterAppContainer_footerIconButton__4XZ-y{margin-right:4px!important}"),module.exports={container:"DevCenterAppContainer_container__6zeRh",containerContent:"DevCenterAppContainer_containerContent__Jxol2",containerMaximized:"DevCenterAppContainer_containerMaximized__rJ5mZ",footerIconButton:"DevCenterAppContainer_footerIconButton__4XZ-y"};
|
|
1
|
+
"use strict";require('./../../../ext-esm/style-inject/dist/style-inject.es.js')(".DevCenterAppContainer_container__6zeRh{background-color:#201f1f;bottom:0;left:0;overflow:hidden;position:absolute;right:0;top:0}.dc-app-container__light-theme{background-color:#fff;box-shadow:inset 0 0 0 2px #ccc;color:rgba(0,0,0,.87)}.dc-app-container__pdf-report{zoom:.5}.c-dashboard-report__app--light-theme,.dc-app-container__light-theme{scrollbar-color:hsla(0,0%,50%,.6) transparent!important}.DevCenterAppContainer_dc-app-container__FBbdv:has(.DevCenterAppContainer_c-status-badge--error__CdoM3){border:1px solid var(--palette-error-main)}.DevCenterAppContainer_containerContent__Jxol2{height:100%;overflow:hidden;width:100%}.DevCenterAppContainer_containerMaximized__rJ5mZ{bottom:10px;box-shadow:0 0 18px 3px rgba(0,0,0,.75);height:auto;left:10px;overflow:hidden;position:fixed;right:10px;top:10px;width:auto;z-index:500}.DevCenterAppContainer_containerMaximized__rJ5mZ .DevCenterAppContainer_containerContent__Jxol2{margin-right:28px;width:auto}.DevCenterAppContainer_footerIconButton__4XZ-y{margin-right:4px!important}"),module.exports={container:"DevCenterAppContainer_container__6zeRh","dc-app-container":"DevCenterAppContainer_dc-app-container__FBbdv","c-status-badge--error":"DevCenterAppContainer_c-status-badge--error__CdoM3",containerContent:"DevCenterAppContainer_containerContent__Jxol2",containerMaximized:"DevCenterAppContainer_containerMaximized__rJ5mZ",footerIconButton:"DevCenterAppContainer_footerIconButton__4XZ-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"),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/ReportIssueModal.js");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=d(n),g=d(s),x=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:{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,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=n.assetsData,d=void 0===s?{}:s,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})}))})),h&&t.jsxs(r.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(r.Typography,e.__assign({className:g.default(E.text,E.warningMessage),variant:"body1"},{children:v?"".concat(i.WARNING,". ").concat(v):i.WARNING}))]})]})),t.jsx(l.ReportIssueModal,{assets:Object.keys(d).map((function(e){return{name:e,id:d[e][0].alert.assetId}})),open:y,onSave:I,onClose:function(){return j(!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/ReportIssueModal.js");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=d(n),g=d(s),x=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:{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,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=n.assetsData,d=void 0===s?{}:s,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,"c-status-badge--".concat(f),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})}))})),h&&t.jsxs(r.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(r.Typography,e.__assign({className:g.default(E.text,E.warningMessage),variant:"body1"},{children:v?"".concat(i.WARNING,". ").concat(v):i.WARNING}))]})]})),t.jsx(l.ReportIssueModal,{assets:Object.keys(d).map((function(e){return{name:e,id:d[e][0].alert.assetId}})),open:y,onSave:I,onClose:function(){return j(!1)}})]}))};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from'./../../../ext-esm/style-inject/dist/style-inject.es.js';var t={container:"DevCenterAppContainer_container__6zeRh",containerContent:"DevCenterAppContainer_containerContent__Jxol2",containerMaximized:"DevCenterAppContainer_containerMaximized__rJ5mZ",footerIconButton:"DevCenterAppContainer_footerIconButton__4XZ-y"};e(".DevCenterAppContainer_container__6zeRh{background-color:#201f1f;bottom:0;left:0;overflow:hidden;position:absolute;right:0;top:0}.dc-app-container__light-theme{background-color:#fff;box-shadow:inset 0 0 0 2px #ccc;color:rgba(0,0,0,.87)}.dc-app-container__pdf-report{zoom:.5}.c-dashboard-report__app--light-theme,.dc-app-container__light-theme{scrollbar-color:hsla(0,0%,50%,.6) transparent!important}.DevCenterAppContainer_containerContent__Jxol2{height:100%;overflow:hidden;width:100%}.DevCenterAppContainer_containerMaximized__rJ5mZ{bottom:10px;box-shadow:0 0 18px 3px rgba(0,0,0,.75);height:auto;left:10px;overflow:hidden;position:fixed;right:10px;top:10px;width:auto;z-index:500}.DevCenterAppContainer_containerMaximized__rJ5mZ .DevCenterAppContainer_containerContent__Jxol2{margin-right:28px;width:auto}.DevCenterAppContainer_footerIconButton__4XZ-y{margin-right:4px!important}");export{t as default};
|
|
1
|
+
import e from'./../../../ext-esm/style-inject/dist/style-inject.es.js';var t={container:"DevCenterAppContainer_container__6zeRh","dc-app-container":"DevCenterAppContainer_dc-app-container__FBbdv","c-status-badge--error":"DevCenterAppContainer_c-status-badge--error__CdoM3",containerContent:"DevCenterAppContainer_containerContent__Jxol2",containerMaximized:"DevCenterAppContainer_containerMaximized__rJ5mZ",footerIconButton:"DevCenterAppContainer_footerIconButton__4XZ-y"};e(".DevCenterAppContainer_container__6zeRh{background-color:#201f1f;bottom:0;left:0;overflow:hidden;position:absolute;right:0;top:0}.dc-app-container__light-theme{background-color:#fff;box-shadow:inset 0 0 0 2px #ccc;color:rgba(0,0,0,.87)}.dc-app-container__pdf-report{zoom:.5}.c-dashboard-report__app--light-theme,.dc-app-container__light-theme{scrollbar-color:hsla(0,0%,50%,.6) transparent!important}.DevCenterAppContainer_dc-app-container__FBbdv:has(.DevCenterAppContainer_c-status-badge--error__CdoM3){border:1px solid var(--palette-error-main)}.DevCenterAppContainer_containerContent__Jxol2{height:100%;overflow:hidden;width:100%}.DevCenterAppContainer_containerMaximized__rJ5mZ{bottom:10px;box-shadow:0 0 18px 3px rgba(0,0,0,.75);height:auto;left:10px;overflow:hidden;position:fixed;right:10px;top:10px;width:auto;z-index:500}.DevCenterAppContainer_containerMaximized__rJ5mZ .DevCenterAppContainer_containerContent__Jxol2{margin-right:28px;width:auto}.DevCenterAppContainer_footerIconButton__4XZ-y{margin-right:4px!important}");export{t as default};
|
|
@@ -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,WAqFrB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
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:{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"}}}}})),h=function(s){var h=s.assetsData,b=void 0===h?{}:h,v=s.appWidth,y=s.DQIssueTooltipMaxHeight,I=s.iconType,S=s.className,T=s.lastTimestamp,w=s.onReportErrorClick,D=s.warningData,_=n(!1),j=_[0],C=_[1],W=null==D?void 0:D.message,k=I==m.error,N=I==m.success,Q=v<d,E=x({isIconExist:!!I,isSuccessTypeIcon:N,isErrorTypeIcon:k});return e("div",t({"data-testid":"Status_badge",className:i(E.statusBadgeWrapper,S)},{children:[e("div",t({className:E.statusBadgeContent},{children:[I&&o(p,t({leaveDelay:200,interactive:!0,PopperProps:{className:E.popper},placement:"top-start",title:o(u,{assetsData:b,maxHeight:y,onClick:function(){return C(!0)}})},{children:o("div",t({className:E.DQIconWrapper,"data-testid":"".concat("Status_badge","__DQ_icon_").concat(I)},{children:o(g,{color:I,iconType:I})}))})),T&&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}))]})]})),o(f,{assets:Object.keys(b).map((function(t){return{name:t,id:b[t][0].alert.assetId}})),open:j,onSave:w,onClose:function(){return C(!1)}})]}))};export{h 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:{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"}}}}})),h=function(s){var h=s.assetsData,b=void 0===h?{}:h,v=s.appWidth,y=s.DQIssueTooltipMaxHeight,I=s.iconType,S=s.className,T=s.lastTimestamp,w=s.onReportErrorClick,D=s.warningData,_=n(!1),j=_[0],C=_[1],W=null==D?void 0:D.message,k=I==m.error,N=I==m.success,Q=v<d,E=x({isIconExist:!!I,isSuccessTypeIcon:N,isErrorTypeIcon:k});return e("div",t({"data-testid":"Status_badge",className:i(E.statusBadgeWrapper,"c-status-badge--".concat(I),S)},{children:[e("div",t({className:E.statusBadgeContent},{children:[I&&o(p,t({leaveDelay:200,interactive:!0,PopperProps:{className:E.popper},placement:"top-start",title:o(u,{assetsData:b,maxHeight:y,onClick:function(){return C(!0)}})},{children:o("div",t({className:E.DQIconWrapper,"data-testid":"".concat("Status_badge","__DQ_icon_").concat(I)},{children:o(g,{color:I,iconType:I})}))})),T&&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}))]})]})),o(f,{assets:Object.keys(b).map((function(t){return{name:t,id:b[t][0].alert.assetId}})),open:j,onSave:w,onClose:function(){return C(!1)}})]}))};export{h as StatusBadge};
|