@corva/ui 0.56.0-rc.1 → 0.56.0-rc.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 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require('./../../ext-esm/tslib/tslib.es6.js'),r=require("react/jsx-runtime"),t=require("react"),s=require("@material-ui/core"),i=require("classnames");require("../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js");var n=require("../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js");require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/objectWithoutProperties"),require("react-router");var a=require("./AssetNameLabel.styles.css.js");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=u(i),c=t.memo((function(i){var u=i.assetName,c=i.classes,o=i.coordinatesPixelWidth,d=i.dataTestId,f=i.href,m=i.icon,h=i.statusBadge,v=t.useState(u),j=v[0],x=v[1],_=t.useRef(),p=t.useRef(),b=t.useRef();return t.useEffect((function(){_.current&&(p.current||(p.current=_.current.scrollWidth),x(o>b.current?u:function(e,r,t){if(r===t)return e;var s=t/e.length,i=Math.floor(r/s),n=Math.floor(i/2),a=Math.max(n-2,2);return e.slice(0,a)+"..."+e.slice(e.length-a)}(u,_.current.clientWidth,p.current)),b.current=o)}),[o,b.current]),r.jsx(s.Tooltip,e.__assign({title:u},{children:r.jsx("div",e.__assign({className:l.default(a.wrapper)},{children:r.jsxs(n.UniversalLink,e.__assign({className:l.default(a.item,null==c?void 0:c.item),"data-testid":d,href:f},{children:[m&&r.jsx("div",e.__assign({className:a.startIcon},{children:m})),r.jsx("span",e.__assign({className:a.assetName,ref:_},{children:j})),h]}))}))}))}));exports.AssetNameLabel=c;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require('./../../ext-esm/tslib/tslib.es6.js'),r=require("react/jsx-runtime"),t=require("react"),s=require("@material-ui/core"),i=require("classnames");require("../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js");var n=require("../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js");require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/objectWithoutProperties"),require("react-router");var a=require("./AssetNameLabel.styles.css.js");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=u(i),c=t.memo((function(i){var u=i.assetName,c=i.classes,o=i.coordinatesPixelWidth,d=i.dataTestId,f=i.href,m=i.icon,h=i.statusBadge,v=t.useState(u),j=v[0],x=v[1],_=t.useRef(),p=t.useRef(),b=t.useRef();return t.useEffect((function(){_.current&&(p.current||(p.current=_.current.scrollWidth),x(o>b.current?u:function(e,r,t){if(r===t)return e;var s=t/e.length,i=Math.floor(r/s),n=Math.floor(i/2),a=Math.max(n-2,2);return e.slice(0,a)+"..."+e.slice(e.length-a)}(u,_.current.clientWidth,p.current)),b.current=o)}),[u,o,b.current]),r.jsx(s.Tooltip,e.__assign({title:u},{children:r.jsx("div",e.__assign({className:l.default(a.wrapper)},{children:r.jsxs(n.UniversalLink,e.__assign({className:l.default(a.item,null==c?void 0:c.item),"data-testid":d,href:f},{children:[m&&r.jsx("div",e.__assign({className:a.startIcon},{children:m})),r.jsx("span",e.__assign({className:a.assetName,ref:_},{children:j})),h]}))}))}))}));exports.AssetNameLabel=c;
@@ -1 +1 @@
1
- import{__assign as e}from'./../../ext-esm/tslib/tslib.es6.js';import{jsx as r,jsxs as t}from"react/jsx-runtime";import{memo as i,useState as n,useRef as s,useEffect as o}from"react";import{Tooltip as a}from"@material-ui/core";import c from"classnames";import"../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import{UniversalLink as l}from"../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/objectWithoutProperties";import"react-router";import m from"./AssetNameLabel.styles.css.js";var u=i((function(i){var u=i.assetName,d=i.classes,p=i.coordinatesPixelWidth,h=i.dataTestId,f=i.href,v=i.icon,b=i.statusBadge,C=n(u),x=C[0],N=C[1],j=s(),D=s(),W=s();return o((function(){j.current&&(D.current||(D.current=j.current.scrollWidth),N(p>W.current?u:function(e,r,t){if(r===t)return e;var i=t/e.length,n=Math.floor(r/i),s=Math.floor(n/2),o=Math.max(s-2,2);return e.slice(0,o)+"..."+e.slice(e.length-o)}(u,j.current.clientWidth,D.current)),W.current=p)}),[p,W.current]),r(a,e({title:u},{children:r("div",e({className:c(m.wrapper)},{children:t(l,e({className:c(m.item,null==d?void 0:d.item),"data-testid":h,href:f},{children:[v&&r("div",e({className:m.startIcon},{children:v})),r("span",e({className:m.assetName,ref:j},{children:x})),b]}))}))}))}));export{u as AssetNameLabel};
1
+ import{__assign as e}from'./../../ext-esm/tslib/tslib.es6.js';import{jsx as r,jsxs as t}from"react/jsx-runtime";import{memo as i,useState as n,useRef as s,useEffect as o}from"react";import{Tooltip as a}from"@material-ui/core";import c from"classnames";import"../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import{UniversalLink as l}from"../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/objectWithoutProperties";import"react-router";import m from"./AssetNameLabel.styles.css.js";var u=i((function(i){var u=i.assetName,d=i.classes,p=i.coordinatesPixelWidth,h=i.dataTestId,f=i.href,v=i.icon,b=i.statusBadge,C=n(u),x=C[0],N=C[1],j=s(),D=s(),W=s();return o((function(){j.current&&(D.current||(D.current=j.current.scrollWidth),N(p>W.current?u:function(e,r,t){if(r===t)return e;var i=t/e.length,n=Math.floor(r/i),s=Math.floor(n/2),o=Math.max(s-2,2);return e.slice(0,o)+"..."+e.slice(e.length-o)}(u,j.current.clientWidth,D.current)),W.current=p)}),[u,p,W.current]),r(a,e({title:u},{children:r("div",e({className:c(m.wrapper)},{children:t(l,e({className:c(m.item,null==d?void 0:d.item),"data-testid":h,href:f},{children:[v&&r("div",e({className:m.startIcon},{children:v})),r("span",e({className:m.assetName,ref:j},{children:x})),b]}))}))}))}));export{u as AssetNameLabel};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corva/ui",
3
- "version": "0.56.0-rc.1",
3
+ "version": "0.56.0-rc.2",
4
4
  "description": "Shared components/utils for Corva ui projects",
5
5
  "keywords": [
6
6
  "corva-ui"