@object-ui/plugin-aggrid 3.0.2 → 3.1.0

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.
Files changed (28) hide show
  1. package/.turbo/turbo-build.log +25 -25
  2. package/CHANGELOG.md +11 -0
  3. package/dist/{AddressField-CUHm7scl.js → AddressField-Ca6aSbFW.js} +1 -1
  4. package/dist/{AgGridImpl-DVyHqLJi.js → AgGridImpl-Brsm5CmH.js} +1 -1
  5. package/dist/{AutoNumberField-twP63aM8.js → AutoNumberField-DrGjmfKt.js} +1 -1
  6. package/dist/FileField-CMfNMmvO.js +144 -0
  7. package/dist/{FormulaField-CsRwvjVZ.js → FormulaField-Cpf8sXXM.js} +1 -1
  8. package/dist/{GeolocationField-DQ_J9TGl.js → GeolocationField-D-EW8C92.js} +2 -2
  9. package/dist/GridField--t291OLT.js +29 -0
  10. package/dist/{LocationField-C4zcjds3.js → LocationField-C5pdO0VY.js} +1 -1
  11. package/dist/{MasterDetailField-DybIeqDQ.js → MasterDetailField--lQGMhKf.js} +2 -2
  12. package/dist/{ObjectAgGridImpl-CotBxBL9.js → ObjectAgGridImpl-Cy851etj.js} +4787 -4707
  13. package/dist/{ObjectField-CVXoKqAF.js → ObjectField-CwbQIROw.js} +1 -1
  14. package/dist/{QRCodeField-lmARTFQy.js → QRCodeField-BksI6bwG.js} +2 -2
  15. package/dist/{RichTextField-5ce8qKzb.js → RichTextField-DSkfYMMR.js} +1 -1
  16. package/dist/{SignatureField-VES1Umvd.js → SignatureField-sBd3qsYZ.js} +2 -2
  17. package/dist/{SummaryField-CQsFucuH.js → SummaryField-fM-E9oD5.js} +1 -1
  18. package/dist/{UserField-Dxq9ZQ9l.js → UserField-lwxkNoSY.js} +2 -2
  19. package/dist/{VectorField-BJoHEqgv.js → VectorField-B5I-CcgP.js} +1 -1
  20. package/dist/{index-DSI77JcG.js → index-Dipgpv5R.js} +1 -1
  21. package/dist/index.css +1 -1
  22. package/dist/index.js +1 -1
  23. package/dist/index.umd.cjs +86 -81
  24. package/package.json +10 -10
  25. package/src/AgGridImpl.tsx +4 -4
  26. package/src/ObjectAgGridImpl.tsx +11 -3
  27. package/dist/FileField-Cxql0zFQ.js +0 -101
  28. package/dist/GridField-BrF4x9mD.js +0 -29
@@ -1,10 +1,10 @@
1
1
 
2
- > @object-ui/plugin-aggrid@3.0.2 build /home/runner/work/objectui/objectui/packages/plugin-aggrid
2
+ > @object-ui/plugin-aggrid@3.1.0 build /home/runner/work/objectui/objectui/packages/plugin-aggrid
3
3
  > vite build
4
4
 
5
5
  vite v7.3.1 building client environment for production...
6
6
  transforming...
7
- ✓ 1749 modules transformed.
7
+ ✓ 1783 modules transformed.
8
8
  rendering chunks...
9
9
  [plugin vite:reporter]
10
10
  (!) /home/runner/work/objectui/objectui/packages/fields/src/widgets/TextField.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.
@@ -72,28 +72,28 @@ rendering chunks...
72
72
  
73
73
  [vite:dts] Start generate declaration files...
74
74
  computing gzip size...
75
- [vite:dts] Declaration files built in 14334ms.
75
+ [vite:dts] Declaration files built in 20710ms.
76
76
  
77
- dist/index.css 318.68 kB │ gzip: 61.72 kB
77
+ dist/index.css 370.94 kB │ gzip: 72.89 kB
78
78
  dist/index.js  0.22 kB │ gzip: 0.16 kB
