@infinilabs/entity-ui 0.0.3 → 0.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.
- package/dist/entity-ui.cjs +10 -9
- package/dist/entity-ui.js +397 -382
- package/dist/index.d.ts +4 -1
- package/package.json +1 -1
- package/dist/style.css +0 -1
package/dist/entity-ui.cjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode("._entityCard_1xtgw_1{width:400px;padding:16px;overflow:auto;border-radius:5px;background-color:#fff;color:#101010;font-size:14px;text-align:center;box-shadow:0 0 10px #0000004d;font-family:-regular}._pcCover_1xtgw_15{display:flex;align-items:center;justify-content:center;margin-bottom:25px;overflow:hidden;border-radius:3px;background-color:#bbbbbbb0}._pcCover_1xtgw_15 img{width:100%;height:auto;display:block}._pcSection_1xtgw_31{width:100%;padding-bottom:16px;display:flex;align-items:center}._pcBreadcrumbSep_1xtgw_38{font-size:12px;color:#999}._pcBasic_1xtgw_43{display:flex;gap:8px;flex-wrap:wrap}._pcBasicRow_1xtgw_49{width:100%;display:flex;align-items:center;justify-content:space-between}._pcBasicRowLeft_1xtgw_56{display:flex;align-items:center;gap:8px}._pcLinkIconRight_1xtgw_61{display:flex;align-items:center;justify-content:center;width:30px;height:20px;text-decoration:none;background-color:#fafafa;border-radius:4px}._pcColorSwatch_1xtgw_72{width:7px;height:16px}._pcIconDot_1xtgw_77{width:18px;height:18px}._pcTitleLink_1xtgw_82{display:inline-flex;align-items:center;gap:8px;padding:2px 8px;border:2px solid #027ffe;border-radius:4px;color:#027ffe;font-weight:500;text-decoration:none;line-height:1.6}._pcTitleLink_1xtgw_82:hover{background:#1677ff0f}._pcTitleText_1xtgw_99{display:inline-flex;align-items:center;color:#027ffe;font-size:16px}._pcSubTitleText_1xtgw_106{display:inline-flex;align-items:center;color:#999;font-size:16px}._pcExternalIcon_1xtgw_113{font-size:12px;color:#027ffe;margin-left:2px}._pcProperties_1xtgw_119{width:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:8px;row-gap:12px;align-items:start}._pcProperty_1xtgw_127{display:flex;align-items:center;gap:4px;min-height:24px;min-width:0;box-sizing:border-box;font-size:12px;color:#999}._pcTagsRow_1xtgw_138{display:inline-flex;flex-wrap:wrap;gap:4px}._pcTag_1xtgw_138{padding:2px 6px;border-radius:4px;background:#f2f3f5;color:#555;font-size:12px}._pcDetails_1xtgw_151{width:100%;display:flex;flex-direction:column;gap:12px}._pcRow_1xtgw_157{display:grid;column-gap:8px;row-gap:12px;width:100%}._pcCol_1xtgw_72{width:100%;padding:10px 8px;box-sizing:border-box;display:flex;flex-direction:column;gap:4px;min-width:0;text-align:left;border-radius:5px;background-color:#fafafa;color:#101010;font-size:14px;font-family:-regular;border:1px solid rgba(245,245,245,1)}._pcColLabel_1xtgw_179{color:#999;font-size:12px}._pcColValue_1xtgw_183{font-size:16px;color:#027ffe}._pcProgressText_1xtgw_188{font-size:10px;color:#027ffe}._entityLabel_1xtgw_194{width:100%;overflow:hidden}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const re=require("react"),F=require("antd"),xe=require("lucide-react");function xt(t){const f=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const a in t)if(a!=="default"){const c=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(f,a,c.get?c:{enumerable:!0,get:()=>t[a]})}}return f.default=t,Object.freeze(f)}const Ue=xt(xe);var _e={exports:{}},H={};/**
|
|
2
3
|
* @license React
|
|
3
4
|
* react-jsx-runtime.production.min.js
|
|
4
5
|
*
|
|
@@ -6,7 +7,7 @@
|
|
|
6
7
|
*
|
|
7
8
|
* This source code is licensed under the MIT license found in the
|
|
8
9
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
10
|
+
*/var $e;function _t(){if($e)return H;$e=1;var t=re,f=Symbol.for("react.element"),a=Symbol.for("react.fragment"),c=Object.prototype.hasOwnProperty,s=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,g={key:!0,ref:!0,__self:!0,__source:!0};function y(w,p,j){var _,T={},S=null,k=null;j!==void 0&&(S=""+j),p.key!==void 0&&(S=""+p.key),p.ref!==void 0&&(k=p.ref);for(_ in p)c.call(p,_)&&!g.hasOwnProperty(_)&&(T[_]=p[_]);if(w&&w.defaultProps)for(_ in p=w.defaultProps,p)T[_]===void 0&&(T[_]=p[_]);return{$$typeof:f,type:w,key:S,ref:k,props:T,_owner:s.current}}return H.Fragment=a,H.jsx=y,H.jsxs=y,H}var G={};/**
|
|
10
11
|
* @license React
|
|
11
12
|
* react-jsx-runtime.development.js
|
|
12
13
|
*
|
|
@@ -14,17 +15,17 @@
|
|
|
14
15
|
*
|
|
15
16
|
* This source code is licensed under the MIT license found in the
|
|
16
17
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
18
|
-
`+
|
|
18
|
+
*/var We;function bt(){return We||(We=1,process.env.NODE_ENV!=="production"&&function(){var t=re,f=Symbol.for("react.element"),a=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),g=Symbol.for("react.profiler"),y=Symbol.for("react.provider"),w=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),j=Symbol.for("react.suspense"),_=Symbol.for("react.suspense_list"),T=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),k=Symbol.for("react.offscreen"),W=Symbol.iterator,ne="@@iterator";function ie(e){if(e===null||typeof e!="object")return null;var r=W&&e[W]||e[ne];return typeof r=="function"?r:null}var D=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function R(e){{for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];be("error",e,i)}}function be(e,r,i){{var o=D.ReactDebugCurrentFrame,v=o.getStackAddendum();v!==""&&(r+="%s",i=i.concat([v]));var m=i.map(function(u){return String(u)});m.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,m)}}var oe=!1,U=!1,se=!1,le=!1,ae=!1,V;V=Symbol.for("react.module.reference");function ce(e){return!!(typeof e=="string"||typeof e=="function"||e===c||e===g||ae||e===s||e===j||e===_||le||e===k||oe||U||se||typeof e=="object"&&e!==null&&(e.$$typeof===S||e.$$typeof===T||e.$$typeof===y||e.$$typeof===w||e.$$typeof===p||e.$$typeof===V||e.getModuleId!==void 0))}function ue(e,r,i){var o=e.displayName;if(o)return o;var v=r.displayName||r.name||"";return v!==""?i+"("+v+")":i}function d(e){return e.displayName||"Context"}function O(e){if(e==null)return null;if(typeof e.tag=="number"&&R("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case c:return"Fragment";case a:return"Portal";case g:return"Profiler";case s:return"StrictMode";case j:return"Suspense";case _:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case w:var r=e;return d(r)+".Consumer";case y:var i=e;return d(i._context)+".Provider";case p:return ue(e,e.render,"ForwardRef");case T:var o=e.displayName||null;return o!==null?o:O(e.type)||"Memo";case S:{var v=e,m=v._payload,u=v._init;try{return O(u(m))}catch{return null}}}return null}var I=Object.assign,N=0,X,Y,z,q,J,A,L;function we(){}we.__reactDisabledLog=!0;function qe(){{if(N===0){X=console.log,Y=console.info,z=console.warn,q=console.error,J=console.group,A=console.groupCollapsed,L=console.groupEnd;var e={configurable:!0,enumerable:!0,value:we,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}N++}}function Je(){{if(N--,N===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:I({},e,{value:X}),info:I({},e,{value:Y}),warn:I({},e,{value:z}),error:I({},e,{value:q}),group:I({},e,{value:J}),groupCollapsed:I({},e,{value:A}),groupEnd:I({},e,{value:L})})}N<0&&R("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var fe=D.ReactCurrentDispatcher,pe;function Z(e,r,i){{if(pe===void 0)try{throw Error()}catch(v){var o=v.stack.trim().match(/\n( *(at )?)/);pe=o&&o[1]||""}return`
|
|
19
|
+
`+pe+e}}var ve=!1,Q;{var Ke=typeof WeakMap=="function"?WeakMap:Map;Q=new Ke}function je(e,r){if(!e||ve)return"";{var i=Q.get(e);if(i!==void 0)return i}var o;ve=!0;var v=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var m;m=fe.current,fe.current=null,qe();try{if(r){var u=function(){throw Error()};if(Object.defineProperty(u.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(u,[])}catch(C){o=C}Reflect.construct(e,[],u)}else{try{u.call()}catch(C){o=C}e.call(u.prototype)}}else{try{throw Error()}catch(C){o=C}e()}}catch(C){if(C&&o&&typeof C.stack=="string"){for(var l=C.stack.split(`
|
|
19
20
|
`),E=o.stack.split(`
|
|
20
|
-
`),x=l.length-1,b=E.length-1;x>=1&&b>=0&&l[x]!==E[b];)b--;for(;x>=1&&b>=0;x--,b--)if(l[x]!==E[b]){if(x!==1||b!==1)do if(x--,b--,b<0||l[x]!==E[b]){var
|
|
21
|
-
`+l[x].replace(" at new "," at ");return e.displayName&&
|
|
21
|
+
`),x=l.length-1,b=E.length-1;x>=1&&b>=0&&l[x]!==E[b];)b--;for(;x>=1&&b>=0;x--,b--)if(l[x]!==E[b]){if(x!==1||b!==1)do if(x--,b--,b<0||l[x]!==E[b]){var P=`
|
|
22
|
+
`+l[x].replace(" at new "," at ");return e.displayName&&P.includes("<anonymous>")&&(P=P.replace("<anonymous>",e.displayName)),typeof e=="function"&&Q.set(e,P),P}while(x>=1&&b>=0);break}}}finally{ve=!1,fe.current=m,Je(),Error.prepareStackTrace=v}var B=e?e.displayName||e.name:"",$=B?Z(B):"";return typeof e=="function"&&Q.set(e,$),$}function He(e,r,i){return je(e,!1)}function Ge(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function ee(e,r,i){if(e==null)return"";if(typeof e=="function")return je(e,Ge(e));if(typeof e=="string")return Z(e);switch(e){case j:return Z("Suspense");case _:return Z("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case p:return He(e.render);case T:return ee(e.type,r,i);case S:{var o=e,v=o._payload,m=o._init;try{return ee(m(v),r,i)}catch{}}}return""}var K=Object.prototype.hasOwnProperty,Re={},Ee=D.ReactDebugCurrentFrame;function te(e){if(e){var r=e._owner,i=ee(e.type,e._source,r?r.type:null);Ee.setExtraStackFrame(i)}else Ee.setExtraStackFrame(null)}function Xe(e,r,i,o,v){{var m=Function.call.bind(K);for(var u in e)if(m(e,u)){var l=void 0;try{if(typeof e[u]!="function"){var E=Error((o||"React class")+": "+i+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw E.name="Invariant Violation",E}l=e[u](r,u,o,i,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(x){l=x}l&&!(l instanceof Error)&&(te(v),R("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",o||"React class",i,u,typeof l),te(null)),l instanceof Error&&!(l.message in Re)&&(Re[l.message]=!0,te(v),R("Failed %s type: %s",i,l.message),te(null))}}}var Ze=Array.isArray;function he(e){return Ze(e)}function Qe(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,i=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return i}}function et(e){try{return Ce(e),!1}catch{return!0}}function Ce(e){return""+e}function Te(e){if(et(e))return R("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Qe(e)),Ce(e)}var Se=D.ReactCurrentOwner,tt={key:!0,ref:!0,__self:!0,__source:!0},Pe,ke;function rt(e){if(K.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function nt(e){if(K.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function it(e,r){typeof e.ref=="string"&&Se.current}function ot(e,r){{var i=function(){Pe||(Pe=!0,R("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};i.isReactWarning=!0,Object.defineProperty(e,"key",{get:i,configurable:!0})}}function st(e,r){{var i=function(){ke||(ke=!0,R("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};i.isReactWarning=!0,Object.defineProperty(e,"ref",{get:i,configurable:!0})}}var lt=function(e,r,i,o,v,m,u){var l={$$typeof:f,type:e,key:r,ref:i,props:u,_owner:m};return l._store={},Object.defineProperty(l._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(l,"_self",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.defineProperty(l,"_source",{configurable:!1,enumerable:!1,writable:!1,value:v}),Object.freeze&&(Object.freeze(l.props),Object.freeze(l)),l};function at(e,r,i,o,v){{var m,u={},l=null,E=null;i!==void 0&&(Te(i),l=""+i),nt(r)&&(Te(r.key),l=""+r.key),rt(r)&&(E=r.ref,it(r,v));for(m in r)K.call(r,m)&&!tt.hasOwnProperty(m)&&(u[m]=r[m]);if(e&&e.defaultProps){var x=e.defaultProps;for(m in x)u[m]===void 0&&(u[m]=x[m])}if(l||E){var b=typeof e=="function"?e.displayName||e.name||"Unknown":e;l&&ot(u,b),E&&st(u,b)}return lt(e,l,E,v,o,Se.current,u)}}var ge=D.ReactCurrentOwner,Oe=D.ReactDebugCurrentFrame;function M(e){if(e){var r=e._owner,i=ee(e.type,e._source,r?r.type:null);Oe.setExtraStackFrame(i)}else Oe.setExtraStackFrame(null)}var ye;ye=!1;function me(e){return typeof e=="object"&&e!==null&&e.$$typeof===f}function Ie(){{if(ge.current){var e=O(ge.current.type);if(e)return`
|
|
22
23
|
|
|
23
|
-
Check the render method of \``+e+"`."}return""}}function ct(e){return""}var
|
|
24
|
+
Check the render method of \``+e+"`."}return""}}function ct(e){return""}var Ae={};function ut(e){{var r=Ie();if(!r){var i=typeof e=="string"?e:e.displayName||e.name;i&&(r=`
|
|
24
25
|
|
|
25
|
-
Check the top-level render call using <`+i+">.")}return r}}function
|
|
26
|
+
Check the top-level render call using <`+i+">.")}return r}}function Fe(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var i=ut(r);if(Ae[i])return;Ae[i]=!0;var o="";e&&e._owner&&e._owner!==ge.current&&(o=" It was passed a child from "+O(e._owner.type)+"."),M(e),R('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',i,o),M(null)}}function De(e,r){{if(typeof e!="object")return;if(he(e))for(var i=0;i<e.length;i++){var o=e[i];me(o)&&Fe(o,r)}else if(me(e))e._store&&(e._store.validated=!0);else if(e){var v=ie(e);if(typeof v=="function"&&v!==e.entries)for(var m=v.call(e),u;!(u=m.next()).done;)me(u.value)&&Fe(u.value,r)}}}function ft(e){{var r=e.type;if(r==null||typeof r=="string")return;var i;if(typeof r=="function")i=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===p||r.$$typeof===T))i=r.propTypes;else return;if(i){var o=O(r);Xe(i,e.props,"prop",o,e)}else if(r.PropTypes!==void 0&&!ye){ye=!0;var v=O(r);R("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",v||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&R("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function pt(e){{for(var r=Object.keys(e.props),i=0;i<r.length;i++){var o=r[i];if(o!=="children"&&o!=="key"){M(e),R("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",o),M(null);break}}e.ref!==null&&(M(e),R("Invalid attribute `ref` supplied to `React.Fragment`."),M(null))}}var Ne={};function Le(e,r,i,o,v,m){{var u=ce(e);if(!u){var l="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(l+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var E=ct();E?l+=E:l+=Ie();var x;e===null?x="null":he(e)?x="array":e!==void 0&&e.$$typeof===f?(x="<"+(O(e.type)||"Unknown")+" />",l=" Did you accidentally export a JSX literal instead of a component?"):x=typeof e,R("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",x,l)}var b=at(e,r,i,v,m);if(b==null)return b;if(u){var P=r.children;if(P!==void 0)if(o)if(he(P)){for(var B=0;B<P.length;B++)De(P[B],e);Object.freeze&&Object.freeze(P)}else R("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else De(P,e)}if(K.call(r,"key")){var $=O(e),C=Object.keys(r).filter(function(dt){return dt!=="key"}),de=C.length>0?"{key: someKey, "+C.join(": ..., ")+": ...}":"{key: someKey}";if(!Ne[$+de]){var mt=C.length>0?"{"+C.join(": ..., ")+": ...}":"{}";R(`A props object containing a "key" prop is being spread into JSX:
|
|
26
27
|
let props = %s;
|
|
27
28
|
<%s {...props} />
|
|
28
29
|
React keys must be passed directly to JSX without using spread:
|
|
29
30
|
let props = %s;
|
|
30
|
-
<%s key={someKey} {...props} />`,we,$,mt,$),$e[$+we]=!0}}return e===c?pt(b):ft(b),b}}function ht(e,r,i){return Be(e,r,i,!0)}function vt(e,r,i){return Be(e,r,i,!1)}var gt=vt,yt=ht;Q.Fragment=c,Q.jsx=gt,Q.jsxs=yt}()),Q}process.env.NODE_ENV==="production"?Re.exports=_t():Re.exports=bt();var n=Re.exports;const wt="_entityCard_1xtgw_1",jt="_pcCover_1xtgw_15",Rt="_pcSection_1xtgw_31",Et="_pcBreadcrumbSep_1xtgw_38",Ct="_pcBasic_1xtgw_43",Tt="_pcBasicRow_1xtgw_49",St="_pcBasicRowLeft_1xtgw_56",Pt="_pcLinkIconRight_1xtgw_61",kt="_pcColorSwatch_1xtgw_72",Ot="_pcTitleText_1xtgw_99",It="_pcSubTitleText_1xtgw_106",At="_pcProperties_1xtgw_119",Ft="_pcProperty_1xtgw_127",Dt="_pcTagsRow_1xtgw_138",Nt="_pcDetails_1xtgw_151",Lt="_pcRow_1xtgw_157",Wt="_pcCol_1xtgw_72",$t="_pcColLabel_1xtgw_179",Bt="_pcColValue_1xtgw_183",Mt="_pcProgressText_1xtgw_188",Ut="_entityLabel_1xtgw_194",v={entityCard:wt,pcCover:jt,pcSection:Rt,pcBreadcrumbSep:Et,pcBasic:Ct,pcBasicRow:Tt,pcBasicRowLeft:St,pcLinkIconRight:Pt,pcColorSwatch:kt,pcTitleText:Ot,pcSubTitleText:It,pcProperties:At,pcProperty:Ft,pcTagsRow:Dt,pcDetails:Nt,pcRow:Lt,pcCol:Wt,pcColLabel:$t,pcColValue:Bt,pcProgressText:Mt,entityLabel:Ut},Ve=t=>{if(!t)return null;const f=t.trim(),s={user:"User",email:"Mail",mail:"Mail",phone:"Phone",datetime:"Calendar",date:"Calendar",time:"Clock",tags:"Tag"}[f]??f.replace(/(^\w|-\w)/g,y=>y.replace("-","").toUpperCase());return ze[s]||null},Vt=(t,f)=>{const a=typeof t=="number"?t:typeof t=="string"?parseFloat(t):NaN,c=isFinite(a)?a<=1?Math.max(0,Math.min(1,a))*100:Math.max(0,Math.min(100,a)):0;return n.jsxs("div",{className:v.pcProgress,children:[n.jsx(L.Progress,{percent:c,showInfo:!1,strokeColor:"#027ffe",size:{height:12}}),(f==null?void 0:f.text)&&n.jsx("div",{className:v.pcProgressText,children:f.text})]})},qe=t=>!Array.isArray(t)||t.length===0?null:n.jsx("div",{className:v.pcTagsRow,children:t.map((f,a)=>n.jsx(L.Tag,{color:"default",style:{display:"inline-flex",alignItems:"center",border:"none",backgroundColor:"#E8E8E8",color:"#027FFE"},children:String(f)},`${f}-${a}`))}),Yt=t=>{const{view:f,value:a,payload:c}=t;return f==="percent_bar"?Vt(a,c):f==="tags"?qe(Array.isArray(a)?a:[]):n.jsx("div",{className:v.pcColValue,children:String(a??"")})},Je=({data:t})=>{var f,a,c;return n.jsxs(n.Fragment,{children:[(t==null?void 0:t.cover)&&n.jsx("div",{className:v.pcCover,style:{height:(f=t==null?void 0:t.style)==null?void 0:f.cover_max_height},children:n.jsx("img",{src:t.cover,alt:"cover"})}),Array.isArray(t==null?void 0:t.categories)&&t.categories.length>0&&n.jsx("div",{className:v.pcSection,children:n.jsx(L.Breadcrumb,{items:t.categories.map((s,g)=>({key:`${s}-${g}`,title:s})),separator:n.jsx("span",{className:v.pcBreadcrumbSep,children:"/"})})}),((t==null?void 0:t.color)||(t==null?void 0:t.icon)||(t==null?void 0:t.title)||(t==null?void 0:t.subtitle)||(t==null?void 0:t.url))&&n.jsx("div",{className:v.pcBasic,children:n.jsxs("div",{className:v.pcBasicRow,children:[n.jsxs("div",{className:v.pcBasicRowLeft,children:[(t==null?void 0:t.color)&&n.jsx("span",{className:v.pcColorSwatch,style:{backgroundColor:t.color},"aria-label":`color ${t.color}`,title:`color: ${t.color}`}),(()=>{var y;const s=(y=t==null?void 0:t.icon)==null?void 0:y.trim();if(s&&/^https?:\/\/+/i.test(s))return n.jsx("img",{src:s,alt:"icon",className:v.pcIcon,width:18,height:18,style:{objectFit:"contain"}});const g=Ve(s);return g?n.jsx(g,{className:v.pcIcon,size:18,strokeWidth:2}):null})(),(t==null?void 0:t.title)&&n.jsx("span",{className:v.pcTitleText,title:t.title,children:t.title}),(t==null?void 0:t.subtitle)&&n.jsxs("span",{className:v.pcSubTitleText,title:t.subtitle,children:["| ",t.subtitle]})]}),(t==null?void 0:t.url)&&n.jsx("a",{href:t.url,target:"_blank",rel:"noreferrer","aria-label":"open link",title:t.url,className:v.pcLinkIconRight,children:n.jsx(je.ExternalLink,{style:{width:12,height:12,color:"#027FFE"}})})]})}),Array.isArray(t==null?void 0:t.properties)&&t.properties.length>0&&n.jsx("div",{className:v.pcSection,style:{paddingTop:25},children:n.jsx("div",{className:v.pcProperties,children:t.properties.map((s,g)=>{const y=Ve(s.icon),w=()=>{if(s.view==="tags")return qe(Array.isArray(s.value)?s.value:[]);if(s.view==="datetime_with_time_zone"){const p=String(s.value??"");return n.jsx("span",{className:v.pcPropertyValue,children:p})}return n.jsx("span",{className:v.pcPropertyValue,children:String(s.value??"")})};return n.jsxs("div",{className:v.pcProperty,children:[y&&n.jsx(y,{className:v.pcPropertyIcon,size:16,strokeWidth:2}),w()]},g)})})}),Array.isArray((c=(a=t==null?void 0:t.details)==null?void 0:a.table)==null?void 0:c.rows)&&t.details.table.rows.length>0&&n.jsx("div",{className:v.pcSection,children:n.jsx("div",{className:v.pcDetails,children:t.details.table.rows.map((s,g)=>{const y=Array.isArray(s.columns)?s.columns.filter(p=>p&&(p.label!==void 0||p.value!==void 0)):[],w=y.length;return n.jsx("div",{className:v.pcRow,style:{gridTemplateColumns:w<=1?"1fr":"repeat(2, minmax(0, 1fr))"},children:y.map((p,j)=>n.jsxs("div",{className:v.pcCol,children:[Yt(p),p.label&&n.jsx("div",{className:v.pcColLabel,children:p.label})]},j))},g)})})}),Array.isArray(t==null?void 0:t.tags)&&t.tags.length>0&&n.jsx("div",{className:v.pcSection,children:t.tags.map((s,g)=>n.jsx(L.Tag,{style:{display:"inline-flex",alignItems:"center",gap:4,color:"#027FFE",border:"none"},icon:n.jsx(je.Tags,{style:{width:12,height:12}}),color:"default",children:s},g))})]})},zt=({title:t,subtitle:f,description:a,imageUrl:c,actions:s=[],footer:g,triggerType:y="hover",popupMode:w="modal",trigger:p,open:j,onOpenChange:_,modalTitle:S,width:C,placement:O="right",data:B,hoverOpenDelay:ue=500,closeDelay:fe=200,autoPlacement:A=!1,hoverAutoClose:R=!1,hoverAutoCloseDelay:Ee=2e3})=>{var z,q,J,H;const[pe,he]=ee.useState(!1),te=typeof j=="boolean",ve=te?j:pe,ge=P=>{te?_==null||_(P):he(P)},d=B,M=ee.useRef(null),[ye,re]=ee.useState(O),I=()=>{if(!M.current)return;const P=M.current.getBoundingClientRect(),ie=window.innerWidth,oe=window.innerHeight,se=(()=>{var le;const N=(typeof C=="number"?C:void 0)??((le=d==null?void 0:d.style)==null?void 0:le.width);return N?typeof N=="string"?parseInt(N,10)||376:N:376})(),me=300,K=ie-P.right,G=P.left,U=oe-P.bottom;P.top;let D=O;K>=se?D="right":G>=se?D="left":U>=me?D="bottom":D="top",re(D)},F=n.jsx(L.Button,{type:"default",children:`打开:${(d==null?void 0:d.title)??t??"详情"}`}),W=n.jsx("span",{ref:M,style:{display:"inline-block"},children:p??F}),ne=n.jsx(L.Popover,{content:n.jsx("div",{className:v.entityCard,style:{width:(z=d==null?void 0:d.style)==null?void 0:z.width,height:(q=d==null?void 0:d.style)==null?void 0:q.height,maxWidth:(J=d==null?void 0:d.style)==null?void 0:J.max_width,maxHeight:(H=d==null?void 0:d.style)==null?void 0:H.max_height},children:d!=null&&d.id?n.jsx(Je,{data:d}):n.jsx(L.Skeleton,{active:!0,title:!1,avatar:{shape:"circle",size:24},paragraph:{rows:3}})}),open:ve,onOpenChange:P=>{P&&A&&I(),ge(!!P)},trigger:y,placement:A?ye:O,mouseEnterDelay:y==="hover"?ue/1e3:0,mouseLeaveDelay:y==="hover"?fe/1e3:0,autoAdjustOverflow:!0,getPopupContainer:()=>M.current||document.body,overlayInnerStyle:{padding:0},children:W});return n.jsx(n.Fragment,{children:ne})},qt=t=>{const f=t.trim(),c={user:"User",email:"Mail",mail:"Mail",phone:"Phone",datetime:"Calendar",date:"Calendar",time:"Clock",tags:"Tag"}[f]??f.replace(/(^\w|-\w)/g,g=>g.replace("-","").toUpperCase());return ze[c]||null},Jt=t=>{if(t){if(/^mailto:/i.test(t))try{return decodeURIComponent(t.slice(7))}catch{return t.slice(7)}return t}},Ye=()=>n.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:8,verticalAlign:"middle"},"aria-label":"entity user skeleton",children:[n.jsx("span",{style:{width:20,height:20,borderRadius:"50%",backgroundColor:"#e9e9e9",flex:"0 0 auto"}}),n.jsx("span",{style:{width:160,height:20,borderRadius:6,backgroundColor:"#e9e9e9",flex:"0 0 auto"}})]}),He=({data:t})=>{var _,S;if(!t||!t.title&&!t.icon&&!t.subtitle&&!t.color&&!t.url)return n.jsx(Ye,{});const a=(_=t==null?void 0:t.icon)==null?void 0:_.trim(),c=(S=t==null?void 0:t.title)==null?void 0:S.trim(),s=Jt(t==null?void 0:t.url),g=!!a,y=!!c,w=!!s,p=!!(t!=null&&t.color)||!!(t!=null&&t.subtitle),j=(C=20)=>{if(a&&/^https?:\/\//i.test(a))return n.jsx(L.Avatar,{size:C,src:a});const O=qt(a||"user"),B=Math.max(8,C-4);return n.jsx(L.Avatar,{size:C,icon:O?n.jsx(O,{size:B}):void 0})};return g&&y&&!w&&!p?n.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:8},children:[j(),n.jsx("span",{style:{color:"#027FFE",fontWeight:500,lineHeight:"20px"},title:c,children:c})]}):g&&!y&&!w&&!p?n.jsx("span",{style:{display:"inline-flex"},children:j()}):!g&&y&&!w&&!p?n.jsx("span",{style:{display:"inline-block",color:"#027FFE",fontWeight:500},title:c,children:c}):g&&y&&w?n.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:8},children:[j(40),n.jsxs("span",{style:{display:"inline-flex",flexDirection:"column",justifyContent:"space-between"},children:[n.jsx("span",{style:{color:"#027FFE",fontWeight:500},title:c,children:c}),n.jsx("span",{style:{color:"#888",fontSize:12},title:s,children:s})]})]}):g&&y&&p?n.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:8},children:[j(40),n.jsxs("span",{style:{display:"inline-flex",flexDirection:"column",justifyContent:"space-between"},children:[n.jsx("span",{style:{color:"#027FFE",fontWeight:500},title:c,children:c}),n.jsxs("span",{style:{marginTop:4,display:"inline-flex",alignItems:"center",gap:6,fontSize:12,color:"#666"},title:t==null?void 0:t.subtitle,children:[(t==null?void 0:t.color)&&n.jsx("span",{style:{width:12,height:12,borderRadius:"50%",backgroundColor:t.color}}),t==null?void 0:t.subtitle]})]})]}):y?n.jsx("span",{style:{color:"#027FFE",fontWeight:500},title:c,children:c}):n.jsx(Ye,{})};function Ht({data:t}){var a,c,s,g;const f=((t==null?void 0:t.type)??"").toLowerCase()==="user";return n.jsx("div",{className:v.entityLabel,style:{width:(a=t==null?void 0:t.style)==null?void 0:a.width,height:(c=t==null?void 0:t.style)==null?void 0:c.height,maxWidth:(s=t==null?void 0:t.style)==null?void 0:s.max_width,maxHeight:(g=t==null?void 0:t.style)==null?void 0:g.max_height},children:t!=null&&t.id?f?n.jsx(He,{data:t}):n.jsx(Je,{data:t}):n.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:10,verticalAlign:"middle"},"aria-label":"entity label skeleton",children:[n.jsx("span",{style:{width:20,height:20,borderRadius:"50%",backgroundColor:"#e9e9e9",flex:"0 0 auto"}}),n.jsx("span",{style:{width:160,height:20,borderRadius:6,backgroundColor:"#e9e9e9",flex:"0 0 auto"}})]})})}exports.EntityCard=zt;exports.EntityLabel=Ht;exports.EntityUser=He;
|
|
31
|
+
<%s key={someKey} {...props} />`,de,$,mt,$),Ne[$+de]=!0}}return e===c?pt(b):ft(b),b}}function vt(e,r,i){return Le(e,r,i,!0)}function ht(e,r,i){return Le(e,r,i,!1)}var gt=ht,yt=vt;G.Fragment=c,G.jsx=gt,G.jsxs=yt}()),G}process.env.NODE_ENV==="production"?_e.exports=_t():_e.exports=bt();var n=_e.exports;const wt="_entityCard_1xtgw_1",jt="_pcCover_1xtgw_15",Rt="_pcSection_1xtgw_31",Et="_pcBreadcrumbSep_1xtgw_38",Ct="_pcBasic_1xtgw_43",Tt="_pcBasicRow_1xtgw_49",St="_pcBasicRowLeft_1xtgw_56",Pt="_pcLinkIconRight_1xtgw_61",kt="_pcColorSwatch_1xtgw_72",Ot="_pcTitleText_1xtgw_99",It="_pcSubTitleText_1xtgw_106",At="_pcProperties_1xtgw_119",Ft="_pcProperty_1xtgw_127",Dt="_pcTagsRow_1xtgw_138",Nt="_pcDetails_1xtgw_151",Lt="_pcRow_1xtgw_157",$t="_pcCol_1xtgw_72",Wt="_pcColLabel_1xtgw_179",Mt="_pcColValue_1xtgw_183",Bt="_pcProgressText_1xtgw_188",Ut="_entityLabel_1xtgw_194",h={entityCard:wt,pcCover:jt,pcSection:Rt,pcBreadcrumbSep:Et,pcBasic:Ct,pcBasicRow:Tt,pcBasicRowLeft:St,pcLinkIconRight:Pt,pcColorSwatch:kt,pcTitleText:Ot,pcSubTitleText:It,pcProperties:At,pcProperty:Ft,pcTagsRow:Dt,pcDetails:Nt,pcRow:Lt,pcCol:$t,pcColLabel:Wt,pcColValue:Mt,pcProgressText:Bt,entityLabel:Ut},Me=t=>{if(!t)return null;const f=t.trim(),s={user:"User",email:"Mail",mail:"Mail",phone:"Phone",datetime:"Calendar",date:"Calendar",time:"Clock",tags:"Tag"}[f]??f.replace(/(^\w|-\w)/g,y=>y.replace("-","").toUpperCase());return Ue[s]||null},Vt=(t,f)=>{const a=typeof t=="number"?t:typeof t=="string"?parseFloat(t):NaN,c=isFinite(a)?a<=1?Math.max(0,Math.min(1,a))*100:Math.max(0,Math.min(100,a)):0;return n.jsxs("div",{className:h.pcProgress,children:[n.jsx(F.Progress,{percent:c,showInfo:!1,strokeColor:"#027ffe",size:{height:12}}),(f==null?void 0:f.text)&&n.jsx("div",{className:h.pcProgressText,children:f.text})]})},Ve=t=>!Array.isArray(t)||t.length===0?null:n.jsx("div",{className:h.pcTagsRow,children:t.map((f,a)=>n.jsx(F.Tag,{color:"default",style:{display:"inline-flex",alignItems:"center",border:"none",backgroundColor:"#E8E8E8",color:"#027FFE"},children:String(f)},`${f}-${a}`))}),Yt=t=>{const{view:f,value:a,payload:c}=t;return f==="percent_bar"?Vt(a,c):f==="tags"?Ve(Array.isArray(a)?a:[]):n.jsx("div",{className:h.pcColValue,children:String(a??"")})},Ye=({data:t})=>{var f,a,c;return n.jsxs(n.Fragment,{children:[(t==null?void 0:t.cover)&&n.jsx("div",{className:h.pcCover,style:{height:(f=t==null?void 0:t.style)==null?void 0:f.cover_max_height},children:n.jsx("img",{src:t.cover,alt:"cover"})}),Array.isArray(t==null?void 0:t.categories)&&t.categories.length>0&&n.jsx("div",{className:h.pcSection,children:n.jsx(F.Breadcrumb,{items:t.categories.map((s,g)=>({key:`${s}-${g}`,title:s})),separator:n.jsx("span",{className:h.pcBreadcrumbSep,children:"/"})})}),((t==null?void 0:t.color)||(t==null?void 0:t.icon)||(t==null?void 0:t.title)||(t==null?void 0:t.subtitle)||(t==null?void 0:t.url))&&n.jsx("div",{className:h.pcBasic,children:n.jsxs("div",{className:h.pcBasicRow,children:[n.jsxs("div",{className:h.pcBasicRowLeft,children:[(t==null?void 0:t.color)&&n.jsx("span",{className:h.pcColorSwatch,style:{backgroundColor:t.color},"aria-label":`color ${t.color}`,title:`color: ${t.color}`}),(()=>{var y;const s=(y=t==null?void 0:t.icon)==null?void 0:y.trim();if(s&&/^https?:\/\/+/i.test(s))return n.jsx("img",{src:s,alt:"icon",className:h.pcIcon,width:18,height:18,style:{objectFit:"contain"}});const g=Me(s);return g?n.jsx(g,{className:h.pcIcon,size:18,strokeWidth:2}):null})(),(t==null?void 0:t.title)&&n.jsx("span",{className:h.pcTitleText,title:t.title,children:t.title}),(t==null?void 0:t.subtitle)&&n.jsxs("span",{className:h.pcSubTitleText,title:t.subtitle,children:["| ",t.subtitle]})]}),(t==null?void 0:t.url)&&n.jsx("a",{href:t.url,target:"_blank",rel:"noreferrer","aria-label":"open link",title:t.url,className:h.pcLinkIconRight,children:n.jsx(xe.ExternalLink,{style:{width:12,height:12,color:"#027FFE"}})})]})}),Array.isArray(t==null?void 0:t.properties)&&t.properties.length>0&&n.jsx("div",{className:h.pcSection,style:{paddingTop:25},children:n.jsx("div",{className:h.pcProperties,children:t.properties.map((s,g)=>{const y=Me(s.icon),w=()=>{if(s.view==="tags")return Ve(Array.isArray(s.value)?s.value:[]);if(s.view==="datetime_with_time_zone"){const p=String(s.value??"");return n.jsx("span",{className:h.pcPropertyValue,children:p})}return n.jsx("span",{className:h.pcPropertyValue,children:String(s.value??"")})};return n.jsxs("div",{className:h.pcProperty,children:[y&&n.jsx(y,{className:h.pcPropertyIcon,size:16,strokeWidth:2}),w()]},g)})})}),Array.isArray((c=(a=t==null?void 0:t.details)==null?void 0:a.table)==null?void 0:c.rows)&&t.details.table.rows.length>0&&n.jsx("div",{className:h.pcSection,children:n.jsx("div",{className:h.pcDetails,children:t.details.table.rows.map((s,g)=>{const y=Array.isArray(s.columns)?s.columns.filter(p=>p&&(p.label!==void 0||p.value!==void 0)):[],w=y.length;return n.jsx("div",{className:h.pcRow,style:{gridTemplateColumns:w<=1?"1fr":"repeat(2, minmax(0, 1fr))"},children:y.map((p,j)=>n.jsxs("div",{className:h.pcCol,children:[Yt(p),p.label&&n.jsx("div",{className:h.pcColLabel,children:p.label})]},j))},g)})})}),Array.isArray(t==null?void 0:t.tags)&&t.tags.length>0&&n.jsx("div",{className:h.pcSection,children:t.tags.map((s,g)=>n.jsx(F.Tag,{style:{display:"inline-flex",alignItems:"center",gap:4,color:"#027FFE",border:"none"},icon:n.jsx(xe.Tags,{style:{width:12,height:12}}),color:"default",children:s},g))})]})},zt=({title:t,subtitle:f,description:a,imageUrl:c,actions:s=[],footer:g,triggerType:y="hover",popupMode:w="modal",trigger:p,open:j,onOpenChange:_,modalTitle:T,width:S,placement:k="right",data:W,hoverOpenDelay:ne=500,closeDelay:ie=200,autoPlacement:D=!1,hoverAutoClose:R=!1,hoverAutoCloseDelay:be=2e3,getPopupContainer:oe,viewportPadding:U=16,zIndex:se})=>{var Y,z,q,J;const[le,ae]=re.useState(!1),V=typeof j=="boolean",ce=V?j:le,ue=A=>{V?_==null||_(A):ae(A)},d=W,O=re.useRef(null),I=n.jsx(F.Button,{type:"default",children:`打开:${(d==null?void 0:d.title)??t??"详情"}`}),N=n.jsx("span",{ref:O,style:{display:"inline-block"},children:p??I}),X=n.jsx(F.Popover,{content:n.jsx("div",{className:h.entityCard,style:{width:(Y=d==null?void 0:d.style)==null?void 0:Y.width,height:(z=d==null?void 0:d.style)==null?void 0:z.height,maxWidth:(q=d==null?void 0:d.style)==null?void 0:q.max_width,maxHeight:(J=d==null?void 0:d.style)==null?void 0:J.max_height},children:d!=null&&d.id?n.jsx(Ye,{data:d}):n.jsx(F.Skeleton,{active:!0,title:!1,avatar:{shape:"circle",size:24},paragraph:{rows:3}})}),open:ce,onOpenChange:A=>{ue(!!A)},trigger:y,placement:k,align:function(){const A=k,L=U;switch(A){case"top":return{offset:[0,L]};case"bottom":return{offset:[0,-L]};case"left":return{offset:[L,0]};case"right":return{offset:[-L,0]};default:return}}(),mouseEnterDelay:y==="hover"?ne/1e3:0,mouseLeaveDelay:y==="hover"?ie/1e3:0,autoAdjustOverflow:!0,zIndex:se,getPopupContainer:oe??(()=>document.body),overlayStyle:{maxHeight:`calc(100vh - 24px - ${U*2}px)`,overflowY:"auto",margin:U},overlayInnerStyle:{padding:0},children:N});return n.jsx(n.Fragment,{children:X})},qt=t=>{const f=t.trim(),c={user:"User",email:"Mail",mail:"Mail",phone:"Phone",datetime:"Calendar",date:"Calendar",time:"Clock",tags:"Tag"}[f]??f.replace(/(^\w|-\w)/g,g=>g.replace("-","").toUpperCase());return Ue[c]||null},Jt=t=>{if(t){if(/^mailto:/i.test(t))try{return decodeURIComponent(t.slice(7))}catch{return t.slice(7)}return t}},Be=()=>n.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:8,verticalAlign:"middle"},"aria-label":"entity user skeleton",children:[n.jsx("span",{style:{width:20,height:20,borderRadius:"50%",backgroundColor:"#e9e9e9",flex:"0 0 auto"}}),n.jsx("span",{style:{width:160,height:20,borderRadius:6,backgroundColor:"#e9e9e9",flex:"0 0 auto"}})]}),ze=({data:t})=>{var _,T;if(!t||!t.title&&!t.icon&&!t.subtitle&&!t.color&&!t.url)return n.jsx(Be,{});const a=(_=t==null?void 0:t.icon)==null?void 0:_.trim(),c=(T=t==null?void 0:t.title)==null?void 0:T.trim(),s=Jt(t==null?void 0:t.url),g=!!a,y=!!c,w=!!s,p=!!(t!=null&&t.color)||!!(t!=null&&t.subtitle),j=(S=20)=>{if(a&&/^https?:\/\//i.test(a))return n.jsx(F.Avatar,{size:S,src:a});const k=qt(a||"user"),W=Math.max(8,S-4);return n.jsx(F.Avatar,{size:S,icon:k?n.jsx(k,{size:W}):void 0})};return g&&y&&!w&&!p?n.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:8},children:[j(),n.jsx("span",{style:{color:"#027FFE",fontWeight:500,lineHeight:"20px"},title:c,children:c})]}):g&&!y&&!w&&!p?n.jsx("span",{style:{display:"inline-flex"},children:j()}):!g&&y&&!w&&!p?n.jsx("span",{style:{display:"inline-block",color:"#027FFE",fontWeight:500},title:c,children:c}):g&&y&&w?n.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:8},children:[j(40),n.jsxs("span",{style:{display:"inline-flex",flexDirection:"column",justifyContent:"space-between"},children:[n.jsx("span",{style:{color:"#027FFE",fontWeight:500},title:c,children:c}),n.jsx("span",{style:{color:"#888",fontSize:12},title:s,children:s})]})]}):g&&y&&p?n.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:8},children:[j(40),n.jsxs("span",{style:{display:"inline-flex",flexDirection:"column",justifyContent:"space-between"},children:[n.jsx("span",{style:{color:"#027FFE",fontWeight:500},title:c,children:c}),n.jsxs("span",{style:{marginTop:4,display:"inline-flex",alignItems:"center",gap:6,fontSize:12,color:"#666"},title:t==null?void 0:t.subtitle,children:[(t==null?void 0:t.color)&&n.jsx("span",{style:{width:12,height:12,borderRadius:"50%",backgroundColor:t.color}}),t==null?void 0:t.subtitle]})]})]}):y?n.jsx("span",{style:{color:"#027FFE",fontWeight:500},title:c,children:c}):n.jsx(Be,{})};function Kt({data:t}){var a,c,s,g;const f=((t==null?void 0:t.type)??"").toLowerCase()==="user";return n.jsx("div",{className:h.entityLabel,style:{width:(a=t==null?void 0:t.style)==null?void 0:a.width,height:(c=t==null?void 0:t.style)==null?void 0:c.height,maxWidth:(s=t==null?void 0:t.style)==null?void 0:s.max_width,maxHeight:(g=t==null?void 0:t.style)==null?void 0:g.max_height},children:t!=null&&t.id?f?n.jsx(ze,{data:t}):n.jsx(Ye,{data:t}):n.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:10,verticalAlign:"middle"},"aria-label":"entity label skeleton",children:[n.jsx("span",{style:{width:20,height:20,borderRadius:"50%",backgroundColor:"#e9e9e9",flex:"0 0 auto"}}),n.jsx("span",{style:{width:160,height:20,borderRadius:6,backgroundColor:"#e9e9e9",flex:"0 0 auto"}})]})})}exports.EntityCard=zt;exports.EntityLabel=Kt;exports.EntityUser=ze;
|