@corva/ui 0.54.0-1 → 0.54.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.
@@ -1,3 +1,4 @@
1
+ export declare const MAX_MOBILE_WIDTH = 959;
1
2
  export declare type BadgeIconStatus = 'warning' | 'error' | 'success';
2
3
  export declare type AssetData = {
3
4
  status: BadgeIconStatus;
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/components/StatusBadge/constants.ts"],"names":[],"mappings":"AAIA,oBAAY,eAAe,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;AAE9D,oBAAY,SAAS,GAAG;IACtB,MAAM,EAAE,eAAe,CAAC;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF,aAAK,iBAAiB,GAAG;IACvB,OAAO,EAAE,SAAS,CAAC;IACnB,OAAO,EAAE,SAAS,CAAC;IACnB,KAAK,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,iBAIjC,CAAC;AAEF,eAAO,MAAM,WAAW;;;;;CAKvB,CAAC;AAEF,eAAO,MAAM,OAAO,kEAAkE,CAAC;AAEvF,eAAO,MAAM,QAAQ;;;CAGpB,CAAA;AAED,aAAK,YAAY,GAAG;IAAE,KAAK,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,CAAC;AAEvD,eAAO,MAAM,SAAS,EAAE,YAGvB,CAAC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/components/StatusBadge/constants.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,gBAAgB,MAAM,CAAC;AAEpC,oBAAY,eAAe,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;AAE9D,oBAAY,SAAS,GAAG;IACtB,MAAM,EAAE,eAAe,CAAC;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF,aAAK,iBAAiB,GAAG;IACvB,OAAO,EAAE,SAAS,CAAC;IACnB,OAAO,EAAE,SAAS,CAAC;IACnB,KAAK,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,iBAIjC,CAAC;AAEF,eAAO,MAAM,WAAW;;;;;CAKvB,CAAC;AAEF,eAAO,MAAM,OAAO,kEAAkE,CAAC;AAEvF,eAAO,MAAM,QAAQ;;;CAGpB,CAAA;AAED,aAAK,YAAY,GAAG;IAAE,KAAK,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,CAAC;AAEvD,eAAO,MAAM,SAAS,EAAE,YAGvB,CAAC"}
@@ -1 +1 @@
1
- import r from"@material-ui/icons/Warning";import{GppGoodIcon as s}from"../Icons/GppGoodIcon.js";import{GppBadIcon as a}from"../Icons/GppBadIcon.js";var n,o,e={success:"success",warning:"warning",error:"error"},i=((n={})[e.success]=s,n[e.warning]=r,n.DQWarning=a,n[e.error]=a,n),c="Recommendations may be incorrect based on data quality errors",m=((o={})[e.success]="Everything is Validated",o[e.warning]=c,o),t={small:"small",large:"large"};export{i as BADGE_ICONS,e as BADGE_ICON_STATUSES,t as ICON_SIZE,m as TOOLTIPS,c as WARNING};
1
+ import r from"@material-ui/icons/Warning";import{GppGoodIcon as s}from"../Icons/GppGoodIcon.js";import{GppBadIcon as a}from"../Icons/GppBadIcon.js";var n,o,e=959,i={success:"success",warning:"warning",error:"error"},c=((n={})[i.success]=s,n[i.warning]=r,n.DQWarning=a,n[i.error]=a,n),m="Recommendations may be incorrect based on data quality errors",t=((o={})[i.success]="Everything is Validated",o[i.warning]=m,o),g={small:"small",large:"large"};export{c as BADGE_ICONS,i as BADGE_ICON_STATUSES,g as ICON_SIZE,e as MAX_MOBILE_WIDTH,t as TOOLTIPS,m as WARNING};
@@ -2,11 +2,11 @@
2
2
  import { BadgeIconStatus, AssetData } from '~/components/StatusBadge/constants';
3
3
  declare type StatusBadgeProps = {
4
4
  assetsData?: AssetData[];
5
+ appWidth: number;
5
6
  iconType?: BadgeIconStatus;
6
- isMobile: boolean;
7
7
  lastTimestamp: number;
8
8
  warningMessage?: string;
9
9
  };
10
- export declare const StatusBadge: ({ assetsData, iconType, isMobile, lastTimestamp, warningMessage, }: StatusBadgeProps) => JSX.Element;
10
+ export declare const StatusBadge: ({ assetsData, appWidth, iconType, lastTimestamp, warningMessage, }: StatusBadgeProps) => JSX.Element;
11
11
  export {};
12
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/StatusBadge/index.tsx"],"names":[],"mappings":";AAIA,OAAO,EAKL,eAAe,EACf,SAAS,EACV,MAAM,oCAAoC,CAAC;AA2D5C,aAAK,gBAAgB,GAAG;IACtB,UAAU,CAAC,EAAE,SAAS,EAAE,CAAC;IACzB,QAAQ,CAAC,EAAE,eAAe,CAAC;IAC3B,QAAQ,EAAE,OAAO,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,eAAO,MAAM,WAAW,uEAMrB,gBAAgB,KAAG,WA6CrB,CAAC"}
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,WA8CrB,CAAC"}
@@ -1 +1 @@
1
- import{__assign as e}from'./../../ext-esm/tslib/tslib.es6.js';import{jsx as t,jsxs as n}from"react/jsx-runtime";import a from"moment";import i from"classnames";import{makeStyles as o,Typography as r}from"@material-ui/core";import{Tooltip as s}from"../Tooltip/Tooltip.js";import{TOOLTIPS as p,WARNING as l,ICON_SIZE as c,BADGE_ICON_STATUSES as m}from"./constants.js";import{DQStatusIcon as d}from"./DQStatusIcon.js";import{DQUnvalidatedContent as g}from"./DQUnvalidatedContent.js";var f=o((function(e){return{statusBadgeWrapper:{backgroundColor:e.palette.background.b4,display:"flex",height:30},statusBadgeContent:{display:"flex",flexDirection:function(e){return e.isWarningTypeIcon?"row-reverse":"initial"},justifyContent:function(e){return e.isWarningTypeIcon&&"flex-end"},padding:"12px 0 2px 2px",whiteSpace:"nowrap",width:"calc(100% - 140px)"},text:{fontSize:"10px",lineHeight:"12px",alignSelf:"center"},timestamp:{color:e.palette.primary.text6,marginLeft:function(e){var t=e.isWarningTypeIcon,n=e.isIconType;return!t&&n&&8}},warningMessage:{color:e.palette.primary.text1,marginLeft:4,textOverflow:"ellipsis",overflow:"hidden",fontSize:"12px"},badgeIconWarning:{marginLeft:8},popper:function(t){return{"& .MuiTooltip-tooltip":{maxWidth:455,width:t.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:e.palette.background.b9}}}}})),u=function(o){var u,x=o.assetsData,h=void 0===x?[]:x,b=o.iconType,y=o.isMobile,v=o.lastTimestamp,w=o.warningMessage,T=b==m.warning,S=b==m.error,W=f({isWarningTypeIcon:T,isIconType:!!b,isScrollable:(null==h?void 0:h.length)>5}),I=p[b];return T&&w&&(I="".concat(p[b],". ").concat(w)),S&&(I=t(g,{assetsData:h})),t("div",e({className:W.statusBadgeWrapper},{children:n("div",e({className:W.statusBadgeContent},{children:[T&&!y&&t(r,e({className:i(W.text,W.warningMessage),variant:"body1"},{children:w?"".concat(l,". ").concat(w):l})),b&&t(s,e({PopperProps:S&&{className:W.popper},placement:"top",title:I},{children:t("div",{children:t(d,{className:i((u={},u[W.badgeIconWarning]=T,u)),color:b,iconType:b,size:c.small})})})),n(r,e({className:i(W.text,W.timestamp),variant:"body1"},{children:["Last Update: ",a.unix(v).format("M/D/YYYY h:mm a")]}))]}))}))};export{u as StatusBadge};
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 o,Typography as r}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=o((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(o){var x,h=o.assetsData,b=void 0===h?[]:h,y=o.appWidth,v=o.iconType,w=o.lastTimestamp,T=o.warningMessage,W=v==m.warning,S=v==m.error,I=y<d,j=u({isWarningTypeIcon:W,isIconType:!!v,isScrollable:(null==b?void 0:b.length)>5}),C=s[v];return W&&T&&(C="".concat(s[v],". ").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(r,t({className:i(j.text,j.warningMessage),variant:"body1"},{children:T?"".concat(l,". ").concat(T):l})),v&&e(p,t({PopperProps:S&&{className:j.popper},placement:"top",title:C},{children:e("div",{children:e(g,{className:i((x={},x[j.badgeIconWarning]=W,x)),color:v,iconType:v,size:c.small})})})),n(r,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};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corva/ui",
3
- "version": "0.54.0-1",
3
+ "version": "0.54.0-2",
4
4
  "description": "Shared components/utils for Corva ui projects",
5
5
  "keywords": [
6
6
  "corva-ui"