@object-ui/plugin-detail 3.1.2 → 3.1.3
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 +43 -41
- package/CHANGELOG.md +10 -0
- package/dist/{AddressField-QBIlXCFl.js → AddressField-BtiTrEpf.js} +1 -1
- package/dist/{AvatarField-BEZuQTAH.js → AvatarField-CwlnWNSf.js} +7 -7
- package/dist/{BooleanField-doa93aFX.js → BooleanField-DpMXU2ya.js} +1 -1
- package/dist/{CodeField-jVV-hIXg.js → CodeField-gwmcFihg.js} +2 -2
- package/dist/{ColorField-B53qKQGW.js → ColorField-CWmF_zoW.js} +1 -1
- package/dist/{CurrencyField-og0NJ2ax.js → CurrencyField-BF3tYAgm.js} +1 -1
- package/dist/{DateField-BFx64AtG.js → DateField-a6Ka9ph2.js} +1 -1
- package/dist/{DateTimeField-Cxs2Rx2f.js → DateTimeField-C4wWOEiw.js} +1 -1
- package/dist/{EmailField-BfcpzRe7.js → EmailField-DJqiQ4sp.js} +1 -1
- package/dist/{FileField-KarqvhYm.js → FileField-ChjjCydz.js} +1 -1
- package/dist/{GeolocationField-B5SKZaqn.js → GeolocationField-BnkeUBek.js} +1 -1
- package/dist/{GridField-DOotrUTo.js → GridField-DoHqc2ON.js} +6 -6
- package/dist/{ImageField-Ddotp4u-.js → ImageField-Ld7SHA8N.js} +1 -1
- package/dist/{LocationField-tOkQaPIM.js → LocationField-Bgu-vMAE.js} +1 -1
- package/dist/{MasterDetailField-CpHw3nTE.js → MasterDetailField-Bp5WBTzU.js} +3 -3
- package/dist/{NumberField-CzBb2a28.js → NumberField-uBqVZ-gt.js} +1 -1
- package/dist/{ObjectField-BoL-JqE4.js → ObjectField-BH1Md9gH.js} +6 -6
- package/dist/{PasswordField-DrTzkYgj.js → PasswordField-D8GZjY7d.js} +1 -1
- package/dist/{PercentField-B9ZUQ3zE.js → PercentField-DyK8vg8M.js} +1 -1
- package/dist/{PhoneField-Bf9lhpdu.js → PhoneField-B3qJyLP0.js} +1 -1
- package/dist/{QRCodeField-PzMpdBKd.js → QRCodeField-CGiRTCZq.js} +1 -1
- package/dist/{RatingField-CeBMFe8o.js → RatingField-CWVaJNyf.js} +4 -4
- package/dist/{RichTextField-Ch7CHSQ0.js → RichTextField-CusveP9T.js} +1 -1
- package/dist/{SelectField-f5Nbi02x.js → SelectField-UdDfsEZo.js} +1 -1
- package/dist/{SignatureField-CpxTX2tR.js → SignatureField-DFvPKbuI.js} +1 -1
- package/dist/{SliderField-BoZtzgcr.js → SliderField-C-HvGV9e.js} +1 -1
- package/dist/{TextAreaField-rT1DLnV2.js → TextAreaField-C5KygUT3.js} +1 -1
- package/dist/{TextField-CflRxusu.js → TextField-oUjuqQ1x.js} +1 -1
- package/dist/{TimeField-DeVeCpRu.js → TimeField-SsQ6rfk5.js} +1 -1
- package/dist/{UrlField-UWKfhP9T.js → UrlField-kd48Ip95.js} +1 -1
- package/dist/{UserField-Cp2zQDjz.js → UserField-BOjE_CAz.js} +11 -11
- package/dist/{index-V_WBvcaA.js → index-D2t9pLAg.js} +56341 -56642
- package/dist/index.js +10 -10
- package/dist/index.umd.cjs +61 -63
- package/dist/plugin-detail.css +1 -1
- package/dist/src/DetailSection.d.ts +10 -0
- package/dist/src/DetailSection.d.ts.map +1 -1
- package/dist/src/HeaderHighlight.d.ts +2 -0
- package/dist/src/HeaderHighlight.d.ts.map +1 -1
- package/dist/src/RecordChatterPanel.d.ts +2 -0
- package/dist/src/RecordChatterPanel.d.ts.map +1 -1
- package/dist/src/autoLayout.d.ts +10 -3
- package/dist/src/autoLayout.d.ts.map +1 -1
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.d.ts.map +1 -1
- package/package.json +7 -7
- package/src/DetailSection.tsx +40 -1
- package/src/DetailView.tsx +1 -1
- package/src/HeaderHighlight.tsx +22 -1
- package/src/RecordChatterPanel.tsx +6 -1
- package/src/RelatedList.tsx +1 -1
- package/src/__tests__/DetailSection.test.tsx +61 -0
- package/src/__tests__/HeaderHighlight.test.tsx +145 -0
- package/src/__tests__/RecordChatterPanel.test.tsx +38 -0
- package/src/__tests__/RelatedList.test.tsx +3 -3
- package/src/__tests__/autoLayout.test.ts +44 -0
- package/src/autoLayout.ts +25 -8
- package/src/index.tsx +1 -1
- package/dist/LookupField-DF36GvIP.js +0 -96
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,55 +1,57 @@
|
|
|
1
1
|
|
|
2
|
-
> @object-ui/plugin-detail@3.1.
|
|
2
|
+
> @object-ui/plugin-detail@3.1.3 build /home/runner/work/objectui/objectui/packages/plugin-detail
|
|
3
3
|
> vite build
|
|
4
4
|
|
|
5
5
|
[36mvite v7.3.1 [32mbuilding client environment for production...[36m[39m
|
|
6
6
|
transforming...
|
|
7
|
-
[32m✓[39m
|
|
7
|
+
[32m✓[39m 3876 modules transformed.
|
|
8
8
|
rendering chunks...
|
|
9
|
+
[33m[plugin vite:reporter]
|
|
10
|
+
(!) /home/runner/work/objectui/objectui/packages/fields/src/widgets/LookupField.tsx is dynamically imported by /home/runner/work/objectui/objectui/packages/fields/src/index.tsx but also statically imported by /home/runner/work/objectui/objectui/packages/fields/src/index.tsx, dynamic import will not move module into another chunk.
|
|
11
|
+
[39m
|
|
9
12
|
[32m
|
|
10
13
|
[36m[vite:dts][32m Start generate declaration files...[39m
|
|
11
14
|
computing gzip size...
|
|
12
|
-
[32m[36m[vite:dts][32m Declaration files built in
|
|
15
|
+
[32m[36m[vite:dts][32m Declaration files built in 26070ms.
|
|
13
16
|
[39m
|
|
14
|
-
[2mdist/[22m[35mplugin-detail.css [39m[1m[2m 122.
|
|
17
|
+
[2mdist/[22m[35mplugin-detail.css [39m[1m[2m 122.96 kB[22m[1m[22m[2m │ gzip: 20.09 kB[22m
|
|
15
18
|
[2mdist/[22m[36mAutoNumberField-BxnFqllo.js [39m[1m[2m 0.29 kB[22m[1m[22m[2m │ gzip: 0.24 kB[22m
|
|
16
19
|
[2mdist/[22m[36mSummaryField-ugYPYxjP.js [39m[1m[2m 0.49 kB[22m[1m[22m[2m │ gzip: 0.34 kB[22m
|
|
17
|
-
[2mdist/[22m[36mTimeField-
|
|
20
|
+
[2mdist/[22m[36mTimeField-SsQ6rfk5.js [39m[1m[2m 0.52 kB[22m[1m[22m[2m │ gzip: 0.33 kB[22m
|
|
18
21
|
[2mdist/[22m[36mFormulaField-CJkkwIK8.js [39m[1m[2m 0.53 kB[22m[1m[22m[2m │ gzip: 0.36 kB[22m
|
|
19
|
-
[2mdist/[22m[36mDateField-
|
|
20
|
-
[2mdist/[22m[36mNumberField-
|
|
21
|
-
[2mdist/[22m[36mDateTimeField-
|
|
22
|
-
[2mdist/[22m[36mCodeField-
|
|
22
|
+
[2mdist/[22m[36mDateField-a6Ka9ph2.js [39m[1m[2m 0.55 kB[22m[1m[22m[2m │ gzip: 0.35 kB[22m
|
|
23
|
+
[2mdist/[22m[36mNumberField-uBqVZ-gt.js [39m[1m[2m 0.70 kB[22m[1m[22m[2m │ gzip: 0.43 kB[22m
|
|
24
|
+
[2mdist/[22m[36mDateTimeField-C4wWOEiw.js [39m[1m[2m 0.73 kB[22m[1m[22m[2m │ gzip: 0.41 kB[22m
|
|
25
|
+
[2mdist/[22m[36mCodeField-gwmcFihg.js [39m[1m[2m 0.76 kB[22m[1m[22m[2m │ gzip: 0.46 kB[22m
|
|
23
26
|
[2mdist/[22m[36mVectorField-CKg9jdGa.js [39m[1m[2m 0.80 kB[22m[1m[22m[2m │ gzip: 0.43 kB[22m
|
|
24
|
-
[2mdist/[22m[36mPhoneField-
|
|
25
|
-
[2mdist/[22m[36mEmailField-
|
|
26
|
-
[2mdist/[22m[36mTextField-
|
|
27
|
-
[2mdist/[22m[36mSelectField-
|
|
28
|
-
[2mdist/[22m[36mLocationField-
|
|
29
|
-
[2mdist/[22m[36mUrlField-
|
|
30
|
-
[2mdist/[22m[36mSliderField-
|
|
31
|
-
[2mdist/[22m[36mindex.js [39m[1m[2m 1.11 kB[22m[1m[22m[2m │ gzip: 0.
|
|
32
|
-
[2mdist/[22m[36mTextAreaField-
|
|
33
|
-
[2mdist/[22m[36mBooleanField-
|
|
34
|
-
[2mdist/[22m[36mRichTextField-
|
|
35
|
-
[2mdist/[22m[36mPasswordField-
|
|
36
|
-
[2mdist/[22m[36mColorField-
|
|
37
|
-
[2mdist/[22m[36mCurrencyField-
|
|
38
|
-
[2mdist/[22m[36mRatingField-
|
|
39
|
-
[2mdist/[22m[36mObjectField-
|
|
40
|
-
[2mdist/[22m[36mGridField-
|
|
41
|
-
[2mdist/[22m[36mPercentField-
|
|
42
|
-
[2mdist/[22m[36mUserField-
|
|
43
|
-
[2mdist/[22m[36mQRCodeField-
|
|
44
|
-
[2mdist/[22m[36mAvatarField-
|
|
45
|
-
[2mdist/[22m[36mImageField-
|
|
46
|
-
[2mdist/[22m[36mSignatureField-
|
|
47
|
-
[2mdist/[22m[36mAddressField-
|
|
48
|
-
[2mdist/[22m[36mMasterDetailField-
|
|
49
|
-
[2mdist/[22m[36mGeolocationField-
|
|
50
|
-
[2mdist/[22m[
|
|
51
|
-
[2mdist/[22m[
|
|
52
|
-
[2mdist/[22m[
|
|
53
|
-
[2mdist/[22m[
|
|
54
|
-
[
|
|
55
|
-
[32m✓ built in 50.56s[39m
|
|
27
|
+
[2mdist/[22m[36mPhoneField-B3qJyLP0.js [39m[1m[2m 0.82 kB[22m[1m[22m[2m │ gzip: 0.47 kB[22m
|
|
28
|
+
[2mdist/[22m[36mEmailField-DJqiQ4sp.js [39m[1m[2m 0.83 kB[22m[1m[22m[2m │ gzip: 0.47 kB[22m
|
|
29
|
+
[2mdist/[22m[36mTextField-oUjuqQ1x.js [39m[1m[2m 0.84 kB[22m[1m[22m[2m │ gzip: 0.42 kB[22m
|
|
30
|
+
[2mdist/[22m[36mSelectField-UdDfsEZo.js [39m[1m[2m 0.92 kB[22m[1m[22m[2m │ gzip: 0.48 kB[22m
|
|
31
|
+
[2mdist/[22m[36mLocationField-Bgu-vMAE.js [39m[1m[2m 0.97 kB[22m[1m[22m[2m │ gzip: 0.52 kB[22m
|
|
32
|
+
[2mdist/[22m[36mUrlField-kd48Ip95.js [39m[1m[2m 1.00 kB[22m[1m[22m[2m │ gzip: 0.51 kB[22m
|
|
33
|
+
[2mdist/[22m[36mSliderField-C-HvGV9e.js [39m[1m[2m 1.03 kB[22m[1m[22m[2m │ gzip: 0.48 kB[22m
|
|
34
|
+
[2mdist/[22m[36mindex.js [39m[1m[2m 1.11 kB[22m[1m[22m[2m │ gzip: 0.60 kB[22m
|
|
35
|
+
[2mdist/[22m[36mTextAreaField-C5KygUT3.js [39m[1m[2m 1.12 kB[22m[1m[22m[2m │ gzip: 0.58 kB[22m
|
|
36
|
+
[2mdist/[22m[36mBooleanField-DpMXU2ya.js [39m[1m[2m 1.16 kB[22m[1m[22m[2m │ gzip: 0.50 kB[22m
|
|
37
|
+
[2mdist/[22m[36mRichTextField-CusveP9T.js [39m[1m[2m 1.18 kB[22m[1m[22m[2m │ gzip: 0.58 kB[22m
|
|
38
|
+
[2mdist/[22m[36mPasswordField-D8GZjY7d.js [39m[1m[2m 1.24 kB[22m[1m[22m[2m │ gzip: 0.61 kB[22m
|
|
39
|
+
[2mdist/[22m[36mColorField-CWmF_zoW.js [39m[1m[2m 1.26 kB[22m[1m[22m[2m │ gzip: 0.52 kB[22m
|
|
40
|
+
[2mdist/[22m[36mCurrencyField-BF3tYAgm.js [39m[1m[2m 1.51 kB[22m[1m[22m[2m │ gzip: 0.73 kB[22m
|
|
41
|
+
[2mdist/[22m[36mRatingField-CWVaJNyf.js [39m[1m[2m 1.66 kB[22m[1m[22m[2m │ gzip: 0.65 kB[22m
|
|
42
|
+
[2mdist/[22m[36mObjectField-BH1Md9gH.js [39m[1m[2m 1.68 kB[22m[1m[22m[2m │ gzip: 0.76 kB[22m
|
|
43
|
+
[2mdist/[22m[36mGridField-DoHqc2ON.js [39m[1m[2m 1.75 kB[22m[1m[22m[2m │ gzip: 0.68 kB[22m
|
|
44
|
+
[2mdist/[22m[36mPercentField-DyK8vg8M.js [39m[1m[2m 1.94 kB[22m[1m[22m[2m │ gzip: 0.84 kB[22m
|
|
45
|
+
[2mdist/[22m[36mUserField-BOjE_CAz.js [39m[1m[2m 2.39 kB[22m[1m[22m[2m │ gzip: 0.90 kB[22m
|
|
46
|
+
[2mdist/[22m[36mQRCodeField-CGiRTCZq.js [39m[1m[2m 2.41 kB[22m[1m[22m[2m │ gzip: 0.91 kB[22m
|
|
47
|
+
[2mdist/[22m[36mAvatarField-CwlnWNSf.js [39m[1m[2m 2.69 kB[22m[1m[22m[2m │ gzip: 1.06 kB[22m
|
|
48
|
+
[2mdist/[22m[36mImageField-Ld7SHA8N.js [39m[1m[2m 2.89 kB[22m[1m[22m[2m │ gzip: 1.14 kB[22m
|
|
49
|
+
[2mdist/[22m[36mSignatureField-DFvPKbuI.js [39m[1m[2m 3.04 kB[22m[1m[22m[2m │ gzip: 1.10 kB[22m
|
|
50
|
+
[2mdist/[22m[36mAddressField-BtiTrEpf.js [39m[1m[2m 3.05 kB[22m[1m[22m[2m │ gzip: 0.75 kB[22m
|
|
51
|
+
[2mdist/[22m[36mMasterDetailField-Bp5WBTzU.js [39m[1m[2m 3.48 kB[22m[1m[22m[2m │ gzip: 0.99 kB[22m
|
|
52
|
+
[2mdist/[22m[36mGeolocationField-BnkeUBek.js [39m[1m[2m 3.80 kB[22m[1m[22m[2m │ gzip: 1.21 kB[22m
|
|
53
|
+
[2mdist/[22m[36mFileField-ChjjCydz.js [39m[1m[2m 5.63 kB[22m[1m[22m[2m │ gzip: 1.95 kB[22m
|
|
54
|
+
[2mdist/[22m[36mindex-D2t9pLAg.js [39m[1m[33m3,378.40 kB[39m[22m[2m │ gzip: 783.90 kB[22m
|
|
55
|
+
[2mdist/[22m[35mplugin-detail.css [39m[1m[2m 122.96 kB[22m[1m[22m[2m │ gzip: 20.09 kB[22m
|
|
56
|
+
[2mdist/[22m[36mindex.umd.cjs [39m[1m[33m2,364.78 kB[39m[22m[2m │ gzip: 619.33 kB[22m
|
|
57
|
+
[32m✓ built in 43.51s[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as t, jsxs as a } from "react/jsx-runtime";
|
|
2
|
-
import { L as r, I as c } from "./index-
|
|
2
|
+
import { L as r, I as c } from "./index-D2t9pLAg.js";
|
|
3
3
|
import "react";
|
|
4
4
|
function p({ value: o, onChange: h, field: u, readonly: i, ...l }) {
|
|
5
5
|
const s = o || {}, d = (e, n) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as s, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import f from "react";
|
|
3
|
-
import { A as h,
|
|
4
|
-
function B({ value: t, onChange:
|
|
3
|
+
import { A as h, n as p, l as g, X as A, B as F, U as R } from "./index-D2t9pLAg.js";
|
|
4
|
+
function B({ value: t, onChange: i, field: v, readonly: l, ...c }) {
|
|
5
5
|
const [b, o] = f.useState(!1), d = f.useRef(null), r = v || c.schema, N = (u) => {
|
|
6
6
|
const a = u.target.files?.[0];
|
|
7
7
|
if (!a) return;
|
|
@@ -13,12 +13,12 @@ function B({ value: t, onChange: n, field: v, readonly: l, ...c }) {
|
|
|
13
13
|
console.error("File size must be less than 5MB");
|
|
14
14
|
return;
|
|
15
15
|
}
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
n
|
|
19
|
-
},
|
|
16
|
+
const n = new FileReader();
|
|
17
|
+
n.onloadend = () => {
|
|
18
|
+
i(n.result);
|
|
19
|
+
}, n.readAsDataURL(a);
|
|
20
20
|
}, x = () => {
|
|
21
|
-
|
|
21
|
+
i("");
|
|
22
22
|
}, m = () => (r?.defaultName || r?.label || "User").split(" ").map((a) => a[0]).join("").toUpperCase().slice(0, 2);
|
|
23
23
|
return l ? /* @__PURE__ */ s(h, { className: "w-16 h-16", children: [
|
|
24
24
|
t && /* @__PURE__ */ e(p, { src: t, alt: r?.label }),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as e, jsxs as a } from "react/jsx-runtime";
|
|
2
2
|
import { useId as f } from "react";
|
|
3
|
-
import { C as p, L as l, S as k } from "./index-
|
|
3
|
+
import { C as p, L as l, S as k } from "./index-D2t9pLAg.js";
|
|
4
4
|
function w({ value: t, onChange: n, field: h, readonly: i, ...o }) {
|
|
5
5
|
const d = h || o.schema, m = d?.widget, x = f(), c = d?.name || x, r = d?.label || "Checkbox";
|
|
6
6
|
if (i)
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { i as l, T as i } from "./index-D2t9pLAg.js";
|
|
3
3
|
import "react";
|
|
4
4
|
function g({ value: o, onChange: s, field: c, readonly: r, ...e }) {
|
|
5
5
|
const t = c || e.schema, n = t?.language ?? "javascript";
|
|
6
6
|
return r ? /* @__PURE__ */ a("pre", { className: l("text-sm bg-muted p-2 rounded overflow-x-auto border", e.className), children: /* @__PURE__ */ a("code", { children: o || "-" }) }) : /* @__PURE__ */ a(
|
|
7
|
-
|
|
7
|
+
i,
|
|
8
8
|
{
|
|
9
9
|
value: o || "",
|
|
10
10
|
onChange: (d) => s(d.target.value),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { I as c } from "./index-
|
|
2
|
+
import { I as c } from "./index-D2t9pLAg.js";
|
|
3
3
|
import "react";
|
|
4
4
|
function f({ value: e, onChange: l, field: m, readonly: i, errorMessage: n, ...r }) {
|
|
5
5
|
const o = m || r.schema;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as t, jsxs as o } from "react/jsx-runtime";
|
|
2
2
|
import { useRef as I, useState as k, useCallback as g } from "react";
|
|
3
|
-
import { U as P,
|
|
3
|
+
import { U as P, k as U, F as $, B as C, X as E } from "./index-D2t9pLAg.js";
|
|
4
4
|
function M({ value: n, onChange: c, field: w, readonly: j, ...b }) {
|
|
5
5
|
const y = I(null), m = w || b.schema, d = m?.multiple || !1, p = m?.accept ? m.accept.join(",") : void 0, u = m?.maxSize, [N, v] = k(!1), [D, A] = k([]), l = n ? Array.isArray(n) ? n : [n] : [], f = g((e) => {
|
|
6
6
|
if (e.length === 0) return;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as a, jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import v from "react";
|
|
3
|
-
import { M as g, B as s,
|
|
3
|
+
import { M as g, B as s, o as N, L as h, I as p } from "./index-D2t9pLAg.js";
|
|
4
4
|
function F({ value: x, onChange: r, field: y, readonly: o, ...n }) {
|
|
5
5
|
const [d, l] = v.useState(!1), t = x || {}, c = (e, m) => {
|
|
6
6
|
r({
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { i as a } from "./index-D2t9pLAg.js";
|
|
3
3
|
import "react";
|
|
4
4
|
function f({ value: r, field: l, readonly: m, ...s }) {
|
|
5
|
-
const
|
|
6
|
-
return !r || !Array.isArray(r) ? /* @__PURE__ */ e("span", { className: "text-sm text-muted-foreground", children: "-" }) : m ? /* @__PURE__ */ e("div", { className:
|
|
5
|
+
const i = (l || s.schema)?.columns || [];
|
|
6
|
+
return !r || !Array.isArray(r) ? /* @__PURE__ */ e("span", { className: "text-sm text-muted-foreground", children: "-" }) : m ? /* @__PURE__ */ e("div", { className: a("text-sm", s.className), children: /* @__PURE__ */ t("span", { className: "text-foreground", children: [
|
|
7
7
|
r.length,
|
|
8
8
|
" rows"
|
|
9
|
-
] }) }) : /* @__PURE__ */ t("div", { className:
|
|
9
|
+
] }) }) : /* @__PURE__ */ t("div", { className: a("border border-border rounded-lg overflow-hidden", s.className), children: [
|
|
10
10
|
/* @__PURE__ */ e("div", { className: "overflow-auto max-h-60", children: /* @__PURE__ */ t("table", { className: "w-full text-sm", children: [
|
|
11
|
-
/* @__PURE__ */ e("thead", { className: "bg-muted border-b border-border", children: /* @__PURE__ */ e("tr", { children:
|
|
11
|
+
/* @__PURE__ */ e("thead", { className: "bg-muted border-b border-border", children: /* @__PURE__ */ e("tr", { children: i.map((d, n) => /* @__PURE__ */ e(
|
|
12
12
|
"th",
|
|
13
13
|
{
|
|
14
14
|
className: "px-3 py-2 text-left text-xs font-medium text-muted-foreground",
|
|
@@ -16,7 +16,7 @@ function f({ value: r, field: l, readonly: m, ...s }) {
|
|
|
16
16
|
},
|
|
17
17
|
n
|
|
18
18
|
)) }) }),
|
|
19
|
-
/* @__PURE__ */ e("tbody", { className: "divide-y divide-border", children: r.slice(0, 5).map((d, n) => /* @__PURE__ */ e("tr", { className: "hover:bg-muted/50 transition-colors", children:
|
|
19
|
+
/* @__PURE__ */ e("tbody", { className: "divide-y divide-border", children: r.slice(0, 5).map((d, n) => /* @__PURE__ */ e("tr", { className: "hover:bg-muted/50 transition-colors", children: i.map((o, c) => /* @__PURE__ */ e("td", { className: "px-3 py-2 text-foreground", children: d[o.name] != null ? String(d[o.name]) : "-" }, c)) }, n)) })
|
|
20
20
|
] }) }),
|
|
21
21
|
r.length > 5 && /* @__PURE__ */ t("div", { className: "bg-muted px-3 py-2 text-xs text-muted-foreground border-t border-border", children: [
|
|
22
22
|
"Showing 5 of ",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as a, jsxs as l } from "react/jsx-runtime";
|
|
2
2
|
import { useRef as b } from "react";
|
|
3
|
-
import { B as g, X as j,
|
|
3
|
+
import { B as g, X as j, k as z } from "./index-D2t9pLAg.js";
|
|
4
4
|
function R({ value: s, onChange: n, field: u, readonly: h, ...d }) {
|
|
5
5
|
const p = b(null), m = u || d.schema, o = m?.multiple || !1, f = m?.accept ? m.accept.join(",") : "image/*";
|
|
6
6
|
if (h) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { I as u } from "./index-
|
|
2
|
+
import { I as u } from "./index-D2t9pLAg.js";
|
|
3
3
|
import "react";
|
|
4
4
|
function x({ value: t, onChange: i, field: d, readonly: n, ...a }) {
|
|
5
5
|
const m = d || a.schema, s = t && typeof t == "object" ? `${t.latitude || 0}, ${t.longitude || 0}` : "";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as t, jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import { B as d,
|
|
2
|
+
import { B as d, h as c, i as o, j as f, X as g, P as v } from "./index-D2t9pLAg.js";
|
|
3
3
|
import "react";
|
|
4
|
-
function
|
|
4
|
+
function k({
|
|
5
5
|
value: m,
|
|
6
6
|
onChange: n,
|
|
7
7
|
field: h,
|
|
@@ -104,5 +104,5 @@ function j({
|
|
|
104
104
|
] });
|
|
105
105
|
}
|
|
106
106
|
export {
|
|
107
|
-
|
|
107
|
+
k as MasterDetailField
|
|
108
108
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as s, jsxs as x } from "react/jsx-runtime";
|
|
2
2
|
import { useState as g, useEffect as S } from "react";
|
|
3
|
-
import {
|
|
4
|
-
function j({ value: r, onChange:
|
|
3
|
+
import { i as m, T as y } from "./index-D2t9pLAg.js";
|
|
4
|
+
function j({ value: r, onChange: c, field: u, readonly: o, ...t }) {
|
|
5
5
|
const N = u || t.schema, h = () => r == null ? "" : JSON.stringify(r, null, 2), [e, n] = g(h), [i, d] = g(null);
|
|
6
6
|
return S(() => {
|
|
7
7
|
try {
|
|
@@ -14,7 +14,7 @@ function j({ value: r, onChange: o, field: u, readonly: c, ...t }) {
|
|
|
14
14
|
} catch {
|
|
15
15
|
n(JSON.stringify(r, null, 2));
|
|
16
16
|
}
|
|
17
|
-
}, [r, e]),
|
|
17
|
+
}, [r, e]), o ? r ? /* @__PURE__ */ s("pre", { className: m("text-xs bg-gray-50 p-2 rounded border border-gray-200 overflow-auto max-h-40", t.className), children: JSON.stringify(r, null, 2) }) : /* @__PURE__ */ s("span", { className: "text-sm", children: "-" }) : /* @__PURE__ */ x("div", { className: "space-y-1", children: [
|
|
18
18
|
/* @__PURE__ */ s(
|
|
19
19
|
y,
|
|
20
20
|
{
|
|
@@ -22,12 +22,12 @@ function j({ value: r, onChange: o, field: u, readonly: c, ...t }) {
|
|
|
22
22
|
onChange: (l) => {
|
|
23
23
|
const a = l.target.value;
|
|
24
24
|
if (n(a), d(null), !a.trim()) {
|
|
25
|
-
|
|
25
|
+
c(null);
|
|
26
26
|
return;
|
|
27
27
|
}
|
|
28
28
|
try {
|
|
29
29
|
const f = JSON.parse(a);
|
|
30
|
-
|
|
30
|
+
c(f);
|
|
31
31
|
} catch {
|
|
32
32
|
d("Invalid JSON");
|
|
33
33
|
}
|
|
@@ -35,7 +35,7 @@ function j({ value: r, onChange: o, field: u, readonly: c, ...t }) {
|
|
|
35
35
|
placeholder: N?.placeholder || `{
|
|
36
36
|
"key": "value"
|
|
37
37
|
}`,
|
|
38
|
-
disabled:
|
|
38
|
+
disabled: o || t.disabled,
|
|
39
39
|
className: m("font-mono text-xs", i ? "border-red-500 focus-visible:ring-red-500" : "", t.className),
|
|
40
40
|
rows: 6
|
|
41
41
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as s, jsxs as m } from "react/jsx-runtime";
|
|
2
2
|
import { useState as h } from "react";
|
|
3
|
-
import { I as u, B as f, E as g, g as x } from "./index-
|
|
3
|
+
import { I as u, B as f, E as g, g as x } from "./index-D2t9pLAg.js";
|
|
4
4
|
function N({ value: o, onChange: l, field: n, readonly: a, className: i, ...t }) {
|
|
5
5
|
const [e, c] = h(!1), p = n || t.schema;
|
|
6
6
|
if (a)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as i, jsxs as d } from "react/jsx-runtime";
|
|
2
|
-
import { I as g, f as y } from "./index-
|
|
2
|
+
import { I as g, f as y } from "./index-D2t9pLAg.js";
|
|
3
3
|
import "react";
|
|
4
4
|
function S({ value: e, onChange: s, field: o, readonly: n, errorMessage: u, className: p, ...a }) {
|
|
5
5
|
const m = o || a.schema, r = m?.precision ?? 2;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { I as d } from "./index-
|
|
2
|
+
import { I as d } from "./index-D2t9pLAg.js";
|
|
3
3
|
import "react";
|
|
4
4
|
function f({ value: e, onChange: o, field: a, readonly: r, errorMessage: l, ...n }) {
|
|
5
5
|
const s = a || n.schema;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as s, jsx as t, Fragment as x } from "react/jsx-runtime";
|
|
2
2
|
import g from "react";
|
|
3
|
-
import { B as n, Q as d, I as u,
|
|
3
|
+
import { B as n, Q as d, I as u, q as N } from "./index-D2t9pLAg.js";
|
|
4
4
|
function b({ value: e, onChange: l, field: m, readonly: i, ...r }) {
|
|
5
5
|
const [a, o] = g.useState(!1), h = m || r.schema, p = (c) => `https://api.qrserver.com/v1/create-qr-code/?size=200x200&data=${encodeURIComponent(c)}`, f = () => {
|
|
6
6
|
e && navigator.clipboard.writeText(e);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs as o, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import y from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { m as c, i as m } from "./index-D2t9pLAg.js";
|
|
4
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, [
|
|
5
|
+
const t = (x || a.schema)?.max ?? 5, l = d ?? 0, [i, u] = y.useState(null), g = i !== null ? i : l;
|
|
6
6
|
return n ? /* @__PURE__ */ o("div", { className: m("flex items-center gap-1", s), children: [
|
|
7
7
|
Array.from({ length: t }, (h, e) => /* @__PURE__ */ r(
|
|
8
8
|
c,
|
|
@@ -22,8 +22,8 @@ function b({ value: d, onChange: f, field: x, readonly: n, className: s, ...a })
|
|
|
22
22
|
{
|
|
23
23
|
type: "button",
|
|
24
24
|
onClick: () => f(e + 1),
|
|
25
|
-
onMouseEnter: () =>
|
|
26
|
-
onMouseLeave: () =>
|
|
25
|
+
onMouseEnter: () => u(e + 1),
|
|
26
|
+
onMouseLeave: () => u(null),
|
|
27
27
|
className: "focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 rounded",
|
|
28
28
|
disabled: n || a.disabled,
|
|
29
29
|
children: /* @__PURE__ */ r(
|
|
@@ -1,5 +1,5 @@
|
|
|
1
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-
|
|
2
|
+
import { a as m, b as h, c as u, d as S, e as f } from "./index-D2t9pLAg.js";
|
|
3
3
|
import "react";
|
|
4
4
|
function x({ value: t, onChange: s, field: o, readonly: c, ...e }) {
|
|
5
5
|
const i = o || e.schema, n = i?.options || [];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as o, jsxs as f } from "react/jsx-runtime";
|
|
2
2
|
import v, { useRef as b, useEffect as S } from "react";
|
|
3
|
-
import { B as C,
|
|
3
|
+
import { B as C, p as R } from "./index-D2t9pLAg.js";
|
|
4
4
|
function E({ value: c, onChange: g, readonly: i }) {
|
|
5
5
|
const r = b(null), [h, m] = v.useState(!1), [p, a] = v.useState(!c);
|
|
6
6
|
S(() => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as m, jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import { f as x } from "./index-
|
|
2
|
+
import { f as x } from "./index-D2t9pLAg.js";
|
|
3
3
|
import "react";
|
|
4
4
|
function u({ value: s, onChange: l, field: r, readonly: n, ...t }) {
|
|
5
5
|
const i = r || t.schema, e = i?.min ?? 0, c = i?.max ?? 100, d = i?.step ?? 1;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { T as n, I as c } from "./index-
|
|
2
|
+
import { T as n, I as c } from "./index-D2t9pLAg.js";
|
|
3
3
|
import "react";
|
|
4
4
|
function x({ value: a, onChange: d, field: i, readonly: r, ...l }) {
|
|
5
5
|
const e = i || l.schema;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { I as c } from "./index-
|
|
2
|
+
import { I as c } from "./index-D2t9pLAg.js";
|
|
3
3
|
import "react";
|
|
4
4
|
function x({ value: t, onChange: a, field: l, readonly: r, errorMessage: o, ...s }) {
|
|
5
5
|
const p = l || s.schema;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import { A as m,
|
|
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
3
|
import "react";
|
|
4
4
|
function j({ value: s, onChange: d, field: p, readonly: x, ...h }) {
|
|
5
5
|
const g = (p || h.schema)?.multiple || !1;
|
|
6
6
|
if (x) {
|
|
7
7
|
if (!s) return /* @__PURE__ */ e("span", { className: "text-sm", children: "-" });
|
|
8
8
|
const t = Array.isArray(s) ? s : [s];
|
|
9
|
-
return /* @__PURE__ */
|
|
10
|
-
t.slice(0, 3).map((r,
|
|
9
|
+
return /* @__PURE__ */ i("div", { className: "flex -space-x-2", children: [
|
|
10
|
+
t.slice(0, 3).map((r, l) => {
|
|
11
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 }) },
|
|
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
13
|
}),
|
|
14
|
-
t.length > 3 && /* @__PURE__ */ e(m, { className: "size-8 border-2 border-white", children: /* @__PURE__ */
|
|
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
15
|
"+",
|
|
16
16
|
t.length - 3
|
|
17
17
|
] }) })
|
|
@@ -19,17 +19,17 @@ function j({ value: s, onChange: d, field: p, readonly: x, ...h }) {
|
|
|
19
19
|
}
|
|
20
20
|
const n = s ? Array.isArray(s) ? s : [s] : [], u = (t) => {
|
|
21
21
|
if (g) {
|
|
22
|
-
const r = n.filter((
|
|
22
|
+
const r = n.filter((l, a) => a !== t);
|
|
23
23
|
d(r.length > 0 ? r : null);
|
|
24
24
|
} else
|
|
25
25
|
d(null);
|
|
26
26
|
};
|
|
27
|
-
return /* @__PURE__ */
|
|
27
|
+
return /* @__PURE__ */ i("div", { className: h.className, children: [
|
|
28
28
|
n.length > 0 && /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-2 mb-2", children: n.map((t, r) => {
|
|
29
|
-
const
|
|
30
|
-
return /* @__PURE__ */
|
|
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
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:
|
|
32
|
+
/* @__PURE__ */ e("span", { className: "text-sm", children: l }),
|
|
33
33
|
/* @__PURE__ */ e(
|
|
34
34
|
"button",
|
|
35
35
|
{
|