79
- dist/AutoNumberField-twP63aM8.js  0.29 kB │ gzip: 0.25 kB
80
- dist/SummaryField-CQsFucuH.js  0.49 kB │ gzip: 0.36 kB
81
- dist/FormulaField-CsRwvjVZ.js  0.53 kB │ gzip: 0.37 kB
82
- dist/VectorField-BJoHEqgv.js  0.81 kB │ gzip: 0.43 kB
83
- dist/LocationField-C4zcjds3.js  0.95 kB │ gzip: 0.53 kB
84
- dist/RichTextField-5ce8qKzb.js  1.19 kB │ gzip: 0.58 kB
85
- dist/ObjectField-CVXoKqAF.js  1.65 kB │ gzip: 0.76 kB
86
- dist/GridField-BrF4x9mD.js  1.75 kB │ gzip: 0.67 kB
87
- dist/UserField-Dxq9ZQ9l.js  2.50 kB │ gzip: 0.93 kB
88
- dist/AddressField-CUHm7scl.js  3.12 kB │ gzip: 0.75 kB
89
- dist/SignatureField-VES1Umvd.js  3.41 kB │ gzip: 1.29 kB
90
- dist/QRCodeField-lmARTFQy.js  3.46 kB │ gzip: 1.24 kB
91
- dist/FileField-Cxql0zFQ.js  3.59 kB │ gzip: 1.35 kB
92
- dist/MasterDetailField-DybIeqDQ.js  3.96 kB │ gzip: 1.17 kB
93
- dist/GeolocationField-DQ_J9TGl.js  4.57 kB │ gzip: 1.51 kB
94
- dist/AgGridImpl-DVyHqLJi.js  7.21 kB │ gzip: 2.37 kB
95
- dist/index-DSI77JcG.js  20.43 kB │ gzip: 5.11 kB
96
- dist/ObjectAgGridImpl-CotBxBL9.js 941.84 kB │ gzip: 207.85 kB
97
- dist/index.css 318.68 kB │ gzip: 61.72 kB
98
- dist/index.umd.cjs 612.28 kB │ gzip: 182.93 kB
99
- ✓ built in 24.05s
79
+ dist/AutoNumberField-DrGjmfKt.js  0.29 kB │ gzip: 0.25 kB
80
+ dist/SummaryField-fM-E9oD5.js  0.49 kB │ gzip: 0.35 kB
81
+ dist/FormulaField-Cpf8sXXM.js  0.53 kB │ gzip: 0.37 kB
82
+ dist/VectorField-B5I-CcgP.js  0.81 kB │ gzip: 0.43 kB
83
+ dist/LocationField-C5pdO0VY.js  0.95 kB │ gzip: 0.53 kB
84
+ dist/RichTextField-DSkfYMMR.js  1.19 kB │ gzip: 0.58 kB
85
+ dist/ObjectField-CwbQIROw.js  1.65 kB │ gzip: 0.76 kB
86
+ dist/GridField--t291OLT.js  1.78 kB │ gzip: 0.67 kB
87
+ dist/UserField-lwxkNoSY.js  2.50 kB │ gzip: 0.93 kB
88
+ dist/AddressField-Ca6aSbFW.js  3.12 kB │ gzip: 0.75 kB
89
+ dist/SignatureField-sBd3qsYZ.js  3.41 kB │ gzip: 1.29 kB
90
+ dist/QRCodeField-BksI6bwG.js  3.46 kB │ gzip: 1.24 kB
91
+ dist/MasterDetailField--lQGMhKf.js  3.96 kB │ gzip: 1.17 kB
92
+ dist/GeolocationField-D-EW8C92.js  4.57 kB │ gzip: 1.51 kB
93
+ dist/FileField-CMfNMmvO.js  6.05 kB │ gzip: 2.12 kB
94
+ dist/AgGridImpl-Brsm5CmH.js  7.21 kB │ gzip: 2.37 kB
95
+ dist/index-Dipgpv5R.js  20.43 kB │ gzip: 5.11 kB
96
+ dist/ObjectAgGridImpl-Cy851etj.js 944.88 kB │ gzip: 208.56 kB
97
+ dist/index.css 370.94 kB │ gzip: 72.89 kB
98
+ dist/index.umd.cjs 616.38 kB │ gzip: 184.17 kB
99
+ ✓ built in 34.79s
package/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # @object-ui/plugin-aggrid
2
2
 
3
+ ## 3.0.3
4
+
5
+ ### Patch Changes
6
+
7
+ - @object-ui/types@3.0.3
8
+ - @object-ui/core@3.0.3
9
+ - @object-ui/react@3.0.3
10
+ - @object-ui/components@3.0.3
11
+ - @object-ui/fields@3.0.3
12
+ - @object-ui/data-objectstack@3.0.3
13
+
3
14
  ## 3.0.2
