@object-ui/plugin-detail 3.1.3 → 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 +53 -49
- package/CHANGELOG.md +10 -0
- package/dist/AddressField-DBkEyMcG.js +93 -0
- package/dist/AutoNumberField-Baa191z-.js +14 -0
- package/dist/AvatarField-YGj51ozd.js +80 -0
- package/dist/BooleanField-CaA898Tk.js +40 -0
- package/dist/CodeField-BU51nl1L.js +22 -0
- package/dist/ColorField-Cnf6ZM7c.js +37 -0
- package/dist/CurrencyField-Wg-XOId2.js +51 -0
- package/dist/DateField-Cth1ky_m.js +21 -0
- package/dist/DateTimeField-B0m6FhHL.js +32 -0
- package/dist/EmailField-Do7qT_L_.js +28 -0
- package/dist/FileField-aRJAdbQb.js +151 -0
- package/dist/FormulaField-DTMkagFx.js +14 -0
- package/dist/GeolocationField-RqpHWTEv.js +113 -0
- package/dist/GridField-D4IH0cpo.js +51 -0
- package/dist/ImageField-BYCFajjr.js +75 -0
- package/dist/LocationField-Bi_ew9sd.js +35 -0
- package/dist/LookupField-BjwlDPtt.js +902 -0
- package/dist/MasterDetailField-I1A9oEGC.js +94 -0
- package/dist/NumberField-D_NucQlp.js +26 -0
- package/dist/ObjectField-CG-LaM65.js +52 -0
- package/dist/PasswordField-DBtluGJ1.js +35 -0
- package/dist/PercentField-B6sO_J3i.js +63 -0
- package/dist/PhoneField-CcQAWwR6.js +28 -0
- package/dist/QRCodeField-CEjWs-J5.js +72 -0
- package/dist/RatingField-B_Mnr63i.js +39 -0
- package/dist/RichTextField-qOEJl5Ai.js +32 -0
- package/dist/SelectField-C8hWu3gm.js +30 -0
- package/dist/SignatureField-CddhEK9u.js +92 -0
- package/dist/SliderField-Df5hMzNc.js +34 -0
- package/dist/SummaryField-DgiFm-Cr.js +19 -0
- package/dist/TextAreaField-DuriTqsD.js +36 -0
- package/dist/TextField-CGNSl7RU.js +29 -0
- package/dist/TimeField-YO58ctFg.js +21 -0
- package/dist/UrlField-1-BMM1jn.js +33 -0
- package/dist/UserField-B6GqxP_S.js +78 -0
- package/dist/VectorField-BkEjbSt0.js +36 -0
- package/dist/index.js +4092 -33
- package/dist/index.umd.cjs +85 -76
- package/dist/plugin-detail.css +3 -1
- package/dist/src-CXr1-vVl.js +77662 -0
- package/package.json +9 -9
- package/dist/AddressField-BtiTrEpf.js +0 -96
- package/dist/AutoNumberField-BxnFqllo.js +0 -8
- package/dist/AvatarField-CwlnWNSf.js +0 -82
- package/dist/BooleanField-DpMXU2ya.js +0 -37
- package/dist/CodeField-gwmcFihg.js +0 -21
- package/dist/ColorField-CWmF_zoW.js +0 -42
- package/dist/CurrencyField-BF3tYAgm.js +0 -43
- package/dist/DateField-a6Ka9ph2.js +0 -21
- package/dist/DateTimeField-C4wWOEiw.js +0 -28
- package/dist/EmailField-DJqiQ4sp.js +0 -31
- package/dist/FileField-ChjjCydz.js +0 -133
- package/dist/FormulaField-CJkkwIK8.js +0 -9
- package/dist/GeolocationField-BnkeUBek.js +0 -123
- package/dist/GridField-DoHqc2ON.js +0 -30
- package/dist/ImageField-Ld7SHA8N.js +0 -90
- package/dist/LocationField-Bgu-vMAE.js +0 -31
- package/dist/MasterDetailField-Bp5WBTzU.js +0 -108
- package/dist/NumberField-uBqVZ-gt.js +0 -26
- package/dist/ObjectField-BH1Md9gH.js +0 -48
- package/dist/PasswordField-D8GZjY7d.js +0 -38
- package/dist/PercentField-DyK8vg8M.js +0 -63
- package/dist/PhoneField-B3qJyLP0.js +0 -31
- package/dist/QRCodeField-CGiRTCZq.js +0 -77
- package/dist/RatingField-CWVaJNyf.js +0 -47
- package/dist/RichTextField-CusveP9T.js +0 -38
- package/dist/SelectField-UdDfsEZo.js +0 -26
- package/dist/SignatureField-DFvPKbuI.js +0 -85
- package/dist/SliderField-C-HvGV9e.js +0 -30
- package/dist/SummaryField-ugYPYxjP.js +0 -9
- package/dist/TextAreaField-C5KygUT3.js +0 -39
- package/dist/TextField-oUjuqQ1x.js +0 -32
- package/dist/TimeField-SsQ6rfk5.js +0 -21
- package/dist/UrlField-kd48Ip95.js +0 -33
- package/dist/UserField-BOjE_CAz.js +0 -49
- package/dist/VectorField-CKg9jdGa.js +0 -25
- package/dist/index-D2t9pLAg.js +0 -99948
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { jsxs as o, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import y from "react";
|
|
3
|
-
import { m as c, i as m } from "./index-D2t9pLAg.js";
|
|
4
|
-
function b({ value: d, onChange: f, field: x, readonly: n, className: s, ...a }) {
|
|
5
|
-
const t = (x || a.schema)?.max ?? 5, l = d ?? 0, [i, u] = y.useState(null), g = i !== null ? i : l;
|
|
6
|
-
return n ? /* @__PURE__ */ o("div", { className: m("flex items-center gap-1", s), children: [
|
|
7
|
-
Array.from({ length: t }, (h, e) => /* @__PURE__ */ r(
|
|
8
|
-
c,
|
|
9
|
-
{
|
|
10
|
-
className: `w-5 h-5 ${e < l ? "fill-yellow-400 text-yellow-400" : "text-muted-foreground"}`
|
|
11
|
-
},
|
|
12
|
-
e
|
|
13
|
-
)),
|
|
14
|
-
/* @__PURE__ */ o("span", { className: "ml-2 text-sm text-muted-foreground", children: [
|
|
15
|
-
l,
|
|
16
|
-
" / ",
|
|
17
|
-
t
|
|
18
|
-
] })
|
|
19
|
-
] }) : /* @__PURE__ */ o("div", { className: m("flex items-center gap-1", s), children: [
|
|
20
|
-
Array.from({ length: t }, (h, e) => /* @__PURE__ */ r(
|
|
21
|
-
"button",
|
|
22
|
-
{
|
|
23
|
-
type: "button",
|
|
24
|
-
onClick: () => f(e + 1),
|
|
25
|
-
onMouseEnter: () => u(e + 1),
|
|
26
|
-
onMouseLeave: () => u(null),
|
|
27
|
-
className: "focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 rounded",
|
|
28
|
-
disabled: n || a.disabled,
|
|
29
|
-
children: /* @__PURE__ */ r(
|
|
30
|
-
c,
|
|
31
|
-
{
|
|
32
|
-
className: `w-5 h-5 transition-colors ${e < g ? "fill-yellow-400 text-yellow-400 hover:fill-yellow-500 hover:text-yellow-500" : "text-muted-foreground hover:text-yellow-400"}`
|
|
33
|
-
}
|
|
34
|
-
)
|
|
35
|
-
},
|
|
36
|
-
e
|
|
37
|
-
)),
|
|
38
|
-
/* @__PURE__ */ o("span", { className: "ml-2 text-sm text-muted-foreground", children: [
|
|
39
|
-
l,
|
|
40
|
-
" / ",
|
|
41
|
-
t
|
|
42
|
-
] })
|
|
43
|
-
] });
|
|
44
|
-
}
|
|
45
|
-
export {
|
|
46
|
-
b as RatingField
|
|
47
|
-
};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { jsx as a, jsxs as s } from "react/jsx-runtime";
|
|
2
|
-
import { T as x } from "./index-D2t9pLAg.js";
|
|
3
|
-
import "react";
|
|
4
|
-
function N({ value: r, onChange: c, field: n, readonly: i, errorMessage: o, ...e }) {
|
|
5
|
-
if (i)
|
|
6
|
-
return /* @__PURE__ */ a(
|
|
7
|
-
"div",
|
|
8
|
-
{
|
|
9
|
-
className: "text-sm prose prose-sm max-w-none",
|
|
10
|
-
children: r || "-"
|
|
11
|
-
}
|
|
12
|
-
);
|
|
13
|
-
const t = n || e.schema, l = t?.rows || 8, m = t?.format || "markdown";
|
|
14
|
-
return /* @__PURE__ */ s("div", { className: "space-y-2", children: [
|
|
15
|
-
/* @__PURE__ */ s("div", { className: "flex items-center justify-between text-xs text-gray-500", children: [
|
|
16
|
-
/* @__PURE__ */ s("span", { children: [
|
|
17
|
-
"Format: ",
|
|
18
|
-
m
|
|
19
|
-
] }),
|
|
20
|
-
/* @__PURE__ */ a("span", { className: "italic", children: "Rich text editor (basic)" })
|
|
21
|
-
] }),
|
|
22
|
-
/* @__PURE__ */ a(
|
|
23
|
-
x,
|
|
24
|
-
{
|
|
25
|
-
value: r || "",
|
|
26
|
-
onChange: (d) => c(d.target.value),
|
|
27
|
-
placeholder: t?.placeholder || "Enter text...",
|
|
28
|
-
disabled: i || e.disabled,
|
|
29
|
-
rows: l,
|
|
30
|
-
className: `font-mono text-sm ${e.className || ""}`,
|
|
31
|
-
"aria-invalid": !!o
|
|
32
|
-
}
|
|
33
|
-
)
|
|
34
|
-
] });
|
|
35
|
-
}
|
|
36
|
-
export {
|
|
37
|
-
N as RichTextField
|
|
38
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { jsx as a, jsxs as r } from "react/jsx-runtime";
|
|
2
|
-
import { a as m, b as h, c as u, d as S, e as f } from "./index-D2t9pLAg.js";
|
|
3
|
-
import "react";
|
|
4
|
-
function x({ value: t, onChange: s, field: o, readonly: c, ...e }) {
|
|
5
|
-
const i = o || e.schema, n = i?.options || [];
|
|
6
|
-
if (c) {
|
|
7
|
-
const l = n.find((d) => d.value === t);
|
|
8
|
-
return /* @__PURE__ */ a("span", { className: "text-sm", children: l?.label || t || "-" });
|
|
9
|
-
}
|
|
10
|
-
return /* @__PURE__ */ r(
|
|
11
|
-
m,
|
|
12
|
-
{
|
|
13
|
-
...e,
|
|
14
|
-
value: t,
|
|
15
|
-
onValueChange: s,
|
|
16
|
-
disabled: c || e.disabled,
|
|
17
|
-
children: [
|
|
18
|
-
/* @__PURE__ */ a(h, { className: e.className, id: e.id, children: /* @__PURE__ */ a(u, { placeholder: i?.placeholder || "Select an option" }) }),
|
|
19
|
-
/* @__PURE__ */ a(S, { position: "popper", children: n.map((l) => /* @__PURE__ */ a(f, { value: l.value, children: l.label }, l.value)) })
|
|
20
|
-
]
|
|
21
|
-
}
|
|
22
|
-
);
|
|
23
|
-
}
|
|
24
|
-
export {
|
|
25
|
-
x as SelectField
|
|
26
|
-
};
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import { jsx as o, jsxs as f } from "react/jsx-runtime";
|
|
2
|
-
import v, { useRef as b, useEffect as S } from "react";
|
|
3
|
-
import { B as C, p as R } from "./index-D2t9pLAg.js";
|
|
4
|
-
function E({ value: c, onChange: g, readonly: i }) {
|
|
5
|
-
const r = b(null), [h, m] = v.useState(!1), [p, a] = v.useState(!c);
|
|
6
|
-
S(() => {
|
|
7
|
-
if (c && r.current) {
|
|
8
|
-
const e = r.current.getContext("2d");
|
|
9
|
-
if (e) {
|
|
10
|
-
const n = new Image();
|
|
11
|
-
n.onload = () => {
|
|
12
|
-
e.drawImage(n, 0, 0), a(!1);
|
|
13
|
-
}, n.src = c;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
}, [c]);
|
|
17
|
-
const x = (t) => {
|
|
18
|
-
if (i) return;
|
|
19
|
-
m(!0), a(!1);
|
|
20
|
-
const e = r.current;
|
|
21
|
-
if (!e) return;
|
|
22
|
-
const n = e.getContext("2d");
|
|
23
|
-
if (!n) return;
|
|
24
|
-
const s = e.getBoundingClientRect(), l = "touches" in t ? t.touches[0].clientX - s.left : t.clientX - s.left, d = "touches" in t ? t.touches[0].clientY - s.top : t.clientY - s.top;
|
|
25
|
-
n.beginPath(), n.moveTo(l, d);
|
|
26
|
-
}, w = (t) => {
|
|
27
|
-
if (!h || i) return;
|
|
28
|
-
const e = r.current;
|
|
29
|
-
if (!e) return;
|
|
30
|
-
const n = e.getContext("2d");
|
|
31
|
-
if (!n) return;
|
|
32
|
-
const s = e.getBoundingClientRect(), l = "touches" in t ? t.touches[0].clientX - s.left : t.clientX - s.left, d = "touches" in t ? t.touches[0].clientY - s.top : t.clientY - s.top;
|
|
33
|
-
n.lineTo(l, d), n.strokeStyle = "#000", n.lineWidth = 2, n.lineCap = "round", n.lineJoin = "round", n.stroke();
|
|
34
|
-
}, u = () => {
|
|
35
|
-
if (!h) return;
|
|
36
|
-
m(!1);
|
|
37
|
-
const t = r.current;
|
|
38
|
-
if (!t) return;
|
|
39
|
-
const e = t.toDataURL("image/png");
|
|
40
|
-
g(e);
|
|
41
|
-
}, N = () => {
|
|
42
|
-
const t = r.current;
|
|
43
|
-
if (!t) return;
|
|
44
|
-
const e = t.getContext("2d");
|
|
45
|
-
e && (e.clearRect(0, 0, t.width, t.height), a(!0), g(""));
|
|
46
|
-
};
|
|
47
|
-
return i && c ? /* @__PURE__ */ o("div", { className: "border rounded p-2 bg-white", children: /* @__PURE__ */ o("img", { src: c, alt: "Signature", loading: "lazy", className: "max-w-full h-auto" }) }) : i && !c ? /* @__PURE__ */ o("span", { className: "text-sm text-muted-foreground", children: "No signature" }) : /* @__PURE__ */ f("div", { className: "space-y-2", children: [
|
|
48
|
-
/* @__PURE__ */ o("div", { className: "border rounded bg-white", children: /* @__PURE__ */ o(
|
|
49
|
-
"canvas",
|
|
50
|
-
{
|
|
51
|
-
ref: r,
|
|
52
|
-
width: 400,
|
|
53
|
-
height: 200,
|
|
54
|
-
className: "w-full touch-none cursor-crosshair",
|
|
55
|
-
onMouseDown: x,
|
|
56
|
-
onMouseMove: w,
|
|
57
|
-
onMouseUp: u,
|
|
58
|
-
onMouseLeave: u,
|
|
59
|
-
onTouchStart: x,
|
|
60
|
-
onTouchMove: w,
|
|
61
|
-
onTouchEnd: u
|
|
62
|
-
}
|
|
63
|
-
) }),
|
|
64
|
-
/* @__PURE__ */ f("div", { className: "flex justify-between items-center", children: [
|
|
65
|
-
/* @__PURE__ */ o("p", { className: "text-xs text-muted-foreground", children: p ? "Sign above" : "Signature captured" }),
|
|
66
|
-
/* @__PURE__ */ f(
|
|
67
|
-
C,
|
|
68
|
-
{
|
|
69
|
-
type: "button",
|
|
70
|
-
variant: "outline",
|
|
71
|
-
size: "sm",
|
|
72
|
-
onClick: N,
|
|
73
|
-
disabled: i || p,
|
|
74
|
-
children: [
|
|
75
|
-
/* @__PURE__ */ o(R, { className: "w-4 h-4 mr-2" }),
|
|
76
|
-
"Clear"
|
|
77
|
-
]
|
|
78
|
-
}
|
|
79
|
-
)
|
|
80
|
-
] })
|
|
81
|
-
] });
|
|
82
|
-
}
|
|
83
|
-
export {
|
|
84
|
-
E as SignatureField
|
|
85
|
-
};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { jsxs as m, jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import { f as x } from "./index-D2t9pLAg.js";
|
|
3
|
-
import "react";
|
|
4
|
-
function u({ value: s, onChange: l, field: r, readonly: n, ...t }) {
|
|
5
|
-
const i = r || t.schema, e = i?.min ?? 0, c = i?.max ?? 100, d = i?.step ?? 1;
|
|
6
|
-
return n ? /* @__PURE__ */ m("div", { className: "flex items-center gap-2", children: [
|
|
7
|
-
/* @__PURE__ */ a("span", { className: "text-sm font-medium", children: s ?? e }),
|
|
8
|
-
/* @__PURE__ */ m("span", { className: "text-xs text-muted-foreground", children: [
|
|
9
|
-
"/ ",
|
|
10
|
-
c
|
|
11
|
-
] })
|
|
12
|
-
] }) : /* @__PURE__ */ m("div", { className: "flex items-center gap-4", children: [
|
|
13
|
-
/* @__PURE__ */ a(
|
|
14
|
-
x,
|
|
15
|
-
{
|
|
16
|
-
value: [s ?? e],
|
|
17
|
-
onValueChange: (o) => l(o[0]),
|
|
18
|
-
min: e,
|
|
19
|
-
max: c,
|
|
20
|
-
step: d,
|
|
21
|
-
disabled: n || t.disabled,
|
|
22
|
-
className: t.className
|
|
23
|
-
}
|
|
24
|
-
),
|
|
25
|
-
/* @__PURE__ */ a("span", { className: "text-sm font-medium w-12 text-right", children: s ?? e })
|
|
26
|
-
] });
|
|
27
|
-
}
|
|
28
|
-
export {
|
|
29
|
-
u as SliderField
|
|
30
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
-
function u({ value: m, field: n, ...e }) {
|
|
3
|
-
const s = (n || e.schema)?.summary_type || "count";
|
|
4
|
-
let t = "-";
|
|
5
|
-
return m != null && (s === "count" ? t = String(m) : ["sum", "avg", "min", "max"].includes(s) ? t = typeof m == "number" ? m.toFixed(2) : String(m) : t = String(m)), /* @__PURE__ */ i("span", { className: `text-sm font-medium tabular-nums text-gray-700 ${e.className || ""}`, children: t });
|
|
6
|
-
}
|
|
7
|
-
export {
|
|
8
|
-
u as SummaryField
|
|
9
|
-
};
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { jsx as l, jsxs as o } from "react/jsx-runtime";
|
|
2
|
-
import { T as x } from "./index-D2t9pLAg.js";
|
|
3
|
-
import "react";
|
|
4
|
-
function u({ value: e, onChange: n, field: c, readonly: r, errorMessage: d, ...i }) {
|
|
5
|
-
if (r)
|
|
6
|
-
return /* @__PURE__ */ l("div", { className: "text-sm whitespace-pre-wrap", children: e || "-" });
|
|
7
|
-
const a = c || i.schema, h = a?.rows || 4, t = a?.max_length, { inputType: p, ...s } = i;
|
|
8
|
-
return /* @__PURE__ */ o("div", { className: "relative", children: [
|
|
9
|
-
/* @__PURE__ */ l(
|
|
10
|
-
x,
|
|
11
|
-
{
|
|
12
|
-
...s,
|
|
13
|
-
value: e || "",
|
|
14
|
-
onChange: (m) => n(m.target.value),
|
|
15
|
-
placeholder: a?.placeholder,
|
|
16
|
-
disabled: r || s.disabled,
|
|
17
|
-
rows: h,
|
|
18
|
-
maxLength: t,
|
|
19
|
-
"aria-invalid": !!d
|
|
20
|
-
}
|
|
21
|
-
),
|
|
22
|
-
t && /* @__PURE__ */ o(
|
|
23
|
-
"div",
|
|
24
|
-
{
|
|
25
|
-
className: "absolute bottom-2 right-2 text-xs text-gray-400",
|
|
26
|
-
"aria-live": "polite",
|
|
27
|
-
"aria-label": `Character count: ${(e || "").length} of ${t}`,
|
|
28
|
-
children: [
|
|
29
|
-
(e || "").length,
|
|
30
|
-
"/",
|
|
31
|
-
t
|
|
32
|
-
]
|
|
33
|
-
}
|
|
34
|
-
)
|
|
35
|
-
] });
|
|
36
|
-
}
|
|
37
|
-
export {
|
|
38
|
-
u as TextAreaField
|
|
39
|
-
};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { T as n, I as c } from "./index-D2t9pLAg.js";
|
|
3
|
-
import "react";
|
|
4
|
-
function x({ value: a, onChange: d, field: i, readonly: r, ...l }) {
|
|
5
|
-
const e = i || l.schema;
|
|
6
|
-
if (r)
|
|
7
|
-
return /* @__PURE__ */ o("span", { className: "text-sm", children: a || "-" });
|
|
8
|
-
const p = e?.rows, { inputType: m, ...t } = l;
|
|
9
|
-
return p && p > 1 ? /* @__PURE__ */ o(
|
|
10
|
-
n,
|
|
11
|
-
{
|
|
12
|
-
...t,
|
|
13
|
-
value: a || "",
|
|
14
|
-
onChange: (s) => d(s.target.value),
|
|
15
|
-
placeholder: e?.placeholder,
|
|
16
|
-
disabled: r || t.disabled
|
|
17
|
-
}
|
|
18
|
-
) : /* @__PURE__ */ o(
|
|
19
|
-
c,
|
|
20
|
-
{
|
|
21
|
-
...t,
|
|
22
|
-
type: e?.type === "password" ? "password" : "text",
|
|
23
|
-
value: a || "",
|
|
24
|
-
onChange: (s) => d(s.target.value),
|
|
25
|
-
placeholder: e?.placeholder,
|
|
26
|
-
disabled: r || t.disabled
|
|
27
|
-
}
|
|
28
|
-
);
|
|
29
|
-
}
|
|
30
|
-
export {
|
|
31
|
-
x as TextField
|
|
32
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { I as p } from "./index-D2t9pLAg.js";
|
|
3
|
-
import "react";
|
|
4
|
-
function f({ value: e, onChange: m, field: s, readonly: t, ...n }) {
|
|
5
|
-
if (t)
|
|
6
|
-
return /* @__PURE__ */ r("span", { className: "text-sm", children: e || "-" });
|
|
7
|
-
const { inputType: a, ...i } = n;
|
|
8
|
-
return /* @__PURE__ */ r(
|
|
9
|
-
p,
|
|
10
|
-
{
|
|
11
|
-
...i,
|
|
12
|
-
type: "time",
|
|
13
|
-
value: e || "",
|
|
14
|
-
onChange: (o) => m(o.target.value),
|
|
15
|
-
disabled: t || i.disabled
|
|
16
|
-
}
|
|
17
|
-
);
|
|
18
|
-
}
|
|
19
|
-
export {
|
|
20
|
-
f as TimeField
|
|
21
|
-
};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { I as c } from "./index-D2t9pLAg.js";
|
|
3
|
-
import "react";
|
|
4
|
-
function x({ value: t, onChange: a, field: l, readonly: r, errorMessage: o, ...s }) {
|
|
5
|
-
const p = l || s.schema;
|
|
6
|
-
if (r)
|
|
7
|
-
return t ? t.startsWith("http://") || t.startsWith("https://") ? /* @__PURE__ */ e(
|
|
8
|
-
"a",
|
|
9
|
-
{
|
|
10
|
-
href: t,
|
|
11
|
-
target: "_blank",
|
|
12
|
-
rel: "noopener noreferrer",
|
|
13
|
-
className: "text-sm text-blue-600 hover:text-blue-800 hover:underline",
|
|
14
|
-
children: t
|
|
15
|
-
}
|
|
16
|
-
) : /* @__PURE__ */ e("span", { className: "text-sm", children: t }) : /* @__PURE__ */ e("span", { className: "text-sm", children: "-" });
|
|
17
|
-
const { inputType: h, ...i } = s;
|
|
18
|
-
return /* @__PURE__ */ e(
|
|
19
|
-
c,
|
|
20
|
-
{
|
|
21
|
-
...i,
|
|
22
|
-
type: "url",
|
|
23
|
-
value: t || "",
|
|
24
|
-
onChange: (n) => a(n.target.value),
|
|
25
|
-
placeholder: p?.placeholder || "https://example.com",
|
|
26
|
-
disabled: r || i.disabled,
|
|
27
|
-
"aria-invalid": !!o
|
|
28
|
-
}
|
|
29
|
-
);
|
|
30
|
-
}
|
|
31
|
-
export {
|
|
32
|
-
x as UrlField
|
|
33
|
-
};
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { jsx as e, jsxs as i } from "react/jsx-runtime";
|
|
2
|
-
import { A as m, l as o, j as b, X as f } from "./index-D2t9pLAg.js";
|
|
3
|
-
import "react";
|
|
4
|
-
function j({ value: s, onChange: d, field: p, readonly: x, ...h }) {
|
|
5
|
-
const g = (p || h.schema)?.multiple || !1;
|
|
6
|
-
if (x) {
|
|
7
|
-
if (!s) return /* @__PURE__ */ e("span", { className: "text-sm", children: "-" });
|
|
8
|
-
const t = Array.isArray(s) ? s : [s];
|
|
9
|
-
return /* @__PURE__ */ i("div", { className: "flex -space-x-2", children: [
|
|
10
|
-
t.slice(0, 3).map((r, l) => {
|
|
11
|
-
const a = r.name || r.username || "User", c = a.split(" ").map((N) => N[0]).join("").toUpperCase().slice(0, 2);
|
|
12
|
-
return /* @__PURE__ */ e(m, { className: "size-8 border-2 border-white", title: a, children: /* @__PURE__ */ e(o, { className: "bg-blue-500 text-white text-xs", children: c }) }, l);
|
|
13
|
-
}),
|
|
14
|
-
t.length > 3 && /* @__PURE__ */ e(m, { className: "size-8 border-2 border-white", children: /* @__PURE__ */ i(o, { className: "bg-gray-200 text-gray-600 text-xs", children: [
|
|
15
|
-
"+",
|
|
16
|
-
t.length - 3
|
|
17
|
-
] }) })
|
|
18
|
-
] });
|
|
19
|
-
}
|
|
20
|
-
const n = s ? Array.isArray(s) ? s : [s] : [], u = (t) => {
|
|
21
|
-
if (g) {
|
|
22
|
-
const r = n.filter((l, a) => a !== t);
|
|
23
|
-
d(r.length > 0 ? r : null);
|
|
24
|
-
} else
|
|
25
|
-
d(null);
|
|
26
|
-
};
|
|
27
|
-
return /* @__PURE__ */ i("div", { className: h.className, children: [
|
|
28
|
-
n.length > 0 && /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-2 mb-2", children: n.map((t, r) => {
|
|
29
|
-
const l = t.name || t.username || "User", a = l.split(" ").map((c) => c[0]).join("").toUpperCase().slice(0, 2);
|
|
30
|
-
return /* @__PURE__ */ i(b, { variant: "outline", className: "gap-2 pr-1", children: [
|
|
31
|
-
/* @__PURE__ */ e(m, { className: "size-5", children: /* @__PURE__ */ e(o, { className: "bg-blue-500 text-white text-xs", children: a }) }),
|
|
32
|
-
/* @__PURE__ */ e("span", { className: "text-sm", children: l }),
|
|
33
|
-
/* @__PURE__ */ e(
|
|
34
|
-
"button",
|
|
35
|
-
{
|
|
36
|
-
type: "button",
|
|
37
|
-
onClick: () => u(r),
|
|
38
|
-
className: "ml-1 rounded-full hover:bg-gray-200 p-0.5",
|
|
39
|
-
children: /* @__PURE__ */ e(f, { className: "size-3" })
|
|
40
|
-
}
|
|
41
|
-
)
|
|
42
|
-
] }, r);
|
|
43
|
-
}) }),
|
|
44
|
-
/* @__PURE__ */ e("div", { className: "text-sm text-gray-500 italic", children: "User selection component requires integration with user management system" })
|
|
45
|
-
] });
|
|
46
|
-
}
|
|
47
|
-
export {
|
|
48
|
-
j as UserField
|
|
49
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { jsx as m, jsxs as e } from "react/jsx-runtime";
|
|
2
|
-
function l({ 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__ */ m("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("div", { className: `text-sm ${r.className || ""}`, children: [
|
|
11
|
-
/* @__PURE__ */ e("span", { className: "font-mono text-gray-700", children: [
|
|
12
|
-
"[",
|
|
13
|
-
a,
|
|
14
|
-
"...]"
|
|
15
|
-
] }),
|
|
16
|
-
/* @__PURE__ */ e("span", { className: "text-gray-500 ml-2", children: [
|
|
17
|
-
"(",
|
|
18
|
-
i,
|
|
19
|
-
"D)"
|
|
20
|
-
] })
|
|
21
|
-
] });
|
|
22
|
-
}
|
|
23
|
-
export {
|
|
24
|
-
l as VectorField
|
|
25
|
-
};
|