@infinilabs/entity-ui 0.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/README.md +239 -0
- package/dist/entity-ui.cjs +30 -0
- package/dist/entity-ui.js +1082 -0
- package/dist/index.d.ts +99 -0
- package/dist/style.css +1 -0
- package/package.json +50 -0
|
@@ -0,0 +1,1082 @@
|
|
|
1
|
+
import Ve, { useState as Le, useRef as _t } from "react";
|
|
2
|
+
import { Breadcrumb as bt, Tag as Ye, Progress as xt, Button as Rt, Popover as jt, Skeleton as Et, Avatar as We } from "antd";
|
|
3
|
+
import * as ze from "lucide-react";
|
|
4
|
+
import { ExternalLink as wt, Tags as Ct } from "lucide-react";
|
|
5
|
+
var xe = { exports: {} }, X = {};
|
|
6
|
+
/**
|
|
7
|
+
* @license React
|
|
8
|
+
* react-jsx-runtime.production.min.js
|
|
9
|
+
*
|
|
10
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
11
|
+
*
|
|
12
|
+
* This source code is licensed under the MIT license found in the
|
|
13
|
+
* LICENSE file in the root directory of this source tree.
|
|
14
|
+
*/
|
|
15
|
+
var $e;
|
|
16
|
+
function Tt() {
|
|
17
|
+
if ($e) return X;
|
|
18
|
+
$e = 1;
|
|
19
|
+
var t = Ve, v = Symbol.for("react.element"), f = 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 };
|
|
20
|
+
function m(R, u, j) {
|
|
21
|
+
var b, S = {}, C = null, O = null;
|
|
22
|
+
j !== void 0 && (C = "" + j), u.key !== void 0 && (C = "" + u.key), u.ref !== void 0 && (O = u.ref);
|
|
23
|
+
for (b in u) c.call(u, b) && !g.hasOwnProperty(b) && (S[b] = u[b]);
|
|
24
|
+
if (R && R.defaultProps) for (b in u = R.defaultProps, u) S[b] === void 0 && (S[b] = u[b]);
|
|
25
|
+
return { $$typeof: v, type: R, key: C, ref: O, props: S, _owner: s.current };
|
|
26
|
+
}
|
|
27
|
+
return X.Fragment = f, X.jsx = m, X.jsxs = m, X;
|
|
28
|
+
}
|
|
29
|
+
var Z = {};
|
|
30
|
+
/**
|
|
31
|
+
* @license React
|
|
32
|
+
* react-jsx-runtime.development.js
|
|
33
|
+
*
|
|
34
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
35
|
+
*
|
|
36
|
+
* This source code is licensed under the MIT license found in the
|
|
37
|
+
* LICENSE file in the root directory of this source tree.
|
|
38
|
+
*/
|
|
39
|
+
var Be;
|
|
40
|
+
function St() {
|
|
41
|
+
return Be || (Be = 1, process.env.NODE_ENV !== "production" && function() {
|
|
42
|
+
var t = Ve, v = Symbol.for("react.element"), f = Symbol.for("react.portal"), c = Symbol.for("react.fragment"), s = Symbol.for("react.strict_mode"), g = Symbol.for("react.profiler"), m = Symbol.for("react.provider"), R = Symbol.for("react.context"), u = Symbol.for("react.forward_ref"), j = Symbol.for("react.suspense"), b = Symbol.for("react.suspense_list"), S = Symbol.for("react.memo"), C = Symbol.for("react.lazy"), O = Symbol.for("react.offscreen"), W = Symbol.iterator, ae = "@@iterator";
|
|
43
|
+
function ce(e) {
|
|
44
|
+
if (e === null || typeof e != "object")
|
|
45
|
+
return null;
|
|
46
|
+
var r = W && e[W] || e[ae];
|
|
47
|
+
return typeof r == "function" ? r : null;
|
|
48
|
+
}
|
|
49
|
+
var A = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
50
|
+
function E(e) {
|
|
51
|
+
{
|
|
52
|
+
for (var r = arguments.length, i = new Array(r > 1 ? r - 1 : 0), o = 1; o < r; o++)
|
|
53
|
+
i[o - 1] = arguments[o];
|
|
54
|
+
Re("error", e, i);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
function Re(e, r, i) {
|
|
58
|
+
{
|
|
59
|
+
var o = A.ReactDebugCurrentFrame, p = o.getStackAddendum();
|
|
60
|
+
p !== "" && (r += "%s", i = i.concat([p]));
|
|
61
|
+
var y = i.map(function(a) {
|
|
62
|
+
return String(a);
|
|
63
|
+
});
|
|
64
|
+
y.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, y);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
var ue = !1, fe = !1, Q = !1, pe = !1, he = !1, d;
|
|
68
|
+
d = Symbol.for("react.module.reference");
|
|
69
|
+
function $(e) {
|
|
70
|
+
return !!(typeof e == "string" || typeof e == "function" || e === c || e === g || he || e === s || e === j || e === b || pe || e === O || ue || fe || Q || typeof e == "object" && e !== null && (e.$$typeof === C || e.$$typeof === S || e.$$typeof === m || e.$$typeof === R || e.$$typeof === u || // This needs to include all possible module reference object
|
|
71
|
+
// types supported by any Flight configuration anywhere since
|
|
72
|
+
// we don't know which Flight build this will end up being used
|
|
73
|
+
// with.
|
|
74
|
+
e.$$typeof === d || e.getModuleId !== void 0));
|
|
75
|
+
}
|
|
76
|
+
function ve(e, r, i) {
|
|
77
|
+
var o = e.displayName;
|
|
78
|
+
if (o)
|
|
79
|
+
return o;
|
|
80
|
+
var p = r.displayName || r.name || "";
|
|
81
|
+
return p !== "" ? i + "(" + p + ")" : i;
|
|
82
|
+
}
|
|
83
|
+
function ee(e) {
|
|
84
|
+
return e.displayName || "Context";
|
|
85
|
+
}
|
|
86
|
+
function I(e) {
|
|
87
|
+
if (e == null)
|
|
88
|
+
return null;
|
|
89
|
+
if (typeof e.tag == "number" && E("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
90
|
+
return e.displayName || e.name || null;
|
|
91
|
+
if (typeof e == "string")
|
|
92
|
+
return e;
|
|
93
|
+
switch (e) {
|
|
94
|
+
case c:
|
|
95
|
+
return "Fragment";
|
|
96
|
+
case f:
|
|
97
|
+
return "Portal";
|
|
98
|
+
case g:
|
|
99
|
+
return "Profiler";
|
|
100
|
+
case s:
|
|
101
|
+
return "StrictMode";
|
|
102
|
+
case j:
|
|
103
|
+
return "Suspense";
|
|
104
|
+
case b:
|
|
105
|
+
return "SuspenseList";
|
|
106
|
+
}
|
|
107
|
+
if (typeof e == "object")
|
|
108
|
+
switch (e.$$typeof) {
|
|
109
|
+
case R:
|
|
110
|
+
var r = e;
|
|
111
|
+
return ee(r) + ".Consumer";
|
|
112
|
+
case m:
|
|
113
|
+
var i = e;
|
|
114
|
+
return ee(i._context) + ".Provider";
|
|
115
|
+
case u:
|
|
116
|
+
return ve(e, e.render, "ForwardRef");
|
|
117
|
+
case S:
|
|
118
|
+
var o = e.displayName || null;
|
|
119
|
+
return o !== null ? o : I(e.type) || "Memo";
|
|
120
|
+
case C: {
|
|
121
|
+
var p = e, y = p._payload, a = p._init;
|
|
122
|
+
try {
|
|
123
|
+
return I(a(y));
|
|
124
|
+
} catch {
|
|
125
|
+
return null;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
return null;
|
|
130
|
+
}
|
|
131
|
+
var F = Object.assign, D = 0, te, V, Y, z, J, P, re;
|
|
132
|
+
function ne() {
|
|
133
|
+
}
|
|
134
|
+
ne.__reactDisabledLog = !0;
|
|
135
|
+
function ie() {
|
|
136
|
+
{
|
|
137
|
+
if (D === 0) {
|
|
138
|
+
te = console.log, V = console.info, Y = console.warn, z = console.error, J = console.group, P = console.groupCollapsed, re = console.groupEnd;
|
|
139
|
+
var e = {
|
|
140
|
+
configurable: !0,
|
|
141
|
+
enumerable: !0,
|
|
142
|
+
value: ne,
|
|
143
|
+
writable: !0
|
|
144
|
+
};
|
|
145
|
+
Object.defineProperties(console, {
|
|
146
|
+
info: e,
|
|
147
|
+
log: e,
|
|
148
|
+
warn: e,
|
|
149
|
+
error: e,
|
|
150
|
+
group: e,
|
|
151
|
+
groupCollapsed: e,
|
|
152
|
+
groupEnd: e
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
D++;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
function ge() {
|
|
159
|
+
{
|
|
160
|
+
if (D--, D === 0) {
|
|
161
|
+
var e = {
|
|
162
|
+
configurable: !0,
|
|
163
|
+
enumerable: !0,
|
|
164
|
+
writable: !0
|
|
165
|
+
};
|
|
166
|
+
Object.defineProperties(console, {
|
|
167
|
+
log: F({}, e, {
|
|
168
|
+
value: te
|
|
169
|
+
}),
|
|
170
|
+
info: F({}, e, {
|
|
171
|
+
value: V
|
|
172
|
+
}),
|
|
173
|
+
warn: F({}, e, {
|
|
174
|
+
value: Y
|
|
175
|
+
}),
|
|
176
|
+
error: F({}, e, {
|
|
177
|
+
value: z
|
|
178
|
+
}),
|
|
179
|
+
group: F({}, e, {
|
|
180
|
+
value: J
|
|
181
|
+
}),
|
|
182
|
+
groupCollapsed: F({}, e, {
|
|
183
|
+
value: P
|
|
184
|
+
}),
|
|
185
|
+
groupEnd: F({}, e, {
|
|
186
|
+
value: re
|
|
187
|
+
})
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
D < 0 && E("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
var H = A.ReactCurrentDispatcher, K;
|
|
194
|
+
function B(e, r, i) {
|
|
195
|
+
{
|
|
196
|
+
if (K === void 0)
|
|
197
|
+
try {
|
|
198
|
+
throw Error();
|
|
199
|
+
} catch (p) {
|
|
200
|
+
var o = p.stack.trim().match(/\n( *(at )?)/);
|
|
201
|
+
K = o && o[1] || "";
|
|
202
|
+
}
|
|
203
|
+
return `
|
|
204
|
+
` + K + e;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
var q = !1, N;
|
|
208
|
+
{
|
|
209
|
+
var oe = typeof WeakMap == "function" ? WeakMap : Map;
|
|
210
|
+
N = new oe();
|
|
211
|
+
}
|
|
212
|
+
function je(e, r) {
|
|
213
|
+
if (!e || q)
|
|
214
|
+
return "";
|
|
215
|
+
{
|
|
216
|
+
var i = N.get(e);
|
|
217
|
+
if (i !== void 0)
|
|
218
|
+
return i;
|
|
219
|
+
}
|
|
220
|
+
var o;
|
|
221
|
+
q = !0;
|
|
222
|
+
var p = Error.prepareStackTrace;
|
|
223
|
+
Error.prepareStackTrace = void 0;
|
|
224
|
+
var y;
|
|
225
|
+
y = H.current, H.current = null, ie();
|
|
226
|
+
try {
|
|
227
|
+
if (r) {
|
|
228
|
+
var a = function() {
|
|
229
|
+
throw Error();
|
|
230
|
+
};
|
|
231
|
+
if (Object.defineProperty(a.prototype, "props", {
|
|
232
|
+
set: function() {
|
|
233
|
+
throw Error();
|
|
234
|
+
}
|
|
235
|
+
}), typeof Reflect == "object" && Reflect.construct) {
|
|
236
|
+
try {
|
|
237
|
+
Reflect.construct(a, []);
|
|
238
|
+
} catch (T) {
|
|
239
|
+
o = T;
|
|
240
|
+
}
|
|
241
|
+
Reflect.construct(e, [], a);
|
|
242
|
+
} else {
|
|
243
|
+
try {
|
|
244
|
+
a.call();
|
|
245
|
+
} catch (T) {
|
|
246
|
+
o = T;
|
|
247
|
+
}
|
|
248
|
+
e.call(a.prototype);
|
|
249
|
+
}
|
|
250
|
+
} else {
|
|
251
|
+
try {
|
|
252
|
+
throw Error();
|
|
253
|
+
} catch (T) {
|
|
254
|
+
o = T;
|
|
255
|
+
}
|
|
256
|
+
e();
|
|
257
|
+
}
|
|
258
|
+
} catch (T) {
|
|
259
|
+
if (T && o && typeof T.stack == "string") {
|
|
260
|
+
for (var l = T.stack.split(`
|
|
261
|
+
`), w = o.stack.split(`
|
|
262
|
+
`), _ = l.length - 1, x = w.length - 1; _ >= 1 && x >= 0 && l[_] !== w[x]; )
|
|
263
|
+
x--;
|
|
264
|
+
for (; _ >= 1 && x >= 0; _--, x--)
|
|
265
|
+
if (l[_] !== w[x]) {
|
|
266
|
+
if (_ !== 1 || x !== 1)
|
|
267
|
+
do
|
|
268
|
+
if (_--, x--, x < 0 || l[_] !== w[x]) {
|
|
269
|
+
var k = `
|
|
270
|
+
` + l[_].replace(" at new ", " at ");
|
|
271
|
+
return e.displayName && k.includes("<anonymous>") && (k = k.replace("<anonymous>", e.displayName)), typeof e == "function" && N.set(e, k), k;
|
|
272
|
+
}
|
|
273
|
+
while (_ >= 1 && x >= 0);
|
|
274
|
+
break;
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
} finally {
|
|
278
|
+
q = !1, H.current = y, ge(), Error.prepareStackTrace = p;
|
|
279
|
+
}
|
|
280
|
+
var U = e ? e.displayName || e.name : "", L = U ? B(U) : "";
|
|
281
|
+
return typeof e == "function" && N.set(e, L), L;
|
|
282
|
+
}
|
|
283
|
+
function Ke(e, r, i) {
|
|
284
|
+
return je(e, !1);
|
|
285
|
+
}
|
|
286
|
+
function Ge(e) {
|
|
287
|
+
var r = e.prototype;
|
|
288
|
+
return !!(r && r.isReactComponent);
|
|
289
|
+
}
|
|
290
|
+
function se(e, r, i) {
|
|
291
|
+
if (e == null)
|
|
292
|
+
return "";
|
|
293
|
+
if (typeof e == "function")
|
|
294
|
+
return je(e, Ge(e));
|
|
295
|
+
if (typeof e == "string")
|
|
296
|
+
return B(e);
|
|
297
|
+
switch (e) {
|
|
298
|
+
case j:
|
|
299
|
+
return B("Suspense");
|
|
300
|
+
case b:
|
|
301
|
+
return B("SuspenseList");
|
|
302
|
+
}
|
|
303
|
+
if (typeof e == "object")
|
|
304
|
+
switch (e.$$typeof) {
|
|
305
|
+
case u:
|
|
306
|
+
return Ke(e.render);
|
|
307
|
+
case S:
|
|
308
|
+
return se(e.type, r, i);
|
|
309
|
+
case C: {
|
|
310
|
+
var o = e, p = o._payload, y = o._init;
|
|
311
|
+
try {
|
|
312
|
+
return se(y(p), r, i);
|
|
313
|
+
} catch {
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
return "";
|
|
318
|
+
}
|
|
319
|
+
var G = Object.prototype.hasOwnProperty, Ee = {}, we = A.ReactDebugCurrentFrame;
|
|
320
|
+
function le(e) {
|
|
321
|
+
if (e) {
|
|
322
|
+
var r = e._owner, i = se(e.type, e._source, r ? r.type : null);
|
|
323
|
+
we.setExtraStackFrame(i);
|
|
324
|
+
} else
|
|
325
|
+
we.setExtraStackFrame(null);
|
|
326
|
+
}
|
|
327
|
+
function Xe(e, r, i, o, p) {
|
|
328
|
+
{
|
|
329
|
+
var y = Function.call.bind(G);
|
|
330
|
+
for (var a in e)
|
|
331
|
+
if (y(e, a)) {
|
|
332
|
+
var l = void 0;
|
|
333
|
+
try {
|
|
334
|
+
if (typeof e[a] != "function") {
|
|
335
|
+
var w = Error((o || "React class") + ": " + i + " type `" + a + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[a] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
336
|
+
throw w.name = "Invariant Violation", w;
|
|
337
|
+
}
|
|
338
|
+
l = e[a](r, a, o, i, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
339
|
+
} catch (_) {
|
|
340
|
+
l = _;
|
|
341
|
+
}
|
|
342
|
+
l && !(l instanceof Error) && (le(p), E("%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, a, typeof l), le(null)), l instanceof Error && !(l.message in Ee) && (Ee[l.message] = !0, le(p), E("Failed %s type: %s", i, l.message), le(null));
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
var Ze = Array.isArray;
|
|
347
|
+
function me(e) {
|
|
348
|
+
return Ze(e);
|
|
349
|
+
}
|
|
350
|
+
function Qe(e) {
|
|
351
|
+
{
|
|
352
|
+
var r = typeof Symbol == "function" && Symbol.toStringTag, i = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
353
|
+
return i;
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
function et(e) {
|
|
357
|
+
try {
|
|
358
|
+
return Ce(e), !1;
|
|
359
|
+
} catch {
|
|
360
|
+
return !0;
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
function Ce(e) {
|
|
364
|
+
return "" + e;
|
|
365
|
+
}
|
|
366
|
+
function Te(e) {
|
|
367
|
+
if (et(e))
|
|
368
|
+
return E("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);
|
|
369
|
+
}
|
|
370
|
+
var Se = A.ReactCurrentOwner, tt = {
|
|
371
|
+
key: !0,
|
|
372
|
+
ref: !0,
|
|
373
|
+
__self: !0,
|
|
374
|
+
__source: !0
|
|
375
|
+
}, Pe, ke;
|
|
376
|
+
function rt(e) {
|
|
377
|
+
if (G.call(e, "ref")) {
|
|
378
|
+
var r = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
379
|
+
if (r && r.isReactWarning)
|
|
380
|
+
return !1;
|
|
381
|
+
}
|
|
382
|
+
return e.ref !== void 0;
|
|
383
|
+
}
|
|
384
|
+
function nt(e) {
|
|
385
|
+
if (G.call(e, "key")) {
|
|
386
|
+
var r = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
387
|
+
if (r && r.isReactWarning)
|
|
388
|
+
return !1;
|
|
389
|
+
}
|
|
390
|
+
return e.key !== void 0;
|
|
391
|
+
}
|
|
392
|
+
function it(e, r) {
|
|
393
|
+
typeof e.ref == "string" && Se.current;
|
|
394
|
+
}
|
|
395
|
+
function ot(e, r) {
|
|
396
|
+
{
|
|
397
|
+
var i = function() {
|
|
398
|
+
Pe || (Pe = !0, E("%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));
|
|
399
|
+
};
|
|
400
|
+
i.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
401
|
+
get: i,
|
|
402
|
+
configurable: !0
|
|
403
|
+
});
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
function st(e, r) {
|
|
407
|
+
{
|
|
408
|
+
var i = function() {
|
|
409
|
+
ke || (ke = !0, E("%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));
|
|
410
|
+
};
|
|
411
|
+
i.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
412
|
+
get: i,
|
|
413
|
+
configurable: !0
|
|
414
|
+
});
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
var lt = function(e, r, i, o, p, y, a) {
|
|
418
|
+
var l = {
|
|
419
|
+
// This tag allows us to uniquely identify this as a React Element
|
|
420
|
+
$$typeof: v,
|
|
421
|
+
// Built-in properties that belong on the element
|
|
422
|
+
type: e,
|
|
423
|
+
key: r,
|
|
424
|
+
ref: i,
|
|
425
|
+
props: a,
|
|
426
|
+
// Record the component responsible for creating this element.
|
|
427
|
+
_owner: y
|
|
428
|
+
};
|
|
429
|
+
return l._store = {}, Object.defineProperty(l._store, "validated", {
|
|
430
|
+
configurable: !1,
|
|
431
|
+
enumerable: !1,
|
|
432
|
+
writable: !0,
|
|
433
|
+
value: !1
|
|
434
|
+
}), Object.defineProperty(l, "_self", {
|
|
435
|
+
configurable: !1,
|
|
436
|
+
enumerable: !1,
|
|
437
|
+
writable: !1,
|
|
438
|
+
value: o
|
|
439
|
+
}), Object.defineProperty(l, "_source", {
|
|
440
|
+
configurable: !1,
|
|
441
|
+
enumerable: !1,
|
|
442
|
+
writable: !1,
|
|
443
|
+
value: p
|
|
444
|
+
}), Object.freeze && (Object.freeze(l.props), Object.freeze(l)), l;
|
|
445
|
+
};
|
|
446
|
+
function at(e, r, i, o, p) {
|
|
447
|
+
{
|
|
448
|
+
var y, a = {}, l = null, w = null;
|
|
449
|
+
i !== void 0 && (Te(i), l = "" + i), nt(r) && (Te(r.key), l = "" + r.key), rt(r) && (w = r.ref, it(r, p));
|
|
450
|
+
for (y in r)
|
|
451
|
+
G.call(r, y) && !tt.hasOwnProperty(y) && (a[y] = r[y]);
|
|
452
|
+
if (e && e.defaultProps) {
|
|
453
|
+
var _ = e.defaultProps;
|
|
454
|
+
for (y in _)
|
|
455
|
+
a[y] === void 0 && (a[y] = _[y]);
|
|
456
|
+
}
|
|
457
|
+
if (l || w) {
|
|
458
|
+
var x = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
459
|
+
l && ot(a, x), w && st(a, x);
|
|
460
|
+
}
|
|
461
|
+
return lt(e, l, w, p, o, Se.current, a);
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
var ye = A.ReactCurrentOwner, Oe = A.ReactDebugCurrentFrame;
|
|
465
|
+
function M(e) {
|
|
466
|
+
if (e) {
|
|
467
|
+
var r = e._owner, i = se(e.type, e._source, r ? r.type : null);
|
|
468
|
+
Oe.setExtraStackFrame(i);
|
|
469
|
+
} else
|
|
470
|
+
Oe.setExtraStackFrame(null);
|
|
471
|
+
}
|
|
472
|
+
var de;
|
|
473
|
+
de = !1;
|
|
474
|
+
function _e(e) {
|
|
475
|
+
return typeof e == "object" && e !== null && e.$$typeof === v;
|
|
476
|
+
}
|
|
477
|
+
function Ie() {
|
|
478
|
+
{
|
|
479
|
+
if (ye.current) {
|
|
480
|
+
var e = I(ye.current.type);
|
|
481
|
+
if (e)
|
|
482
|
+
return `
|
|
483
|
+
|
|
484
|
+
Check the render method of \`` + e + "`.";
|
|
485
|
+
}
|
|
486
|
+
return "";
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
function ct(e) {
|
|
490
|
+
return "";
|
|
491
|
+
}
|
|
492
|
+
var Ae = {};
|
|
493
|
+
function ut(e) {
|
|
494
|
+
{
|
|
495
|
+
var r = Ie();
|
|
496
|
+
if (!r) {
|
|
497
|
+
var i = typeof e == "string" ? e : e.displayName || e.name;
|
|
498
|
+
i && (r = `
|
|
499
|
+
|
|
500
|
+
Check the top-level render call using <` + i + ">.");
|
|
501
|
+
}
|
|
502
|
+
return r;
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
function Fe(e, r) {
|
|
506
|
+
{
|
|
507
|
+
if (!e._store || e._store.validated || e.key != null)
|
|
508
|
+
return;
|
|
509
|
+
e._store.validated = !0;
|
|
510
|
+
var i = ut(r);
|
|
511
|
+
if (Ae[i])
|
|
512
|
+
return;
|
|
513
|
+
Ae[i] = !0;
|
|
514
|
+
var o = "";
|
|
515
|
+
e && e._owner && e._owner !== ye.current && (o = " It was passed a child from " + I(e._owner.type) + "."), M(e), E('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);
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
function qe(e, r) {
|
|
519
|
+
{
|
|
520
|
+
if (typeof e != "object")
|
|
521
|
+
return;
|
|
522
|
+
if (me(e))
|
|
523
|
+
for (var i = 0; i < e.length; i++) {
|
|
524
|
+
var o = e[i];
|
|
525
|
+
_e(o) && Fe(o, r);
|
|
526
|
+
}
|
|
527
|
+
else if (_e(e))
|
|
528
|
+
e._store && (e._store.validated = !0);
|
|
529
|
+
else if (e) {
|
|
530
|
+
var p = ce(e);
|
|
531
|
+
if (typeof p == "function" && p !== e.entries)
|
|
532
|
+
for (var y = p.call(e), a; !(a = y.next()).done; )
|
|
533
|
+
_e(a.value) && Fe(a.value, r);
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
function ft(e) {
|
|
538
|
+
{
|
|
539
|
+
var r = e.type;
|
|
540
|
+
if (r == null || typeof r == "string")
|
|
541
|
+
return;
|
|
542
|
+
var i;
|
|
543
|
+
if (typeof r == "function")
|
|
544
|
+
i = r.propTypes;
|
|
545
|
+
else if (typeof r == "object" && (r.$$typeof === u || // Note: Memo only checks outer props here.
|
|
546
|
+
// Inner props are checked in the reconciler.
|
|
547
|
+
r.$$typeof === S))
|
|
548
|
+
i = r.propTypes;
|
|
549
|
+
else
|
|
550
|
+
return;
|
|
551
|
+
if (i) {
|
|
552
|
+
var o = I(r);
|
|
553
|
+
Xe(i, e.props, "prop", o, e);
|
|
554
|
+
} else if (r.PropTypes !== void 0 && !de) {
|
|
555
|
+
de = !0;
|
|
556
|
+
var p = I(r);
|
|
557
|
+
E("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", p || "Unknown");
|
|
558
|
+
}
|
|
559
|
+
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && E("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
function pt(e) {
|
|
563
|
+
{
|
|
564
|
+
for (var r = Object.keys(e.props), i = 0; i < r.length; i++) {
|
|
565
|
+
var o = r[i];
|
|
566
|
+
if (o !== "children" && o !== "key") {
|
|
567
|
+
M(e), E("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", o), M(null);
|
|
568
|
+
break;
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
e.ref !== null && (M(e), E("Invalid attribute `ref` supplied to `React.Fragment`."), M(null));
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
var Ne = {};
|
|
575
|
+
function De(e, r, i, o, p, y) {
|
|
576
|
+
{
|
|
577
|
+
var a = $(e);
|
|
578
|
+
if (!a) {
|
|
579
|
+
var l = "";
|
|
580
|
+
(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.");
|
|
581
|
+
var w = ct();
|
|
582
|
+
w ? l += w : l += Ie();
|
|
583
|
+
var _;
|
|
584
|
+
e === null ? _ = "null" : me(e) ? _ = "array" : e !== void 0 && e.$$typeof === v ? (_ = "<" + (I(e.type) || "Unknown") + " />", l = " Did you accidentally export a JSX literal instead of a component?") : _ = typeof e, E("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", _, l);
|
|
585
|
+
}
|
|
586
|
+
var x = at(e, r, i, p, y);
|
|
587
|
+
if (x == null)
|
|
588
|
+
return x;
|
|
589
|
+
if (a) {
|
|
590
|
+
var k = r.children;
|
|
591
|
+
if (k !== void 0)
|
|
592
|
+
if (o)
|
|
593
|
+
if (me(k)) {
|
|
594
|
+
for (var U = 0; U < k.length; U++)
|
|
595
|
+
qe(k[U], e);
|
|
596
|
+
Object.freeze && Object.freeze(k);
|
|
597
|
+
} else
|
|
598
|
+
E("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
599
|
+
else
|
|
600
|
+
qe(k, e);
|
|
601
|
+
}
|
|
602
|
+
if (G.call(r, "key")) {
|
|
603
|
+
var L = I(e), T = Object.keys(r).filter(function(dt) {
|
|
604
|
+
return dt !== "key";
|
|
605
|
+
}), be = T.length > 0 ? "{key: someKey, " + T.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
606
|
+
if (!Ne[L + be]) {
|
|
607
|
+
var yt = T.length > 0 ? "{" + T.join(": ..., ") + ": ...}" : "{}";
|
|
608
|
+
E(`A props object containing a "key" prop is being spread into JSX:
|
|
609
|
+
let props = %s;
|
|
610
|
+
<%s {...props} />
|
|
611
|
+
React keys must be passed directly to JSX without using spread:
|
|
612
|
+
let props = %s;
|
|
613
|
+
<%s key={someKey} {...props} />`, be, L, yt, L), Ne[L + be] = !0;
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
return e === c ? pt(x) : ft(x), x;
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
function ht(e, r, i) {
|
|
620
|
+
return De(e, r, i, !0);
|
|
621
|
+
}
|
|
622
|
+
function vt(e, r, i) {
|
|
623
|
+
return De(e, r, i, !1);
|
|
624
|
+
}
|
|
625
|
+
var gt = vt, mt = ht;
|
|
626
|
+
Z.Fragment = c, Z.jsx = gt, Z.jsxs = mt;
|
|
627
|
+
}()), Z;
|
|
628
|
+
}
|
|
629
|
+
process.env.NODE_ENV === "production" ? xe.exports = Tt() : xe.exports = St();
|
|
630
|
+
var n = xe.exports;
|
|
631
|
+
const Pt = "_entityCard_qqftp_1", kt = "_pcCover_qqftp_15", Ot = "_pcSection_qqftp_31", It = "_pcBreadcrumbSep_qqftp_38", At = "_pcBasic_qqftp_43", Ft = "_pcBasicRow_qqftp_50", qt = "_pcBasicRowLeft_qqftp_57", Nt = "_pcLinkIconRight_qqftp_62", Dt = "_pcColorSwatch_qqftp_73", Lt = "_pcTitleText_qqftp_100", Wt = "_pcSubTitleText_qqftp_107", $t = "_pcProperties_qqftp_120", Bt = "_pcProperty_qqftp_128", Mt = "_pcTagsRow_qqftp_139", Ut = "_pcDetails_qqftp_152", Vt = "_pcRow_qqftp_158", Yt = "_pcCol_qqftp_73", zt = "_pcColLabel_qqftp_180", Jt = "_pcColValue_qqftp_184", Ht = "_pcProgressText_qqftp_189", Kt = "_entityLabel_qqftp_195", h = {
|
|
632
|
+
entityCard: Pt,
|
|
633
|
+
pcCover: kt,
|
|
634
|
+
pcSection: Ot,
|
|
635
|
+
pcBreadcrumbSep: It,
|
|
636
|
+
pcBasic: At,
|
|
637
|
+
pcBasicRow: Ft,
|
|
638
|
+
pcBasicRowLeft: qt,
|
|
639
|
+
pcLinkIconRight: Nt,
|
|
640
|
+
pcColorSwatch: Dt,
|
|
641
|
+
pcTitleText: Lt,
|
|
642
|
+
pcSubTitleText: Wt,
|
|
643
|
+
pcProperties: $t,
|
|
644
|
+
pcProperty: Bt,
|
|
645
|
+
pcTagsRow: Mt,
|
|
646
|
+
pcDetails: Ut,
|
|
647
|
+
pcRow: Vt,
|
|
648
|
+
pcCol: Yt,
|
|
649
|
+
pcColLabel: zt,
|
|
650
|
+
pcColValue: Jt,
|
|
651
|
+
pcProgressText: Ht,
|
|
652
|
+
entityLabel: Kt
|
|
653
|
+
}, Me = (t) => {
|
|
654
|
+
if (!t) return null;
|
|
655
|
+
const v = t.trim(), s = {
|
|
656
|
+
user: "User",
|
|
657
|
+
email: "Mail",
|
|
658
|
+
mail: "Mail",
|
|
659
|
+
phone: "Phone",
|
|
660
|
+
datetime: "Calendar",
|
|
661
|
+
date: "Calendar",
|
|
662
|
+
time: "Clock",
|
|
663
|
+
tags: "Tag"
|
|
664
|
+
}[v] ?? v.replace(/(^\w|-\w)/g, (m) => m.replace("-", "").toUpperCase());
|
|
665
|
+
return ze[s] || null;
|
|
666
|
+
}, Gt = (t, v) => {
|
|
667
|
+
const f = typeof t == "number" ? t : typeof t == "string" ? parseFloat(t) : NaN, c = isFinite(f) ? f <= 1 ? Math.max(0, Math.min(1, f)) * 100 : Math.max(0, Math.min(100, f)) : 0;
|
|
668
|
+
return /* @__PURE__ */ n.jsxs("div", { className: h.pcProgress, children: [
|
|
669
|
+
/* @__PURE__ */ n.jsx(
|
|
670
|
+
xt,
|
|
671
|
+
{
|
|
672
|
+
percent: c,
|
|
673
|
+
showInfo: !1,
|
|
674
|
+
strokeColor: "#027ffe",
|
|
675
|
+
size: { height: 12 }
|
|
676
|
+
}
|
|
677
|
+
),
|
|
678
|
+
(v == null ? void 0 : v.text) && /* @__PURE__ */ n.jsx("div", { className: h.pcProgressText, children: v.text })
|
|
679
|
+
] });
|
|
680
|
+
}, Je = (t) => !Array.isArray(t) || t.length === 0 ? null : /* @__PURE__ */ n.jsx("div", { className: h.pcTagsRow, children: t.map((v, f) => /* @__PURE__ */ n.jsx(
|
|
681
|
+
Ye,
|
|
682
|
+
{
|
|
683
|
+
color: "default",
|
|
684
|
+
style: {
|
|
685
|
+
display: "inline-flex",
|
|
686
|
+
alignItems: "center",
|
|
687
|
+
border: "none",
|
|
688
|
+
backgroundColor: "#E8E8E8",
|
|
689
|
+
color: "#027FFE"
|
|
690
|
+
},
|
|
691
|
+
children: String(v)
|
|
692
|
+
},
|
|
693
|
+
`${v}-${f}`
|
|
694
|
+
)) }), Xt = (t) => {
|
|
695
|
+
const { view: v, value: f, payload: c } = t;
|
|
696
|
+
return v === "percent_bar" ? Gt(f, c) : v === "tags" ? Je(Array.isArray(f) ? f : []) : /* @__PURE__ */ n.jsx("div", { className: h.pcColValue, children: String(f ?? "") });
|
|
697
|
+
}, He = ({
|
|
698
|
+
data: t
|
|
699
|
+
}) => {
|
|
700
|
+
var v, f, c;
|
|
701
|
+
return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
702
|
+
(t == null ? void 0 : t.cover) && /* @__PURE__ */ n.jsx(
|
|
703
|
+
"div",
|
|
704
|
+
{
|
|
705
|
+
className: h.pcCover,
|
|
706
|
+
style: { height: (v = t == null ? void 0 : t.style) == null ? void 0 : v.cover_max_height },
|
|
707
|
+
children: /* @__PURE__ */ n.jsx("img", { src: t.cover, alt: "cover" })
|
|
708
|
+
}
|
|
709
|
+
),
|
|
710
|
+
Array.isArray(t == null ? void 0 : t.categories) && t.categories.length > 0 && /* @__PURE__ */ n.jsx("div", { className: h.pcSection, children: /* @__PURE__ */ n.jsx(
|
|
711
|
+
bt,
|
|
712
|
+
{
|
|
713
|
+
items: t.categories.map((s, g) => ({
|
|
714
|
+
key: `${s}-${g}`,
|
|
715
|
+
title: s
|
|
716
|
+
})),
|
|
717
|
+
separator: /* @__PURE__ */ n.jsx("span", { className: h.pcBreadcrumbSep, children: "/" })
|
|
718
|
+
}
|
|
719
|
+
) }),
|
|
720
|
+
((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)) && /* @__PURE__ */ n.jsx("div", { className: h.pcBasic, children: /* @__PURE__ */ n.jsxs("div", { className: h.pcBasicRow, children: [
|
|
721
|
+
/* @__PURE__ */ n.jsxs("div", { className: h.pcBasicRowLeft, children: [
|
|
722
|
+
(t == null ? void 0 : t.color) && /* @__PURE__ */ n.jsx(
|
|
723
|
+
"span",
|
|
724
|
+
{
|
|
725
|
+
className: h.pcColorSwatch,
|
|
726
|
+
style: { backgroundColor: t.color },
|
|
727
|
+
"aria-label": `color ${t.color}`,
|
|
728
|
+
title: `color: ${t.color}`
|
|
729
|
+
}
|
|
730
|
+
),
|
|
731
|
+
(() => {
|
|
732
|
+
var m;
|
|
733
|
+
const s = (m = t == null ? void 0 : t.icon) == null ? void 0 : m.trim();
|
|
734
|
+
if (s && /^https?:\/\/+/i.test(s))
|
|
735
|
+
return /* @__PURE__ */ n.jsx(
|
|
736
|
+
"img",
|
|
737
|
+
{
|
|
738
|
+
src: s,
|
|
739
|
+
alt: "icon",
|
|
740
|
+
className: h.pcIcon,
|
|
741
|
+
width: 18,
|
|
742
|
+
height: 18,
|
|
743
|
+
style: { objectFit: "contain" }
|
|
744
|
+
}
|
|
745
|
+
);
|
|
746
|
+
const g = Me(s);
|
|
747
|
+
return g ? /* @__PURE__ */ n.jsx(g, { className: h.pcIcon, size: 18, strokeWidth: 2 }) : null;
|
|
748
|
+
})(),
|
|
749
|
+
(t == null ? void 0 : t.title) && /* @__PURE__ */ n.jsx("span", { className: h.pcTitleText, title: t.title, children: t.title }),
|
|
750
|
+
(t == null ? void 0 : t.subtitle) && /* @__PURE__ */ n.jsxs("span", { className: h.pcSubTitleText, title: t.subtitle, children: [
|
|
751
|
+
"| ",
|
|
752
|
+
t.subtitle
|
|
753
|
+
] })
|
|
754
|
+
] }),
|
|
755
|
+
(t == null ? void 0 : t.url) && /* @__PURE__ */ n.jsx(
|
|
756
|
+
"a",
|
|
757
|
+
{
|
|
758
|
+
href: t.url,
|
|
759
|
+
target: "_blank",
|
|
760
|
+
rel: "noreferrer",
|
|
761
|
+
"aria-label": "open link",
|
|
762
|
+
title: t.url,
|
|
763
|
+
className: h.pcLinkIconRight,
|
|
764
|
+
children: /* @__PURE__ */ n.jsx(
|
|
765
|
+
wt,
|
|
766
|
+
{
|
|
767
|
+
style: { width: 12, height: 12, color: "#027FFE" }
|
|
768
|
+
}
|
|
769
|
+
)
|
|
770
|
+
}
|
|
771
|
+
)
|
|
772
|
+
] }) }),
|
|
773
|
+
Array.isArray(t == null ? void 0 : t.properties) && t.properties.length > 0 && /* @__PURE__ */ n.jsx("div", { className: h.pcSection, children: /* @__PURE__ */ n.jsx("div", { className: h.pcProperties, children: t.properties.map((s, g) => {
|
|
774
|
+
const m = Me(s.icon), R = () => {
|
|
775
|
+
if (s.view === "tags")
|
|
776
|
+
return Je(Array.isArray(s.value) ? s.value : []);
|
|
777
|
+
if (s.view === "datetime_with_time_zone") {
|
|
778
|
+
const u = String(s.value ?? "");
|
|
779
|
+
return /* @__PURE__ */ n.jsx("span", { className: h.pcPropertyValue, children: u });
|
|
780
|
+
}
|
|
781
|
+
return /* @__PURE__ */ n.jsx("span", { className: h.pcPropertyValue, children: String(s.value ?? "") });
|
|
782
|
+
};
|
|
783
|
+
return /* @__PURE__ */ n.jsxs("div", { className: h.pcProperty, children: [
|
|
784
|
+
m && /* @__PURE__ */ n.jsx(
|
|
785
|
+
m,
|
|
786
|
+
{
|
|
787
|
+
className: h.pcPropertyIcon,
|
|
788
|
+
size: 16,
|
|
789
|
+
strokeWidth: 2
|
|
790
|
+
}
|
|
791
|
+
),
|
|
792
|
+
R()
|
|
793
|
+
] }, g);
|
|
794
|
+
}) }) }),
|
|
795
|
+
Array.isArray((c = (f = t == null ? void 0 : t.details) == null ? void 0 : f.table) == null ? void 0 : c.rows) && t.details.table.rows.length > 0 && /* @__PURE__ */ n.jsx("div", { className: h.pcSection, children: /* @__PURE__ */ n.jsx("div", { className: h.pcDetails, children: t.details.table.rows.map((s, g) => {
|
|
796
|
+
const m = Array.isArray(s.columns) ? s.columns.filter(
|
|
797
|
+
(u) => u && (u.label !== void 0 || u.value !== void 0)
|
|
798
|
+
) : [], R = m.length;
|
|
799
|
+
return /* @__PURE__ */ n.jsx(
|
|
800
|
+
"div",
|
|
801
|
+
{
|
|
802
|
+
className: h.pcRow,
|
|
803
|
+
style: {
|
|
804
|
+
gridTemplateColumns: R <= 1 ? "1fr" : "repeat(2, minmax(0, 1fr))"
|
|
805
|
+
},
|
|
806
|
+
children: m.map((u, j) => /* @__PURE__ */ n.jsxs("div", { className: h.pcCol, children: [
|
|
807
|
+
Xt(u),
|
|
808
|
+
u.label && /* @__PURE__ */ n.jsx("div", { className: h.pcColLabel, children: u.label })
|
|
809
|
+
] }, j))
|
|
810
|
+
},
|
|
811
|
+
g
|
|
812
|
+
);
|
|
813
|
+
}) }) }),
|
|
814
|
+
Array.isArray(t == null ? void 0 : t.tags) && t.tags.length > 0 && /* @__PURE__ */ n.jsx("div", { className: h.pcSection, children: t.tags.map((s, g) => /* @__PURE__ */ n.jsx(
|
|
815
|
+
Ye,
|
|
816
|
+
{
|
|
817
|
+
style: {
|
|
818
|
+
display: "inline-flex",
|
|
819
|
+
alignItems: "center",
|
|
820
|
+
gap: 4,
|
|
821
|
+
color: "#027FFE",
|
|
822
|
+
border: "none"
|
|
823
|
+
},
|
|
824
|
+
icon: /* @__PURE__ */ n.jsx(Ct, { style: { width: 12, height: 12 } }),
|
|
825
|
+
color: "default",
|
|
826
|
+
children: s
|
|
827
|
+
},
|
|
828
|
+
g
|
|
829
|
+
)) })
|
|
830
|
+
] });
|
|
831
|
+
}, ir = ({
|
|
832
|
+
title: t,
|
|
833
|
+
subtitle: v,
|
|
834
|
+
description: f,
|
|
835
|
+
imageUrl: c,
|
|
836
|
+
actions: s = [],
|
|
837
|
+
footer: g,
|
|
838
|
+
triggerType: m = "hover",
|
|
839
|
+
popupMode: R = "modal",
|
|
840
|
+
trigger: u,
|
|
841
|
+
open: j,
|
|
842
|
+
onOpenChange: b,
|
|
843
|
+
modalTitle: S,
|
|
844
|
+
width: C,
|
|
845
|
+
placement: O = "right",
|
|
846
|
+
data: W,
|
|
847
|
+
hoverOpenDelay: ae = 500,
|
|
848
|
+
closeDelay: ce = 200,
|
|
849
|
+
autoPlacement: A = !1,
|
|
850
|
+
hoverAutoClose: E = !1,
|
|
851
|
+
hoverAutoCloseDelay: Re = 2e3
|
|
852
|
+
}) => {
|
|
853
|
+
var V, Y, z, J;
|
|
854
|
+
const [ue, fe] = Le(!1), Q = typeof j == "boolean", pe = Q ? j : ue, he = (P) => {
|
|
855
|
+
Q ? b == null || b(P) : fe(P);
|
|
856
|
+
}, d = W, $ = _t(null), [ve, ee] = Le(O), I = () => {
|
|
857
|
+
if (!$.current) return;
|
|
858
|
+
const P = $.current.getBoundingClientRect(), re = window.innerWidth, ne = window.innerHeight, ie = (() => {
|
|
859
|
+
var oe;
|
|
860
|
+
const N = (typeof C == "number" ? C : void 0) ?? ((oe = d == null ? void 0 : d.style) == null ? void 0 : oe.width);
|
|
861
|
+
return N ? typeof N == "string" ? parseInt(N, 10) || 376 : N : 376;
|
|
862
|
+
})(), ge = 300, H = re - P.right, K = P.left, B = ne - P.bottom;
|
|
863
|
+
P.top;
|
|
864
|
+
let q = O;
|
|
865
|
+
H >= ie ? q = "right" : K >= ie ? q = "left" : B >= ge ? q = "bottom" : q = "top", ee(q);
|
|
866
|
+
}, F = /* @__PURE__ */ n.jsx(Rt, { type: "default", children: `打开:${(d == null ? void 0 : d.title) ?? t ?? "详情"}` }), D = /* @__PURE__ */ n.jsx("span", { ref: $, style: { display: "inline-block" }, children: u ?? F }), te = /* @__PURE__ */ n.jsx(
|
|
867
|
+
jt,
|
|
868
|
+
{
|
|
869
|
+
content: /* @__PURE__ */ n.jsx(
|
|
870
|
+
"div",
|
|
871
|
+
{
|
|
872
|
+
className: h.entityCard,
|
|
873
|
+
style: {
|
|
874
|
+
width: (V = d == null ? void 0 : d.style) == null ? void 0 : V.width,
|
|
875
|
+
height: (Y = d == null ? void 0 : d.style) == null ? void 0 : Y.height,
|
|
876
|
+
maxWidth: (z = d == null ? void 0 : d.style) == null ? void 0 : z.max_width,
|
|
877
|
+
maxHeight: (J = d == null ? void 0 : d.style) == null ? void 0 : J.max_height
|
|
878
|
+
},
|
|
879
|
+
children: d != null && d.id ? /* @__PURE__ */ n.jsx(He, { data: d }) : /* @__PURE__ */ n.jsx(
|
|
880
|
+
Et,
|
|
881
|
+
{
|
|
882
|
+
active: !0,
|
|
883
|
+
title: !1,
|
|
884
|
+
avatar: { shape: "circle", size: 24 },
|
|
885
|
+
paragraph: { rows: 3 }
|
|
886
|
+
}
|
|
887
|
+
)
|
|
888
|
+
}
|
|
889
|
+
),
|
|
890
|
+
open: pe,
|
|
891
|
+
onOpenChange: (P) => {
|
|
892
|
+
P && A && I(), he(!!P);
|
|
893
|
+
},
|
|
894
|
+
trigger: m,
|
|
895
|
+
placement: A ? ve : O,
|
|
896
|
+
mouseEnterDelay: m === "hover" ? ae / 1e3 : 0,
|
|
897
|
+
mouseLeaveDelay: m === "hover" ? ce / 1e3 : 0,
|
|
898
|
+
autoAdjustOverflow: !0,
|
|
899
|
+
getPopupContainer: () => $.current || document.body,
|
|
900
|
+
overlayInnerStyle: { padding: 0 },
|
|
901
|
+
children: D
|
|
902
|
+
}
|
|
903
|
+
);
|
|
904
|
+
return /* @__PURE__ */ n.jsx(n.Fragment, { children: te });
|
|
905
|
+
}, Zt = (t) => {
|
|
906
|
+
const v = t.trim(), c = {
|
|
907
|
+
user: "User",
|
|
908
|
+
email: "Mail",
|
|
909
|
+
mail: "Mail",
|
|
910
|
+
phone: "Phone",
|
|
911
|
+
datetime: "Calendar",
|
|
912
|
+
date: "Calendar",
|
|
913
|
+
time: "Clock",
|
|
914
|
+
tags: "Tag"
|
|
915
|
+
}[v] ?? v.replace(/(^\w|-\w)/g, (g) => g.replace("-", "").toUpperCase());
|
|
916
|
+
return ze[c] || null;
|
|
917
|
+
}, Qt = (t) => {
|
|
918
|
+
if (t) {
|
|
919
|
+
if (/^mailto:/i.test(t))
|
|
920
|
+
try {
|
|
921
|
+
return decodeURIComponent(t.slice(7));
|
|
922
|
+
} catch {
|
|
923
|
+
return t.slice(7);
|
|
924
|
+
}
|
|
925
|
+
return t;
|
|
926
|
+
}
|
|
927
|
+
}, Ue = () => /* @__PURE__ */ n.jsxs(
|
|
928
|
+
"span",
|
|
929
|
+
{
|
|
930
|
+
style: {
|
|
931
|
+
display: "inline-flex",
|
|
932
|
+
alignItems: "center",
|
|
933
|
+
gap: 8,
|
|
934
|
+
verticalAlign: "middle"
|
|
935
|
+
},
|
|
936
|
+
"aria-label": "entity user skeleton",
|
|
937
|
+
children: [
|
|
938
|
+
/* @__PURE__ */ n.jsx(
|
|
939
|
+
"span",
|
|
940
|
+
{
|
|
941
|
+
style: {
|
|
942
|
+
width: 20,
|
|
943
|
+
height: 20,
|
|
944
|
+
borderRadius: "50%",
|
|
945
|
+
backgroundColor: "#e9e9e9",
|
|
946
|
+
flex: "0 0 auto"
|
|
947
|
+
}
|
|
948
|
+
}
|
|
949
|
+
),
|
|
950
|
+
/* @__PURE__ */ n.jsx(
|
|
951
|
+
"span",
|
|
952
|
+
{
|
|
953
|
+
style: {
|
|
954
|
+
width: 160,
|
|
955
|
+
height: 20,
|
|
956
|
+
borderRadius: 6,
|
|
957
|
+
backgroundColor: "#e9e9e9",
|
|
958
|
+
flex: "0 0 auto"
|
|
959
|
+
}
|
|
960
|
+
}
|
|
961
|
+
)
|
|
962
|
+
]
|
|
963
|
+
}
|
|
964
|
+
), er = ({ data: t }) => {
|
|
965
|
+
var b, S;
|
|
966
|
+
if (!t || !t.title && !t.icon && !t.subtitle && !t.color && !t.url) return /* @__PURE__ */ n.jsx(Ue, {});
|
|
967
|
+
const f = (b = t == null ? void 0 : t.icon) == null ? void 0 : b.trim(), c = (S = t == null ? void 0 : t.title) == null ? void 0 : S.trim(), s = Qt(t == null ? void 0 : t.url), g = !!f, m = !!c, R = !!s, u = !!(t != null && t.color) || !!(t != null && t.subtitle), j = (C = 20) => {
|
|
968
|
+
if (f && /^https?:\/\//i.test(f))
|
|
969
|
+
return /* @__PURE__ */ n.jsx(We, { size: C, src: f });
|
|
970
|
+
const O = Zt(f || "user"), W = Math.max(8, C - 4);
|
|
971
|
+
return /* @__PURE__ */ n.jsx(We, { size: C, icon: O ? /* @__PURE__ */ n.jsx(O, { size: W }) : void 0 });
|
|
972
|
+
};
|
|
973
|
+
return g && m && !R && !u ? /* @__PURE__ */ n.jsxs("span", { style: { display: "inline-flex", alignItems: "center", gap: 8 }, children: [
|
|
974
|
+
j(),
|
|
975
|
+
/* @__PURE__ */ n.jsx("span", { style: { color: "#027FFE", fontWeight: 500, lineHeight: "20px" }, title: c, children: c })
|
|
976
|
+
] }) : g && !m && !R && !u ? /* @__PURE__ */ n.jsx("span", { style: { display: "inline-flex" }, children: j() }) : !g && m && !R && !u ? /* @__PURE__ */ n.jsx(
|
|
977
|
+
"span",
|
|
978
|
+
{
|
|
979
|
+
style: { display: "inline-block", color: "#027FFE", fontWeight: 500 },
|
|
980
|
+
title: c,
|
|
981
|
+
children: c
|
|
982
|
+
}
|
|
983
|
+
) : g && m && R ? /* @__PURE__ */ n.jsxs("span", { style: { display: "inline-flex", alignItems: "center", gap: 8 }, children: [
|
|
984
|
+
j(40),
|
|
985
|
+
/* @__PURE__ */ n.jsxs("span", { style: { display: "inline-flex", flexDirection: "column", justifyContent: "space-between" }, children: [
|
|
986
|
+
/* @__PURE__ */ n.jsx("span", { style: { color: "#027FFE", fontWeight: 500 }, title: c, children: c }),
|
|
987
|
+
/* @__PURE__ */ n.jsx("span", { style: { color: "#888", fontSize: 12 }, title: s, children: s })
|
|
988
|
+
] })
|
|
989
|
+
] }) : g && m && u ? /* @__PURE__ */ n.jsxs("span", { style: { display: "inline-flex", alignItems: "center", gap: 8 }, children: [
|
|
990
|
+
j(40),
|
|
991
|
+
/* @__PURE__ */ n.jsxs("span", { style: { display: "inline-flex", flexDirection: "column", justifyContent: "space-between" }, children: [
|
|
992
|
+
/* @__PURE__ */ n.jsx("span", { style: { color: "#027FFE", fontWeight: 500 }, title: c, children: c }),
|
|
993
|
+
/* @__PURE__ */ n.jsxs(
|
|
994
|
+
"span",
|
|
995
|
+
{
|
|
996
|
+
style: {
|
|
997
|
+
marginTop: 4,
|
|
998
|
+
display: "inline-flex",
|
|
999
|
+
alignItems: "center",
|
|
1000
|
+
gap: 6,
|
|
1001
|
+
fontSize: 12,
|
|
1002
|
+
color: "#666"
|
|
1003
|
+
},
|
|
1004
|
+
title: t == null ? void 0 : t.subtitle,
|
|
1005
|
+
children: [
|
|
1006
|
+
(t == null ? void 0 : t.color) && /* @__PURE__ */ n.jsx(
|
|
1007
|
+
"span",
|
|
1008
|
+
{
|
|
1009
|
+
style: {
|
|
1010
|
+
width: 12,
|
|
1011
|
+
height: 12,
|
|
1012
|
+
borderRadius: "50%",
|
|
1013
|
+
backgroundColor: t.color
|
|
1014
|
+
}
|
|
1015
|
+
}
|
|
1016
|
+
),
|
|
1017
|
+
t == null ? void 0 : t.subtitle
|
|
1018
|
+
]
|
|
1019
|
+
}
|
|
1020
|
+
)
|
|
1021
|
+
] })
|
|
1022
|
+
] }) : m ? /* @__PURE__ */ n.jsx("span", { style: { color: "#027FFE", fontWeight: 500 }, title: c, children: c }) : /* @__PURE__ */ n.jsx(Ue, {});
|
|
1023
|
+
};
|
|
1024
|
+
function or({ data: t }) {
|
|
1025
|
+
var f, c, s, g;
|
|
1026
|
+
const v = ((t == null ? void 0 : t.type) ?? "").toLowerCase() === "user";
|
|
1027
|
+
return /* @__PURE__ */ n.jsx(
|
|
1028
|
+
"div",
|
|
1029
|
+
{
|
|
1030
|
+
className: h.entityLabel,
|
|
1031
|
+
style: {
|
|
1032
|
+
width: (f = t == null ? void 0 : t.style) == null ? void 0 : f.width,
|
|
1033
|
+
height: (c = t == null ? void 0 : t.style) == null ? void 0 : c.height,
|
|
1034
|
+
maxWidth: (s = t == null ? void 0 : t.style) == null ? void 0 : s.max_width,
|
|
1035
|
+
maxHeight: (g = t == null ? void 0 : t.style) == null ? void 0 : g.max_height
|
|
1036
|
+
},
|
|
1037
|
+
children: t != null && t.id ? v ? /* @__PURE__ */ n.jsx(er, { data: t }) : /* @__PURE__ */ n.jsx(He, { data: t }) : /* @__PURE__ */ n.jsxs(
|
|
1038
|
+
"span",
|
|
1039
|
+
{
|
|
1040
|
+
style: {
|
|
1041
|
+
display: "inline-flex",
|
|
1042
|
+
alignItems: "center",
|
|
1043
|
+
gap: 10,
|
|
1044
|
+
verticalAlign: "middle"
|
|
1045
|
+
},
|
|
1046
|
+
"aria-label": "entity label skeleton",
|
|
1047
|
+
children: [
|
|
1048
|
+
/* @__PURE__ */ n.jsx(
|
|
1049
|
+
"span",
|
|
1050
|
+
{
|
|
1051
|
+
style: {
|
|
1052
|
+
width: 20,
|
|
1053
|
+
height: 20,
|
|
1054
|
+
borderRadius: "50%",
|
|
1055
|
+
backgroundColor: "#e9e9e9",
|
|
1056
|
+
flex: "0 0 auto"
|
|
1057
|
+
}
|
|
1058
|
+
}
|
|
1059
|
+
),
|
|
1060
|
+
/* @__PURE__ */ n.jsx(
|
|
1061
|
+
"span",
|
|
1062
|
+
{
|
|
1063
|
+
style: {
|
|
1064
|
+
width: 160,
|
|
1065
|
+
height: 20,
|
|
1066
|
+
borderRadius: 6,
|
|
1067
|
+
backgroundColor: "#e9e9e9",
|
|
1068
|
+
flex: "0 0 auto"
|
|
1069
|
+
}
|
|
1070
|
+
}
|
|
1071
|
+
)
|
|
1072
|
+
]
|
|
1073
|
+
}
|
|
1074
|
+
)
|
|
1075
|
+
}
|
|
1076
|
+
);
|
|
1077
|
+
}
|
|
1078
|
+
export {
|
|
1079
|
+
ir as EntityCard,
|
|
1080
|
+
or as EntityLabel,
|
|
1081
|
+
er as EntityUser
|
|
1082
|
+
};
|