4
15
 
5
16
  ### Patch Changes
@@ -1,4 +1,4 @@
1
- import { j as e } from "./index-DSI77JcG.js";
1
+ import { j as e } from "./index-Dipgpv5R.js";
2
2
  import { Label as d, Input as r } from "@object-ui/components";
3
3
  function u({ value: n, onChange: o, field: h, readonly: a, ...i }) {
4
4
  const s = n || {}, l = (t, c) => {
@@ -1,4 +1,4 @@
1
- import { j as f } from "./index-DSI77JcG.js";
1
+ import { j as f } from "./index-Dipgpv5R.js";
2
2
  import { useRef as Z, useMemo as C, useCallback as d } from "react";
3
3
  import { AgGridReact as _ } from "ag-grid-react";
4
4
  function G({
@@ -1,4 +1,4 @@
1
- import { j as n } from "./index-DSI77JcG.js";
1
+ import { j as n } from "./index-Dipgpv5R.js";
2
2
  function a({ value: t, field: o, ...s }) {
3
3
  const e = t != null ? String(t) : "-";
4
4
  return /* @__PURE__ */ n.jsx("span", { className: `text-sm font-mono text-gray-700 ${s.className || ""}`, children: e });
@@ -0,0 +1,144 @@
1
+ import { j as s } from "./index-Dipgpv5R.js";
2
+ import { useRef as R, useState as D, useCallback as h } from "react";
3
+ import { Button as B } from "@object-ui/components";
4
+ import { c as E, U as M, I as P, X as U } from "./ObjectAgGridImpl-Cy851etj.js";
5
+ const $ = [
6
+ [
7
+ "path",
8
+ {
9
+ d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",
10
+ key: "1oefj6"
11
+ }
12
+ ],
13
+ ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5", key: "wfsgrz" }]
14
+ ], C = E("file", $);
15
+ function V({ value: n, onChange: i, field: k, readonly: F, ...N }) {
16
+ const g = R(null), l = k || N.schema, m = l?.multiple || !1, d = l?.accept ? l.accept.join(",") : void 0, p = l?.maxSize, [j, y] = D(!1), [v, w] = D([]), c = n ? Array.isArray(n) ? n : [n] : [], x = h((e) => {
17
+ if (e.length === 0) return;
18
+ const t = [], a = e.filter((r) => {
19
+ if (p && r.size > p) {
20
+ const u = (p / 1048576).toFixed(1);
21
+ return t.push(`"${r.name}" exceeds max size (${u} MB)`), !1;
22
+ }
23
+ return !0;
24
+ });
25
+ if (w(t), a.length === 0) return;
26
+ const o = a.map((r) => ({
27
+ name: r.name,
28
+ original_name: r.name,
29
+ size: r.size,
30
+ mime_type: r.type,
31
+ // In a real implementation, this would upload the file and return a URL
32
+ url: URL.createObjectURL(r)
33
+ }));
34
+ i(m ? [...c, ...o] : o[0]);
35
+ }, [c, m, i, p]), _ = h((e) => {
36
+ e.preventDefault(), e.stopPropagation(), y(!0);
37
+ }, []), A = h((e) => {
38
+ e.preventDefault(), e.stopPropagation(), y(!1);
39
+ }, []), L = h((e) => {
40
+ e.preventDefault(), e.stopPropagation(), y(!1);
41
+ const t = Array.from(e.dataTransfer.files);
42
+ if (d) {
43
+ const a = d.split(",").map((r) => r.trim().toLowerCase()), o = t.filter((r) => {
44
+ const u = r.name.split("."), z = u.length > 1 ? "." + u.pop()?.toLowerCase() : "";
45
+ return a.some(
46
+ (f) => f === r.type || z && f === z || f.endsWith("/*") && r.type.startsWith(f.replace("/*", "/"))
47
+ );
48
+ });
49
+ x(o);
50
+ } else
51
+ x(t);
52
+ }, [d, x]);
53
+ if (F) {
54
+ if (!n) return /* @__PURE__ */ s.jsx("span", { className: "text-sm", children: "-" });
55
+ const e = Array.isArray(n) ? n : [n];
56
+ return /* @__PURE__ */ s.jsx("div", { className: "flex flex-wrap gap-2", children: e.map((t, a) => /* @__PURE__ */ s.jsx("span", { className: "text-sm truncate max-w-xs", children: t.name || t.original_name || "File" }, a)) });
57
+ }
58
+ const I = (e) => {
59
+ x(Array.from(e.target.files || []));
60
+ }, O = (e) => {
61
+ if (m) {
62
+ const t = c.filter((a, o) => o !== e);
63
+ i(t.length > 0 ? t : null);
64
+ } else
65
+ i(null);
66
+ }, b = (e) => (e.mime_type || "").startsWith("image/");
67
+ return /* @__PURE__ */ s.jsxs("div", { className: N.className, children: [
68
+ /* @__PURE__ */ s.jsx(
69
+ "input",
70
+ {
71
+ ref: g,
72
+ type: "file",
73
+ multiple: m,
74
+ accept: d,
75
+ onChange: I,
76
+ className: "hidden"
77
+ }
78
+ ),
79
+ /* @__PURE__ */ s.jsxs("div", { className: "space-y-2", children: [
80
+ /* @__PURE__ */ s.jsxs(
81
+ "div",
82
+ {
83
+ onDragOver: _,
84
+ onDragLeave: A,
85
+ onDrop: L,
86
+ onClick: () => g.current?.click(),
87
+ className: `
88
+ flex flex-col items-center justify-center gap-2 p-6
89
+ border-2 border-dashed rounded-lg cursor-pointer
90
+ transition-colors duration-200
91
+ ${j ? "border-primary bg-primary/5 text-primary" : "border-muted-foreground/25 hover:border-primary/50 text-muted-foreground hover:text-foreground"}
92
+ `,
93
+ role: "button",
94
+ tabIndex: 0,
95
+ onKeyDown: (e) => {
96
+ (e.key === "Enter" || e.key === " ") && (e.preventDefault(), g.current?.click());
97
+ },
98
+ children: [
99
+ /* @__PURE__ */ s.jsx(M, { className: `size-8 ${j ? "text-primary" : "text-muted-foreground"}` }),
100
+ /* @__PURE__ */ s.jsxs("div", { className: "text-center", children: [
101
+ /* @__PURE__ */ s.jsx("p", { className: "text-sm font-medium", children: j ? "Drop files here" : "Drag & drop files here" }),
102
+ /* @__PURE__ */ s.jsx("p", { className: "text-xs text-muted-foreground mt-1", children: "or click to browse" })
103
+ ] })
104
+ ]
105
+ }
106
+ ),
107
+ v.length > 0 && /* @__PURE__ */ s.jsx("div", { className: "space-y-0.5", children: v.map((e, t) => /* @__PURE__ */ s.jsx("p", { className: "text-xs text-destructive", children: e }, t)) }),
108
+ c.length > 0 && /* @__PURE__ */ s.jsx("div", { className: "space-y-1", children: c.map((e, t) => /* @__PURE__ */ s.jsxs(
109
+ "div",
110
+ {
111
+ className: "flex items-center justify-between gap-2 p-2 bg-muted/50 rounded-md border",
112
+ children: [
113
+ /* @__PURE__ */ s.jsxs("div", { className: "flex items-center gap-2 flex-1 min-w-0", children: [
114
+ b(e) && e.url ? /* @__PURE__ */ s.jsx("img", { src: e.url, alt: e.name, className: "size-8 object-cover rounded flex-shrink-0" }) : b(e) ? /* @__PURE__ */ s.jsx(P, { className: "size-4 text-muted-foreground flex-shrink-0" }) : /* @__PURE__ */ s.jsx(C, { className: "size-4 text-muted-foreground flex-shrink-0" }),
115
+ /* @__PURE__ */ s.jsx("span", { className: "text-sm truncate", children: e.name || e.original_name || "File" }),
116
+ e.size && /* @__PURE__ */ s.jsxs("span", { className: "text-xs text-muted-foreground", children: [
117
+ "(",
118
+ (e.size / 1024).toFixed(1),
119
+ " KB)"
120
+ ] })
121
+ ] }),
122
+ /* @__PURE__ */ s.jsx(
123
+ B,
124
+ {
125
+ type: "button",
126
+ variant: "ghost",
127
+ size: "sm",
128
+ onClick: (a) => {
129
+ a.stopPropagation(), O(t);
130
+ },
131
+ className: "h-6 w-6 p-0",
132
+ children: /* @__PURE__ */ s.jsx(U, { className: "size-3" })
133
+ }
134
+ )
135
+ ]
136
+ },
137
+ t
138
+ )) })
139
+ ] })
140
+ ] });
141
+ }
142
+ export {
143
+ V as FileField
144
+ };
@@ -1,4 +1,4 @@
1
- import { j as s } from "./index-DSI77JcG.js";
1
+ import { j as s } from "./index-Dipgpv5R.js";
2
2
  function m({ value: e, field: o, ...r }) {
3
3
  const n = (o || r.schema)?.return_type || "text";
4
4
  let t = "-";
@@ -1,7 +1,7 @@
1
- import { j as t } from "./index-DSI77JcG.js";
1
+ import { j as t } from "./index-Dipgpv5R.js";
2
2
  import f from "react";
3
3
  import { Button as n, Label as m, Input as x } from "@object-ui/components";
4
- import { c as h } from "./ObjectAgGridImpl-CotBxBL9.js";
4
+ import { c as h } from "./ObjectAgGridImpl-Cy851etj.js";
5
5
  const b = [
6
6
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
7
7
  ["line", { x1: "22", x2: "18", y1: "12", y2: "12", key: "l9bcsi" }],
@@ -0,0 +1,29 @@
1
+ import { j as e } from "./index-Dipgpv5R.js";
2
+ import { cn as a } from "@object-ui/components";
3
+ function u({ value: r, field: i, readonly: l, ...d }) {
4
+ const n = (i || d.schema)?.columns || [];
5
+ return !r || !Array.isArray(r) ? /* @__PURE__ */ e.jsx("span", { className: "text-sm text-muted-foreground", children: "-" }) : l ? /* @__PURE__ */ e.jsx("div", { className: a("text-sm", d.className), children: /* @__PURE__ */ e.jsxs("span", { className: "text-foreground", children: [
6
+ r.length,
7
+ " rows"
8
+ ] }) }) : /* @__PURE__ */ e.jsxs("div", { className: a("border border-border rounded-lg overflow-hidden", d.className), children: [
9
+ /* @__PURE__ */ e.jsx("div", { className: "overflow-auto max-h-60", children: /* @__PURE__ */ e.jsxs("table", { className: "w-full text-sm", children: [
10
+ /* @__PURE__ */ e.jsx("thead", { className: "bg-muted border-b border-border", children: /* @__PURE__ */ e.jsx("tr", { children: n.map((s, t) => /* @__PURE__ */ e.jsx(
11
+ "th",
12
+ {
13
+ className: "px-3 py-2 text-left text-xs font-medium text-muted-foreground",
14
+ children: s.label || s.name
15
+ },
16
+ t
17
+ )) }) }),
18
+ /* @__PURE__ */ e.jsx("tbody", { className: "divide-y divide-border", children: r.slice(0, 5).map((s, t) => /* @__PURE__ */ e.jsx("tr", { className: "hover:bg-muted/50 transition-colors", children: n.map((o, m) => /* @__PURE__ */ e.jsx("td", { className: "px-3 py-2 text-foreground", children: s[o.name] != null ? String(s[o.name]) : "-" }, m)) }, t)) })
19
+ ] }) }),
20
+ r.length > 5 && /* @__PURE__ */ e.jsxs("div", { className: "bg-muted px-3 py-2 text-xs text-muted-foreground border-t border-border", children: [
21
+ "Showing 5 of ",
22
+ r.length,
23
+ " rows"
24
+ ] })
25
+ ] });
26
+ }
27
+ export {
28
+ u as GridField
29
+ };
@@ -1,4 +1,4 @@
1
- import { j as r } from "./index-DSI77JcG.js";
1
+ import { j as r } from "./index-Dipgpv5R.js";
2
2
  import { Input as f } from "@object-ui/components";
3
3
  function x({ value: t, onChange: l, field: d, readonly: i, ...a }) {
4
4
  const m = d || a.schema, n = t && typeof t == "object" ? `${t.latitude || 0}, ${t.longitude || 0}` : "";
@@ -1,6 +1,6 @@
1
- import { j as e } from "./index-DSI77JcG.js";
1
+ import { j as e } from "./index-Dipgpv5R.js";
2
2
  import { Button as a, cn as c, Badge as N } from "@object-ui/components";
3
- import { c as o, X as f } from "./ObjectAgGridImpl-CotBxBL9.js";
3
+ import { c as o, X as f } from "./ObjectAgGridImpl-Cy851etj.js";
4
4
  const g = [
5
5
  ["path", { d: "M15 3h6v6", key: "1q9fwt" }],
6
6
  ["path", { d: "M10 14 21 3", key: "gplh6r" }],