@object-ui/plugin-detail 3.3.0 → 3.3.1
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/CHANGELOG.md +11 -0
- package/README.md +21 -1
- package/dist/AddressField-LgHnO2Lk.js +98 -0
- package/dist/AutoNumberField-xZCrU0eW.js +14 -0
- package/dist/{AvatarField-Xuieq0ZI.js → AvatarField-Dy2XGlPz.js} +16 -15
- package/dist/{BooleanField-DwfMKknK.js → BooleanField-C0Clfka5.js} +11 -10
- package/dist/CodeField-CHUa07B6.js +23 -0
- package/dist/ColorField-vxHqEhcS.js +38 -0
- package/dist/CurrencyField-DiWjYWDo.js +49 -0
- package/dist/DateField-DGaRPM4P.js +22 -0
- package/dist/DateTimeField-8QnpsI_h.js +30 -0
- package/dist/EmailField-CkVgMbpI.js +26 -0
- package/dist/FileField-5UPV7uek.js +149 -0
- package/dist/FormulaField-BUgt6-Pi.js +17 -0
- package/dist/GeolocationField-D9T_jgG6.js +118 -0
- package/dist/GridField-DE_HwiIN.js +49 -0
- package/dist/ImageField-Dswnqtzf.js +73 -0
- package/dist/LocationField-gjqbE6na.js +36 -0
- package/dist/LookupField-BcS3LRKc.js +901 -0
- package/dist/{MasterDetailField-B0HTmmD7.js → MasterDetailField-BF6_-X3A.js} +20 -19
- package/dist/NumberField-Dj2rYmrS.js +27 -0
- package/dist/ObjectField-BymIojwd.js +50 -0
- package/dist/{PasswordField-DVTimsc3.js → PasswordField-ED_Xgqz-.js} +8 -7
- package/dist/PercentField-D-JKOxKC.js +61 -0
- package/dist/PhoneField-DSCaGYq7.js +26 -0
- package/dist/QRCodeField-CtcOUapi.js +73 -0
- package/dist/{RatingField-rRi_P0N0.js → RatingField-BDnyQFWy.js} +10 -9
- package/dist/RichTextField-CH6LVZQA.js +33 -0
- package/dist/SelectField-DE4dpkMV.js +36 -0
- package/dist/{SignatureField-2CnhcWI0.js → SignatureField-B1wh3f5A.js} +18 -17
- package/dist/{SliderField-DEpMVXko.js → SliderField-zoTCKh9n.js} +2 -1
- package/dist/SummaryField-BeBVT6VN.js +22 -0
- package/dist/TextAreaField-rfUGrRxh.js +37 -0
- package/dist/TextField-C_yM7ATQ.js +30 -0
- package/dist/TimeField-BcQmBZi9.js +22 -0
- package/dist/UrlField-BakaF6NI.js +31 -0
- package/dist/UserField-zS7y3eKb.js +76 -0
- package/dist/VectorField-CTZ4myDM.js +34 -0
- package/dist/index.js +1912 -1728
- package/dist/index.umd.cjs +38 -47
- package/dist/packages/plugin-detail/src/DetailSection.d.ts.map +1 -1
- package/dist/packages/plugin-detail/src/DetailView.d.ts +24 -0
- package/dist/packages/plugin-detail/src/DetailView.d.ts.map +1 -1
- package/dist/packages/plugin-detail/src/RelatedList.d.ts +8 -0
- package/dist/packages/plugin-detail/src/RelatedList.d.ts.map +1 -1
- package/dist/packages/plugin-detail/src/useDetailTranslation.d.ts.map +1 -1
- package/dist/plugin-detail.css +1 -2
- package/dist/rolldown-runtime-DnwLefa7.js +23 -0
- package/dist/{src-C56Ly5uG.js → src-DyUKLvMN.js} +18271 -26636
- package/dist/{useFieldTranslation-CkxqyB82.js → useFieldTranslation-BRgjC1oq.js} +1 -1
- package/package.json +33 -11
- package/.turbo/turbo-build.log +0 -64
- package/dist/AddressField-CDLSeyNx.js +0 -93
- package/dist/AutoNumberField-CtE7suf5.js +0 -14
- package/dist/CodeField-CfwgRxx2.js +0 -22
- package/dist/ColorField-YKHA7dBD.js +0 -37
- package/dist/CurrencyField-tvS3fPAF.js +0 -51
- package/dist/DateField-BKqXpkOh.js +0 -21
- package/dist/DateTimeField-CR-nJCE7.js +0 -32
- package/dist/EmailField-CgvW1Qal.js +0 -28
- package/dist/FileField-BVAme2ML.js +0 -151
- package/dist/FormulaField-DamJ2VaG.js +0 -14
- package/dist/GeolocationField-C99z7ZBM.js +0 -113
- package/dist/GridField-C9JbpTx_.js +0 -51
- package/dist/ImageField-CDANtgVV.js +0 -75
- package/dist/LocationField-ZSyZ0O-h.js +0 -35
- package/dist/LookupField-B3hQJt95.js +0 -903
- package/dist/LookupField-D00z6gn_.js +0 -2
- package/dist/NumberField-DL2QAL7X.js +0 -26
- package/dist/ObjectField-JYvUnuRO.js +0 -52
- package/dist/PercentField-DjR6BSpw.js +0 -63
- package/dist/PhoneField-CX1JL-jp.js +0 -28
- package/dist/QRCodeField-CH_1pU6R.js +0 -72
- package/dist/RichTextField-CJqLWlrb.js +0 -32
- package/dist/SelectField-DGoDoRM_.js +0 -30
- package/dist/SelectField-XBVI50AD.js +0 -2
- package/dist/SummaryField-7ch9aqAu.js +0 -19
- package/dist/TextAreaField-Cmw1oXcw.js +0 -36
- package/dist/TextField-OTLa3p51.js +0 -29
- package/dist/TimeField-DKPoNWoR.js +0 -21
- package/dist/UrlField-CxbmzP9f.js +0 -33
- package/dist/UserField-ChvwUkMK.js +0 -78
- package/dist/VectorField-BVClL8Vw.js +0 -36
- package/src/ActivityTimeline.tsx +0 -184
- package/src/CommentAttachment.tsx +0 -194
- package/src/CommentInput.tsx +0 -81
- package/src/DetailSection.tsx +0 -340
- package/src/DetailTabs.tsx +0 -73
- package/src/DetailView.stories.tsx +0 -334
- package/src/DetailView.tsx +0 -823
- package/src/DiffView.tsx +0 -233
- package/src/FieldChangeItem.tsx +0 -46
- package/src/HeaderHighlight.tsx +0 -88
- package/src/InlineCreateRelated.tsx +0 -291
- package/src/MentionAutocomplete.tsx +0 -123
- package/src/PointInTimeRestore.tsx +0 -261
- package/src/ReactionPicker.tsx +0 -106
- package/src/RecordActivityTimeline.tsx +0 -433
- package/src/RecordChatterPanel.tsx +0 -209
- package/src/RecordComments.tsx +0 -217
- package/src/RecordNavigationEnhanced.tsx +0 -213
- package/src/RelatedList.tsx +0 -413
- package/src/RelationshipGraph.tsx +0 -286
- package/src/RichTextCommentInput.tsx +0 -350
- package/src/SectionGroup.tsx +0 -101
- package/src/SubscriptionToggle.tsx +0 -62
- package/src/ThreadedReplies.tsx +0 -163
- package/src/__tests__/ActivityTimeline.test.tsx +0 -119
- package/src/__tests__/ActivityTimelineFiltering.test.tsx +0 -143
- package/src/__tests__/CommentInput.test.tsx +0 -57
- package/src/__tests__/DetailSection.test.tsx +0 -490
- package/src/__tests__/DetailView.test.tsx +0 -694
- package/src/__tests__/FieldChangeItem.test.tsx +0 -119
- package/src/__tests__/HeaderHighlight.test.tsx +0 -213
- package/src/__tests__/MentionAutocomplete.test.tsx +0 -97
- package/src/__tests__/ReactionPicker.test.tsx +0 -113
- package/src/__tests__/RecordActivityTimeline.test.tsx +0 -395
- package/src/__tests__/RecordChatterPanel.test.tsx +0 -265
- package/src/__tests__/RecordComments.test.tsx +0 -96
- package/src/__tests__/RecordCommentsPinSearch.test.tsx +0 -133
- package/src/__tests__/RelatedList.test.tsx +0 -160
- package/src/__tests__/SectionGroup.test.tsx +0 -101
- package/src/__tests__/SubscriptionToggle.test.tsx +0 -84
- package/src/__tests__/ThreadedReplies.test.tsx +0 -212
- package/src/__tests__/autoLayout.test.ts +0 -228
- package/src/__tests__/phase12-features.test.tsx +0 -583
- package/src/__tests__/roadmap-features.test.tsx +0 -478
- package/src/autoLayout.ts +0 -128
- package/src/index.tsx +0 -149
- package/src/useDetailTranslation.ts +0 -183
- package/tsconfig.json +0 -18
- package/vite.config.ts +0 -57
- package/vitest.config.ts +0 -13
- package/vitest.setup.ts +0 -1
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { n as e } from "./rolldown-runtime-DnwLefa7.js";
|
|
2
|
+
import { O as t, t as n } from "./src-DyUKLvMN.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
5
|
+
//#region ../fields/src/widgets/TimeField.tsx
|
|
6
|
+
var i = /* @__PURE__ */ e({ TimeField: () => a });
|
|
7
|
+
function a({ value: e, onChange: i, field: a, readonly: o, ...s }) {
|
|
8
|
+
if (o) return /* @__PURE__ */ r("span", {
|
|
9
|
+
className: "text-sm",
|
|
10
|
+
children: e || /* @__PURE__ */ r(n, {})
|
|
11
|
+
});
|
|
12
|
+
let { inputType: c, ...l } = s;
|
|
13
|
+
return /* @__PURE__ */ r(t, {
|
|
14
|
+
...l,
|
|
15
|
+
type: "time",
|
|
16
|
+
value: e || "",
|
|
17
|
+
onChange: (e) => i(e.target.value),
|
|
18
|
+
disabled: o || l.disabled
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
//#endregion
|
|
22
|
+
export { i as t };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { n as e } from "./rolldown-runtime-DnwLefa7.js";
|
|
2
|
+
import { O as t, t as n } from "./src-DyUKLvMN.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
5
|
+
//#region ../fields/src/widgets/UrlField.tsx
|
|
6
|
+
var i = /* @__PURE__ */ e({ UrlField: () => a });
|
|
7
|
+
function a({ value: e, onChange: i, field: a, readonly: o, errorMessage: s, ...c }) {
|
|
8
|
+
let l = a || c.schema;
|
|
9
|
+
if (o) return e ? e.startsWith("http://") || e.startsWith("https://") ? /* @__PURE__ */ r("a", {
|
|
10
|
+
href: e,
|
|
11
|
+
target: "_blank",
|
|
12
|
+
rel: "noopener noreferrer",
|
|
13
|
+
className: "text-sm text-blue-600 hover:text-blue-800 hover:underline",
|
|
14
|
+
children: e
|
|
15
|
+
}) : /* @__PURE__ */ r("span", {
|
|
16
|
+
className: "text-sm",
|
|
17
|
+
children: e
|
|
18
|
+
}) : /* @__PURE__ */ r(n, {});
|
|
19
|
+
let { inputType: u, ...d } = c;
|
|
20
|
+
return /* @__PURE__ */ r(t, {
|
|
21
|
+
...d,
|
|
22
|
+
type: "url",
|
|
23
|
+
value: e || "",
|
|
24
|
+
onChange: (e) => i(e.target.value),
|
|
25
|
+
placeholder: l?.placeholder || "https://example.com",
|
|
26
|
+
disabled: o || d.disabled,
|
|
27
|
+
"aria-invalid": !!s
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
//#endregion
|
|
31
|
+
export { i as t };
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { n as e } from "./rolldown-runtime-DnwLefa7.js";
|
|
2
|
+
import { G as t, U as n, W as r, X as i, t as a } from "./src-DyUKLvMN.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
5
|
+
//#region ../fields/src/widgets/UserField.tsx
|
|
6
|
+
var c = /* @__PURE__ */ e({ UserField: () => l });
|
|
7
|
+
function l({ value: e, onChange: c, field: l, readonly: u, ...d }) {
|
|
8
|
+
let f = (l || d.schema)?.multiple || !1;
|
|
9
|
+
if (u) {
|
|
10
|
+
if (!e) return /* @__PURE__ */ o(a, {});
|
|
11
|
+
let n = Array.isArray(e) ? e : [e];
|
|
12
|
+
return /* @__PURE__ */ s("div", {
|
|
13
|
+
className: "flex -space-x-2",
|
|
14
|
+
children: [n.slice(0, 3).map((e, n) => {
|
|
15
|
+
let i = e.name || e.username || "User";
|
|
16
|
+
return /* @__PURE__ */ o(r, {
|
|
17
|
+
className: "size-8 border-2 border-white",
|
|
18
|
+
title: i,
|
|
19
|
+
children: /* @__PURE__ */ o(t, {
|
|
20
|
+
className: "bg-blue-500 text-white text-xs",
|
|
21
|
+
children: i.split(" ").map((e) => e[0]).join("").toUpperCase().slice(0, 2)
|
|
22
|
+
})
|
|
23
|
+
}, n);
|
|
24
|
+
}), n.length > 3 && /* @__PURE__ */ o(r, {
|
|
25
|
+
className: "size-8 border-2 border-white",
|
|
26
|
+
children: /* @__PURE__ */ s(t, {
|
|
27
|
+
className: "bg-gray-200 text-gray-600 text-xs",
|
|
28
|
+
children: ["+", n.length - 3]
|
|
29
|
+
})
|
|
30
|
+
})]
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
let p = e ? Array.isArray(e) ? e : [e] : [], m = (e) => {
|
|
34
|
+
if (f) {
|
|
35
|
+
let t = p.filter((t, n) => n !== e);
|
|
36
|
+
c(t.length > 0 ? t : null);
|
|
37
|
+
} else c(null);
|
|
38
|
+
};
|
|
39
|
+
return /* @__PURE__ */ s("div", {
|
|
40
|
+
className: d.className,
|
|
41
|
+
children: [p.length > 0 && /* @__PURE__ */ o("div", {
|
|
42
|
+
className: "flex flex-wrap gap-2 mb-2",
|
|
43
|
+
children: p.map((e, a) => {
|
|
44
|
+
let c = e.name || e.username || "User";
|
|
45
|
+
return /* @__PURE__ */ s(n, {
|
|
46
|
+
variant: "outline",
|
|
47
|
+
className: "gap-2 pr-1",
|
|
48
|
+
children: [
|
|
49
|
+
/* @__PURE__ */ o(r, {
|
|
50
|
+
className: "size-5",
|
|
51
|
+
children: /* @__PURE__ */ o(t, {
|
|
52
|
+
className: "bg-blue-500 text-white text-xs",
|
|
53
|
+
children: c.split(" ").map((e) => e[0]).join("").toUpperCase().slice(0, 2)
|
|
54
|
+
})
|
|
55
|
+
}),
|
|
56
|
+
/* @__PURE__ */ o("span", {
|
|
57
|
+
className: "text-sm",
|
|
58
|
+
children: c
|
|
59
|
+
}),
|
|
60
|
+
/* @__PURE__ */ o("button", {
|
|
61
|
+
type: "button",
|
|
62
|
+
onClick: () => m(a),
|
|
63
|
+
className: "ml-1 rounded-full hover:bg-gray-200 p-0.5",
|
|
64
|
+
children: /* @__PURE__ */ o(i, { className: "size-3" })
|
|
65
|
+
})
|
|
66
|
+
]
|
|
67
|
+
}, a);
|
|
68
|
+
})
|
|
69
|
+
}), /* @__PURE__ */ o("div", {
|
|
70
|
+
className: "text-sm text-gray-500 italic",
|
|
71
|
+
children: "User selection component requires integration with user management system"
|
|
72
|
+
})]
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
//#endregion
|
|
76
|
+
export { c as t };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { n as e } from "./rolldown-runtime-DnwLefa7.js";
|
|
2
|
+
import { t } from "./src-DyUKLvMN.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
5
|
+
//#region ../fields/src/widgets/VectorField.tsx
|
|
6
|
+
var i = /* @__PURE__ */ e({ VectorField: () => a });
|
|
7
|
+
function a({ value: e, field: i, ...a }) {
|
|
8
|
+
let o = (i || a.schema)?.dimensions || (Array.isArray(e) ? e.length : 0);
|
|
9
|
+
if (!e || !Array.isArray(e)) return /* @__PURE__ */ n(t, {});
|
|
10
|
+
let s = e.slice(0, 3).map((e) => {
|
|
11
|
+
let t = Number(e);
|
|
12
|
+
return isNaN(t) ? "0" : t.toFixed(4);
|
|
13
|
+
}).join(", ");
|
|
14
|
+
return /* @__PURE__ */ r("div", {
|
|
15
|
+
className: `text-sm ${a.className || ""}`,
|
|
16
|
+
children: [/* @__PURE__ */ r("span", {
|
|
17
|
+
className: "font-mono text-gray-700",
|
|
18
|
+
children: [
|
|
19
|
+
"[",
|
|
20
|
+
s,
|
|
21
|
+
"...]"
|
|
22
|
+
]
|
|
23
|
+
}), /* @__PURE__ */ r("span", {
|
|
24
|
+
className: "text-gray-500 ml-2",
|
|
25
|
+
children: [
|
|
26
|
+
"(",
|
|
27
|
+
o,
|
|
28
|
+
"D)"
|
|
29
|
+
]
|
|
30
|
+
})]
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
//#endregion
|
|
34
|
+
export { i as t };
|