@corva/ui 0.54.0-4 → 0.54.0-5
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
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/StatusBadge/index.tsx"],"names":[],"mappings":";AAIA,OAAO,EAML,eAAe,EACf,SAAS,EACV,MAAM,oCAAoC,CAAC;AA2D5C,aAAK,gBAAgB,GAAG;IACtB,UAAU,CAAC,EAAE,SAAS,EAAE,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,eAAe,CAAC;IAC3B,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,eAAO,MAAM,WAAW,uEAMrB,gBAAgB,KAAG,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/StatusBadge/index.tsx"],"names":[],"mappings":";AAIA,OAAO,EAML,eAAe,EACf,SAAS,EACV,MAAM,oCAAoC,CAAC;AA2D5C,aAAK,gBAAgB,GAAG;IACtB,UAAU,CAAC,EAAE,SAAS,EAAE,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,eAAe,CAAC;IAC3B,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,eAAO,MAAM,WAAW,uEAMrB,gBAAgB,KAAG,WA+CrB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as t}from'./../../ext-esm/tslib/tslib.es6.js';import{jsx as e,jsxs as n}from"react/jsx-runtime";import a from"moment";import i from"classnames";import{makeStyles as
|
|
1
|
+
import{__assign as t}from'./../../ext-esm/tslib/tslib.es6.js';import{jsx as e,jsxs as n}from"react/jsx-runtime";import a from"moment";import i from"classnames";import{makeStyles as r,Typography as o}from"@material-ui/core";import{Tooltip as p}from"../Tooltip/Tooltip.js";import{TOOLTIPS as s,WARNING as l,ICON_SIZE as c,BADGE_ICON_STATUSES as m,MAX_MOBILE_WIDTH as d}from"./constants.js";import{DQStatusIcon as g}from"./DQStatusIcon.js";import{DQUnvalidatedContent as f}from"./DQUnvalidatedContent.js";var u=r((function(t){return{statusBadgeWrapper:{backgroundColor:t.palette.background.b4,display:"flex",height:30},statusBadgeContent:{display:"flex",flexDirection:function(t){return t.isWarningTypeIcon?"row-reverse":"initial"},justifyContent:function(t){return t.isWarningTypeIcon&&"flex-end"},padding:"12px 0 2px 2px",whiteSpace:"nowrap",width:"calc(100% - 140px)"},text:{fontSize:"10px",lineHeight:"12px",alignSelf:"center"},timestamp:{color:t.palette.primary.text6,marginLeft:function(t){var e=t.isWarningTypeIcon,n=t.isIconType;return!e&&n&&8}},warningMessage:{color:t.palette.primary.text1,marginLeft:4,textOverflow:"ellipsis",overflow:"hidden",fontSize:"12px"},badgeIconWarning:{marginLeft:8},popper:function(e){return{"& .MuiTooltip-tooltip":{maxWidth:455,width:e.isScrollable?455:439,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}}}}})),x=function(r){var x,h=r.assetsData,b=void 0===h?[]:h,v=r.appWidth,y=r.iconType,w=r.lastTimestamp,T=r.warningMessage,W=y==m.warning,S=y==m.error,I=v<d,j=u({isWarningTypeIcon:W,isIconType:!!y,isScrollable:(null==b?void 0:b.length)>5}),C=s[y];return W&&T&&(C="".concat(s[y],". ").concat(T)),S&&(C=e(f,{assetsData:b})),e("div",t({className:j.statusBadgeWrapper},{children:n("div",t({className:j.statusBadgeContent},{children:[W&&!I&&e(o,t({className:i(j.text,j.warningMessage),variant:"body1"},{children:T?"".concat(l,". ").concat(T):l})),y&&e(p,t({interactive:S,PopperProps:S&&{className:j.popper},placement:"top",title:C},{children:e("div",{children:e(g,{className:i((x={},x[j.badgeIconWarning]=W,x)),color:y,iconType:y,size:c.small})})})),n(o,t({className:i(j.text,j.timestamp),variant:"body1"},{children:["Last Update: ",a.unix(w).format("M/D/YYYY h:mm a")]}))]}))}))};export{x as StatusBadge};
|