@object-ui/plugin-aggrid 3.1.2 → 3.1.4
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/.turbo/turbo-build.log +60 -91
- package/CHANGELOG.md +22 -0
- package/dist/AddressField-DKqaE9pD.js +93 -0
- package/dist/AgGridImpl-BD5cjyc0.js +226 -0
- package/dist/AutoNumberField-0RU2dNKe.js +13 -0
- package/dist/AvatarField-IZTLB0Ye.js +82 -0
- package/dist/BooleanField-DRzAZhSq.js +40 -0
- package/dist/CodeField-RWhnDMyL.js +22 -0
- package/dist/ColorField-B-YAFXdz.js +37 -0
- package/dist/CurrencyField-Bu80a-sI.js +51 -0
- package/dist/DateField-CV-NpLbM.js +21 -0
- package/dist/DateTimeField--YTsgTjw.js +32 -0
- package/dist/EmailField-B-3fWJsH.js +28 -0
- package/dist/FileField-DxxdESfc.js +160 -0
- package/dist/FormulaField-MQXJZOep.js +13 -0
- package/dist/GeolocationField-BzKgcWLN.js +156 -0
- package/dist/GridField-DHsGo9l2.js +51 -0
- package/dist/ImageField-DK7sUV6b.js +77 -0
- package/dist/LocationField-DSvhU9Dz.js +35 -0
- package/dist/LookupField-Dmzju5Q0.js +1033 -0
- package/dist/MasterDetailField-CPLHbe_Y.js +109 -0
- package/dist/NumberField-JaSlPVXs.js +26 -0
- package/dist/ObjectAgGridImpl-4uephlvO.js +19998 -0
- package/dist/ObjectField-FzUYlu-m.js +52 -0
- package/dist/PasswordField-d6E-vKBI.js +60 -0
- package/dist/PercentField-D2_kMuC_.js +63 -0
- package/dist/PhoneField-DOaMivd6.js +28 -0
- package/dist/QRCodeField-BIQhc73N.js +144 -0
- package/dist/RatingField-BKAGmlzh.js +42 -0
- package/dist/RichTextField-D4FIV9V8.js +32 -0
- package/dist/SelectField-C2gtlnLZ.js +30 -0
- package/dist/SignatureField-fFEb0h_C.js +98 -0
- package/dist/SliderField-BlAlK3g2.js +34 -0
- package/dist/SummaryField-Dy2Kkj6M.js +18 -0
- package/dist/TextAreaField-BCUkjKTc.js +36 -0
- package/dist/TextField-XWOnbUrk.js +29 -0
- package/dist/TimeField-CZdzdqOO.js +21 -0
- package/dist/UrlField-sq1mpRoG.js +33 -0
- package/dist/UserField-Dqk38Arc.js +79 -0
- package/dist/VectorField-CY70VLiW.js +35 -0
- package/dist/createLucideIcon-CWx7zIL1.js +39 -0
- package/dist/image-Cm7ExMY2.js +24 -0
- package/dist/index.css +2 -1
- package/dist/index.js +503 -8
- package/dist/index.umd.cjs +116 -112
- package/dist/jsx-runtime-CGDkM_Jn.js +189 -0
- package/dist/plus-CsEgF66K.js +10 -0
- package/dist/upload-B1x-ueFd.js +17 -0
- package/dist/x-Bwhzfvtg.js +10 -0
- package/package.json +9 -9
- package/dist/AddressField-D2Yli537.js +0 -95
- package/dist/AgGridImpl-GwI1UT7v.js +0 -229
- package/dist/AutoNumberField-Y3hL1ZoW.js +0 -8
- package/dist/FileField-BHv22jrG.js +0 -144
- package/dist/FormulaField-B-JSCA7E.js +0 -9
- package/dist/GeolocationField-DxnVAm8n.js +0 -141
- package/dist/GridField-7A4mvr7x.js +0 -29
- package/dist/LocationField-o8Z6x8qV.js +0 -33
- package/dist/MasterDetailField-CnzHQ-jU.js +0 -117
- package/dist/ObjectAgGridImpl-CujXHJ0J.js +0 -28833
- package/dist/ObjectField-BAVt0fMs.js +0 -51
- package/dist/QRCodeField-VAlAXUkP.js +0 -96
- package/dist/RichTextField-DylJITFH.js +0 -37
- package/dist/SignatureField-BrGCC7_j.js +0 -96
- package/dist/SummaryField-BPPAEVC6.js +0 -9
- package/dist/UserField-CWZQprry.js +0 -49
- package/dist/VectorField-CIvFEC07.js +0 -25
- package/dist/index-BfSjmySi.js +0 -662
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { j as t } from "./index-BfSjmySi.js";
|
|
2
|
-
import { useState as m, useEffect as h } from "react";
|
|
3
|
-
import { cn as u, Textarea as y } from "@object-ui/components";
|
|
4
|
-
function p({ value: r, onChange: c, field: x, readonly: a, ...s }) {
|
|
5
|
-
const g = x || s.schema, N = () => r == null ? "" : JSON.stringify(r, null, 2), [e, n] = m(N), [i, d] = m(null);
|
|
6
|
-
if (h(() => {
|
|
7
|
-
try {
|
|
8
|
-
if (r == null) {
|
|
9
|
-
n("");
|
|
10
|
-
return;
|
|
11
|
-
}
|
|
12
|
-
const l = e ? JSON.parse(e) : null;
|
|
13
|
-
JSON.stringify(l) !== JSON.stringify(r) && n(JSON.stringify(r, null, 2));
|
|
14
|
-
} catch {
|
|
15
|
-
n(JSON.stringify(r, null, 2));
|
|
16
|
-
}
|
|
17
|
-
}, [r, e]), a)
|
|
18
|
-
return r ? /* @__PURE__ */ t.jsx("pre", { className: u("text-xs bg-gray-50 p-2 rounded border border-gray-200 overflow-auto max-h-40", s.className), children: JSON.stringify(r, null, 2) }) : /* @__PURE__ */ t.jsx("span", { className: "text-sm", children: "-" });
|
|
19
|
-
const S = (l) => {
|
|
20
|
-
const o = l.target.value;
|
|
21
|
-
if (n(o), d(null), !o.trim()) {
|
|
22
|
-
c(null);
|
|
23
|
-
return;
|
|
24
|
-
}
|
|
25
|
-
try {
|
|
26
|
-
const f = JSON.parse(o);
|
|
27
|
-
c(f);
|
|
28
|
-
} catch {
|
|
29
|
-
d("Invalid JSON");
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
return /* @__PURE__ */ t.jsxs("div", { className: "space-y-1", children: [
|
|
33
|
-
/* @__PURE__ */ t.jsx(
|
|
34
|
-
y,
|
|
35
|
-
{
|
|
36
|
-
value: e,
|
|
37
|
-
onChange: S,
|
|
38
|
-
placeholder: g?.placeholder || `{
|
|
39
|
-
"key": "value"
|
|
40
|
-
}`,
|
|
41
|
-
disabled: a || s.disabled,
|
|
42
|
-
className: u("font-mono text-xs", i ? "border-red-500 focus-visible:ring-red-500" : "", s.className),
|
|
43
|
-
rows: 6
|
|
44
|
-
}
|
|
45
|
-
),
|
|
46
|
-
i && /* @__PURE__ */ t.jsx("p", { className: "text-xs text-red-500", children: i })
|
|
47
|
-
] });
|
|
48
|
-
}
|
|
49
|
-
export {
|
|
50
|
-
p as ObjectField
|
|
51
|
-
};
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import { j as e } from "./index-BfSjmySi.js";
|
|
2
|
-
import y from "react";
|
|
3
|
-
import { Button as a, Input as j } from "@object-ui/components";
|
|
4
|
-
import { c as d } from "./ObjectAgGridImpl-CujXHJ0J.js";
|
|
5
|
-
const g = [
|
|
6
|
-
["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
|
|
7
|
-
["path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2", key: "zix9uf" }]
|
|
8
|
-
], k = d("copy", g);
|
|
9
|
-
const f = [
|
|
10
|
-
["rect", { width: "5", height: "5", x: "3", y: "3", rx: "1", key: "1tu5fj" }],
|
|
11
|
-
["rect", { width: "5", height: "5", x: "16", y: "3", rx: "1", key: "1v8r4q" }],
|
|
12
|
-
["rect", { width: "5", height: "5", x: "3", y: "16", rx: "1", key: "1x03jg" }],
|
|
13
|
-
["path", { d: "M21 16h-3a2 2 0 0 0-2 2v3", key: "177gqh" }],
|
|
14
|
-
["path", { d: "M21 21v.01", key: "ents32" }],
|
|
15
|
-
["path", { d: "M12 7v3a2 2 0 0 1-2 2H7", key: "8crl2c" }],
|
|
16
|
-
["path", { d: "M3 12h.01", key: "nlz23k" }],
|
|
17
|
-
["path", { d: "M12 3h.01", key: "n36tog" }],
|
|
18
|
-
["path", { d: "M12 16v.01", key: "133mhm" }],
|
|
19
|
-
["path", { d: "M16 12h1", key: "1slzba" }],
|
|
20
|
-
["path", { d: "M21 12v.01", key: "1lwtk9" }],
|
|
21
|
-
["path", { d: "M12 21v-1", key: "1880an" }]
|
|
22
|
-
], n = d("qr-code", f);
|
|
23
|
-
function R({ value: t, onChange: h, field: l, readonly: o, ...c }) {
|
|
24
|
-
const [s, i] = y.useState(!1), x = l || c.schema, m = (r) => `https://api.qrserver.com/v1/create-qr-code/?size=200x200&data=${encodeURIComponent(r)}`, p = () => {
|
|
25
|
-
t && navigator.clipboard.writeText(t);
|
|
26
|
-
};
|
|
27
|
-
return o ? /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
28
|
-
/* @__PURE__ */ e.jsx("span", { className: "text-sm flex-1 truncate", children: t || "-" }),
|
|
29
|
-
t && /* @__PURE__ */ e.jsxs(
|
|
30
|
-
a,
|
|
31
|
-
{
|
|
32
|
-
type: "button",
|
|
33
|
-
variant: "outline",
|
|
34
|
-
size: "sm",
|
|
35
|
-
onClick: () => i(!s),
|
|
36
|
-
children: [
|
|
37
|
-
/* @__PURE__ */ e.jsx(n, { className: "w-4 h-4 mr-2" }),
|
|
38
|
-
s ? "Hide" : "Show",
|
|
39
|
-
" QR"
|
|
40
|
-
]
|
|
41
|
-
}
|
|
42
|
-
)
|
|
43
|
-
] }) : /* @__PURE__ */ e.jsxs("div", { className: "space-y-3", children: [
|
|
44
|
-
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
45
|
-
/* @__PURE__ */ e.jsx(
|
|
46
|
-
j,
|
|
47
|
-
{
|
|
48
|
-
type: "text",
|
|
49
|
-
value: t || "",
|
|
50
|
-
onChange: (r) => h(r.target.value),
|
|
51
|
-
placeholder: x?.placeholder || "Enter text for QR code",
|
|
52
|
-
disabled: o || c.disabled,
|
|
53
|
-
className: c.className
|
|
54
|
-
}
|
|
55
|
-
),
|
|
56
|
-
t && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
57
|
-
/* @__PURE__ */ e.jsx(
|
|
58
|
-
a,
|
|
59
|
-
{
|
|
60
|
-
type: "button",
|
|
61
|
-
variant: "outline",
|
|
62
|
-
size: "sm",
|
|
63
|
-
onClick: p,
|
|
64
|
-
children: /* @__PURE__ */ e.jsx(k, { className: "w-4 h-4" })
|
|
65
|
-
}
|
|
66
|
-
),
|
|
67
|
-
/* @__PURE__ */ e.jsx(
|
|
68
|
-
a,
|
|
69
|
-
{
|
|
70
|
-
type: "button",
|
|
71
|
-
variant: "outline",
|
|
72
|
-
size: "sm",
|
|
73
|
-
onClick: () => i(!s),
|
|
74
|
-
children: /* @__PURE__ */ e.jsx(n, { className: "w-4 h-4" })
|
|
75
|
-
}
|
|
76
|
-
)
|
|
77
|
-
] })
|
|
78
|
-
] }),
|
|
79
|
-
s && t && /* @__PURE__ */ e.jsx("div", { className: "border rounded p-4 bg-white flex justify-center", children: /* @__PURE__ */ e.jsx(
|
|
80
|
-
"img",
|
|
81
|
-
{
|
|
82
|
-
src: m(t),
|
|
83
|
-
alt: "QR Code",
|
|
84
|
-
className: "w-48 h-48"
|
|
85
|
-
}
|
|
86
|
-
) }),
|
|
87
|
-
t && /* @__PURE__ */ e.jsxs("p", { className: "text-xs text-muted-foreground", children: [
|
|
88
|
-
"QR code contains: ",
|
|
89
|
-
t.length,
|
|
90
|
-
" characters"
|
|
91
|
-
] })
|
|
92
|
-
] });
|
|
93
|
-
}
|
|
94
|
-
export {
|
|
95
|
-
R as QRCodeField
|
|
96
|
-
};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { j as e } from "./index-BfSjmySi.js";
|
|
2
|
-
import { Textarea as x } from "@object-ui/components";
|
|
3
|
-
function f({ value: a, onChange: i, field: c, readonly: r, errorMessage: n, ...s }) {
|
|
4
|
-
if (r)
|
|
5
|
-
return /* @__PURE__ */ e.jsx(
|
|
6
|
-
"div",
|
|
7
|
-
{
|
|
8
|
-
className: "text-sm prose prose-sm max-w-none",
|
|
9
|
-
children: a || "-"
|
|
10
|
-
}
|
|
11
|
-
);
|
|
12
|
-
const t = c || s.schema, o = t?.rows || 8, l = t?.format || "markdown";
|
|
13
|
-
return /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
|
|
14
|
-
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between text-xs text-gray-500", children: [
|
|
15
|
-
/* @__PURE__ */ e.jsxs("span", { children: [
|
|
16
|
-
"Format: ",
|
|
17
|
-
l
|
|
18
|
-
] }),
|
|
19
|
-
/* @__PURE__ */ e.jsx("span", { className: "italic", children: "Rich text editor (basic)" })
|
|
20
|
-
] }),
|
|
21
|
-
/* @__PURE__ */ e.jsx(
|
|
22
|
-
x,
|
|
23
|
-
{
|
|
24
|
-
value: a || "",
|
|
25
|
-
onChange: (m) => i(m.target.value),
|
|
26
|
-
placeholder: t?.placeholder || "Enter text...",
|
|
27
|
-
disabled: r || s.disabled,
|
|
28
|
-
rows: o,
|
|
29
|
-
className: `font-mono text-sm ${s.className || ""}`,
|
|
30
|
-
"aria-invalid": !!n
|
|
31
|
-
}
|
|
32
|
-
)
|
|
33
|
-
] });
|
|
34
|
-
}
|
|
35
|
-
export {
|
|
36
|
-
f as RichTextField
|
|
37
|
-
};
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import { j as s } from "./index-BfSjmySi.js";
|
|
2
|
-
import w, { useRef as v, useEffect as N } from "react";
|
|
3
|
-
import { Button as b } from "@object-ui/components";
|
|
4
|
-
import { c as S } from "./ObjectAgGridImpl-CujXHJ0J.js";
|
|
5
|
-
const C = [
|
|
6
|
-
[
|
|
7
|
-
"path",
|
|
8
|
-
{
|
|
9
|
-
d: "M21 21H8a2 2 0 0 1-1.42-.587l-3.994-3.999a2 2 0 0 1 0-2.828l10-10a2 2 0 0 1 2.829 0l5.999 6a2 2 0 0 1 0 2.828L12.834 21",
|
|
10
|
-
key: "g5wo59"
|
|
11
|
-
}
|
|
12
|
-
],
|
|
13
|
-
["path", { d: "m5.082 11.09 8.828 8.828", key: "1wx5vj" }]
|
|
14
|
-
], R = S("eraser", C);
|
|
15
|
-
function k({ value: o, onChange: f, readonly: i }) {
|
|
16
|
-
const r = v(null), [m, h] = w.useState(!1), [g, a] = w.useState(!o);
|
|
17
|
-
N(() => {
|
|
18
|
-
if (o && r.current) {
|
|
19
|
-
const e = r.current.getContext("2d");
|
|
20
|
-
if (e) {
|
|
21
|
-
const n = new Image();
|
|
22
|
-
n.onload = () => {
|
|
23
|
-
e.drawImage(n, 0, 0), a(!1);
|
|
24
|
-
}, n.src = o;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
}, [o]);
|
|
28
|
-
const x = (t) => {
|
|
29
|
-
if (i) return;
|
|
30
|
-
h(!0), a(!1);
|
|
31
|
-
const e = r.current;
|
|
32
|
-
if (!e) return;
|
|
33
|
-
const n = e.getContext("2d");
|
|
34
|
-
if (!n) return;
|
|
35
|
-
const c = e.getBoundingClientRect(), l = "touches" in t ? t.touches[0].clientX - c.left : t.clientX - c.left, d = "touches" in t ? t.touches[0].clientY - c.top : t.clientY - c.top;
|
|
36
|
-
n.beginPath(), n.moveTo(l, d);
|
|
37
|
-
}, p = (t) => {
|
|
38
|
-
if (!m || i) return;
|
|
39
|
-
const e = r.current;
|
|
40
|
-
if (!e) return;
|
|
41
|
-
const n = e.getContext("2d");
|
|
42
|
-
if (!n) return;
|
|
43
|
-
const c = e.getBoundingClientRect(), l = "touches" in t ? t.touches[0].clientX - c.left : t.clientX - c.left, d = "touches" in t ? t.touches[0].clientY - c.top : t.clientY - c.top;
|
|
44
|
-
n.lineTo(l, d), n.strokeStyle = "#000", n.lineWidth = 2, n.lineCap = "round", n.lineJoin = "round", n.stroke();
|
|
45
|
-
}, u = () => {
|
|
46
|
-
if (!m) return;
|
|
47
|
-
h(!1);
|
|
48
|
-
const t = r.current;
|
|
49
|
-
if (!t) return;
|
|
50
|
-
const e = t.toDataURL("image/png");
|
|
51
|
-
f(e);
|
|
52
|
-
}, j = () => {
|
|
53
|
-
const t = r.current;
|
|
54
|
-
if (!t) return;
|
|
55
|
-
const e = t.getContext("2d");
|
|
56
|
-
e && (e.clearRect(0, 0, t.width, t.height), a(!0), f(""));
|
|
57
|
-
};
|
|
58
|
-
return i && o ? /* @__PURE__ */ s.jsx("div", { className: "border rounded p-2 bg-white", children: /* @__PURE__ */ s.jsx("img", { src: o, alt: "Signature", loading: "lazy", className: "max-w-full h-auto" }) }) : i && !o ? /* @__PURE__ */ s.jsx("span", { className: "text-sm text-muted-foreground", children: "No signature" }) : /* @__PURE__ */ s.jsxs("div", { className: "space-y-2", children: [
|
|
59
|
-
/* @__PURE__ */ s.jsx("div", { className: "border rounded bg-white", children: /* @__PURE__ */ s.jsx(
|
|
60
|
-
"canvas",
|
|
61
|
-
{
|
|
62
|
-
ref: r,
|
|
63
|
-
width: 400,
|
|
64
|
-
height: 200,
|
|
65
|
-
className: "w-full touch-none cursor-crosshair",
|
|
66
|
-
onMouseDown: x,
|
|
67
|
-
onMouseMove: p,
|
|
68
|
-
onMouseUp: u,
|
|
69
|
-
onMouseLeave: u,
|
|
70
|
-
onTouchStart: x,
|
|
71
|
-
onTouchMove: p,
|
|
72
|
-
onTouchEnd: u
|
|
73
|
-
}
|
|
74
|
-
) }),
|
|
75
|
-
/* @__PURE__ */ s.jsxs("div", { className: "flex justify-between items-center", children: [
|
|
76
|
-
/* @__PURE__ */ s.jsx("p", { className: "text-xs text-muted-foreground", children: g ? "Sign above" : "Signature captured" }),
|
|
77
|
-
/* @__PURE__ */ s.jsxs(
|
|
78
|
-
b,
|
|
79
|
-
{
|
|
80
|
-
type: "button",
|
|
81
|
-
variant: "outline",
|
|
82
|
-
size: "sm",
|
|
83
|
-
onClick: j,
|
|
84
|
-
disabled: i || g,
|
|
85
|
-
children: [
|
|
86
|
-
/* @__PURE__ */ s.jsx(R, { className: "w-4 h-4 mr-2" }),
|
|
87
|
-
"Clear"
|
|
88
|
-
]
|
|
89
|
-
}
|
|
90
|
-
)
|
|
91
|
-
] })
|
|
92
|
-
] });
|
|
93
|
-
}
|
|
94
|
-
export {
|
|
95
|
-
k as SignatureField
|
|
96
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { j as i } from "./index-BfSjmySi.js";
|
|
2
|
-
function u({ value: m, field: n, ...s }) {
|
|
3
|
-
const e = (n || s.schema)?.summary_type || "count";
|
|
4
|
-
let t = "-";
|
|
5
|
-
return m != null && (e === "count" ? t = String(m) : ["sum", "avg", "min", "max"].includes(e) ? t = typeof m == "number" ? m.toFixed(2) : String(m) : t = String(m)), /* @__PURE__ */ i.jsx("span", { className: `text-sm font-medium tabular-nums text-gray-700 ${s.className || ""}`, children: t });
|
|
6
|
-
}
|
|
7
|
-
export {
|
|
8
|
-
u as SummaryField
|
|
9
|
-
};
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { j as e } from "./index-BfSjmySi.js";
|
|
2
|
-
import { Avatar as c, AvatarFallback as m, Badge as g } from "@object-ui/components";
|
|
3
|
-
import { X as N } from "./ObjectAgGridImpl-CujXHJ0J.js";
|
|
4
|
-
function U({ value: s, onChange: o, field: d, readonly: h, ...x }) {
|
|
5
|
-
const p = (d || x.schema)?.multiple || !1;
|
|
6
|
-
if (h) {
|
|
7
|
-
if (!s) return /* @__PURE__ */ e.jsx("span", { className: "text-sm", children: "-" });
|
|
8
|
-
const t = Array.isArray(s) ? s : [s];
|
|
9
|
-
return /* @__PURE__ */ e.jsxs("div", { className: "flex -space-x-2", children: [
|
|
10
|
-
t.slice(0, 3).map((r, i) => {
|
|
11
|
-
const a = r.name || r.username || "User", n = a.split(" ").map((u) => u[0]).join("").toUpperCase().slice(0, 2);
|
|
12
|
-
return /* @__PURE__ */ e.jsx(c, { className: "size-8 border-2 border-white", title: a, children: /* @__PURE__ */ e.jsx(m, { className: "bg-blue-500 text-white text-xs", children: n }) }, i);
|
|
13
|
-
}),
|
|
14
|
-
t.length > 3 && /* @__PURE__ */ e.jsx(c, { className: "size-8 border-2 border-white", children: /* @__PURE__ */ e.jsxs(m, { className: "bg-gray-200 text-gray-600 text-xs", children: [
|
|
15
|
-
"+",
|
|
16
|
-
t.length - 3
|
|
17
|
-
] }) })
|
|
18
|
-
] });
|
|
19
|
-
}
|
|
20
|
-
const l = s ? Array.isArray(s) ? s : [s] : [], j = (t) => {
|
|
21
|
-
if (p) {
|
|
22
|
-
const r = l.filter((i, a) => a !== t);
|
|
23
|
-
o(r.length > 0 ? r : null);
|
|
24
|
-
} else
|
|
25
|
-
o(null);
|
|
26
|
-
};
|
|
27
|
-
return /* @__PURE__ */ e.jsxs("div", { className: x.className, children: [
|
|
28
|
-
l.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "flex flex-wrap gap-2 mb-2", children: l.map((t, r) => {
|
|
29
|
-
const i = t.name || t.username || "User", a = i.split(" ").map((n) => n[0]).join("").toUpperCase().slice(0, 2);
|
|
30
|
-
return /* @__PURE__ */ e.jsxs(g, { variant: "outline", className: "gap-2 pr-1", children: [
|
|
31
|
-
/* @__PURE__ */ e.jsx(c, { className: "size-5", children: /* @__PURE__ */ e.jsx(m, { className: "bg-blue-500 text-white text-xs", children: a }) }),
|
|
32
|
-
/* @__PURE__ */ e.jsx("span", { className: "text-sm", children: i }),
|
|
33
|
-
/* @__PURE__ */ e.jsx(
|
|
34
|
-
"button",
|
|
35
|
-
{
|
|
36
|
-
type: "button",
|
|
37
|
-
onClick: () => j(r),
|
|
38
|
-
className: "ml-1 rounded-full hover:bg-gray-200 p-0.5",
|
|
39
|
-
children: /* @__PURE__ */ e.jsx(N, { className: "size-3" })
|
|
40
|
-
}
|
|
41
|
-
)
|
|
42
|
-
] }, r);
|
|
43
|
-
}) }),
|
|
44
|
-
/* @__PURE__ */ e.jsx("div", { className: "text-sm text-gray-500 italic", children: "User selection component requires integration with user management system" })
|
|
45
|
-
] });
|
|
46
|
-
}
|
|
47
|
-
export {
|
|
48
|
-
U as UserField
|
|
49
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { j as e } from "./index-BfSjmySi.js";
|
|
2
|
-
function x({ value: s, field: n, ...r }) {
|
|
3
|
-
const i = (n || r.schema)?.dimensions || (Array.isArray(s) ? s.length : 0);
|
|
4
|
-
if (!s || !Array.isArray(s))
|
|
5
|
-
return /* @__PURE__ */ e.jsx("span", { className: "text-sm text-gray-500", children: "-" });
|
|
6
|
-
const a = s.slice(0, 3).map((c) => {
|
|
7
|
-
const t = Number(c);
|
|
8
|
-
return isNaN(t) ? "0" : t.toFixed(4);
|
|
9
|
-
}).join(", ");
|
|
10
|
-
return /* @__PURE__ */ e.jsxs("div", { className: `text-sm ${r.className || ""}`, children: [
|
|
11
|
-
/* @__PURE__ */ e.jsxs("span", { className: "font-mono text-gray-700", children: [
|
|
12
|
-
"[",
|
|
13
|
-
a,
|
|
14
|
-
"...]"
|
|
15
|
-
] }),
|
|
16
|
-
/* @__PURE__ */ e.jsxs("span", { className: "text-gray-500 ml-2", children: [
|
|
17
|
-
"(",
|
|
18
|
-
i,
|
|
19
|
-
"D)"
|
|
20
|
-
] })
|
|
21
|
-
] });
|
|
22
|
-
}
|
|
23
|
-
export {
|
|
24
|
-
x as VectorField
|
|
25
|
-
};
|