@object-ui/plugin-aggrid 0.5.0 → 2.0.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 (36) hide show
  1. package/.turbo/turbo-build.log +90 -12
  2. package/CHANGELOG.md +16 -0
  3. package/QUICKSTART.md +1 -1
  4. package/dist/AddressField-Bntpynvd.js +95 -0
  5. package/dist/AgGridImpl-3Mmf2qrR.js +229 -0
  6. package/dist/AutoNumberField-C1kBJaxh.js +8 -0
  7. package/dist/FileField-BDwbJvor.js +101 -0
  8. package/dist/FormulaField-BXNiyGoh.js +9 -0
  9. package/dist/GeolocationField-Df3yYcM9.js +141 -0
  10. package/dist/GridField-CcjQp4WM.js +29 -0
  11. package/dist/LocationField-BIfN5QIq.js +33 -0
  12. package/dist/MasterDetailField-CAEmxbIT.js +117 -0
  13. package/dist/ObjectAgGridImpl-EjifM4aY.js +28727 -0
  14. package/dist/ObjectField-BpkQpIF-.js +51 -0
  15. package/dist/QRCodeField-VCBewTDG.js +96 -0
  16. package/dist/RichTextField-CyQwSi2C.js +37 -0
  17. package/dist/SignatureField-Cr4tsEbj.js +96 -0
  18. package/dist/SummaryField-CnEJ_GZI.js +9 -0
  19. package/dist/UserField-DJjaVyrV.js +49 -0
  20. package/dist/VectorField-cPYmcKnV.js +25 -0
  21. package/dist/{index-CLKYMco3.js → index-B87wd1E0.js} +57 -33
  22. package/dist/index.js +1 -1
  23. package/dist/index.umd.cjs +225 -5
  24. package/dist/src/AgGridImpl.d.ts +5 -2
  25. package/dist/src/field-renderers.d.ts +67 -0
  26. package/dist/src/index.d.ts +5 -2
  27. package/dist/src/types.d.ts +48 -1
  28. package/package.json +8 -7
  29. package/src/AgGridImpl.tsx +95 -10
  30. package/src/ObjectAgGridImpl.tsx +67 -169
  31. package/src/field-renderers.test.tsx +383 -0
  32. package/src/field-renderers.tsx +224 -0
  33. package/src/index.tsx +30 -3
  34. package/src/types.ts +57 -1
  35. package/dist/AgGridImpl-BQ6tBvrq.js +0 -175
  36. package/dist/ObjectAgGridImpl-CGFeGvOH.js +0 -372
@@ -1,21 +1,99 @@
1
1
 
2
- > @object-ui/plugin-aggrid@0.5.0 build /home/runner/work/objectui/objectui/packages/plugin-aggrid
2
+ > @object-ui/plugin-aggrid@2.0.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
- ✓ 18 modules transformed.
7
+ ✓ 1749 modules transformed.
8
8
  rendering chunks...
9
+ [plugin vite:reporter]
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.
11
+ 
12
+ [plugin vite:reporter]
13
+ (!) /home/runner/work/objectui/objectui/packages/fields/src/widgets/NumberField.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.
14
+ 
15
+ [plugin vite:reporter]
16
+ (!) /home/runner/work/objectui/objectui/packages/fields/src/widgets/BooleanField.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.
17
+ 
18
+ [plugin vite:reporter]
19
+ (!) /home/runner/work/objectui/objectui/packages/fields/src/widgets/SelectField.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.
20
+ 
21
+ [plugin vite:reporter]
22
+ (!) /home/runner/work/objectui/objectui/packages/fields/src/widgets/DateField.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.
23
+ 
24
+ [plugin vite:reporter]
25
+ (!) /home/runner/work/objectui/objectui/packages/fields/src/widgets/EmailField.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.
26
+ 
27
+ [plugin vite:reporter]
28
+ (!) /home/runner/work/objectui/objectui/packages/fields/src/widgets/PhoneField.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.
29
+ 
30
+ [plugin vite:reporter]
31
+ (!) /home/runner/work/objectui/objectui/packages/fields/src/widgets/UrlField.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.
32
+ 
33
+ [plugin vite:reporter]
34
+ (!) /home/runner/work/objectui/objectui/packages/fields/src/widgets/CurrencyField.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.
35
+ 
36
+ [plugin vite:reporter]
37
+ (!) /home/runner/work/objectui/objectui/packages/fields/src/widgets/TextAreaField.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.
38
+ 
39
+ [plugin vite:reporter]
40
+ (!) /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.
41
+ 
42
+ [plugin vite:reporter]
43
+ (!) /home/runner/work/objectui/objectui/packages/fields/src/widgets/DateTimeField.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.
44
+ 
45
+ [plugin vite:reporter]
46
+ (!) /home/runner/work/objectui/objectui/packages/fields/src/widgets/TimeField.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.
47
+ 
48
+ [plugin vite:reporter]
49
+ (!) /home/runner/work/objectui/objectui/packages/fields/src/widgets/PercentField.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.
50
+ 
51
+ [plugin vite:reporter]
52
+ (!) /home/runner/work/objectui/objectui/packages/fields/src/widgets/PasswordField.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.
53
+ 
54
+ [plugin vite:reporter]
55
+ (!) /home/runner/work/objectui/objectui/packages/fields/src/widgets/ImageField.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.
56
+ 
57
+ [plugin vite:reporter]
58
+ (!) /home/runner/work/objectui/objectui/packages/fields/src/widgets/ColorField.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.
59
+ 
60
+ [plugin vite:reporter]
61
+ (!) /home/runner/work/objectui/objectui/packages/fields/src/widgets/SliderField.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.
62
+ 
63
+ [plugin vite:reporter]
64
+ (!) /home/runner/work/objectui/objectui/packages/fields/src/widgets/RatingField.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.
65
+ 
66
+ [plugin vite:reporter]
67
+ (!) /home/runner/work/objectui/objectui/packages/fields/src/widgets/CodeField.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.
68
+ 
69
+ [plugin vite:reporter]
70
+ (!) /home/runner/work/objectui/objectui/packages/fields/src/widgets/AvatarField.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.
71
+ 
9
72
  
10
73
  [vite:dts] Start generate declaration files...
11
74
  computing gzip size...
12
- dist/index.css 318.68 kB gzip: 61.72 kB
13
- dist/index.js  0.22 kB │ gzip: 0.16 kB
14
- dist/AgGridImpl-BQ6tBvrq.js  5.39 kB │ gzip: 1.94 kB
15
- dist/ObjectAgGridImpl-CGFeGvOH.js  11.72 kB │ gzip: 3.57 kB
16
- dist/index-CLKYMco3.js  19.66 kB │ gzip: 4.96 kB
17
- [vite:dts] Declaration files built in 24211ms.
18
- 
19
- dist/index.css 318.68 kB │ gzip: 61.72 kB
20
- dist/index.umd.cjs  25.90 kB │ gzip: 8.00 kB
21
- ✓ built in 28.51s
75
+ [vite:dts] Declaration files built in 14443ms.
76
+ 
77
+ dist/index.css 318.68 kB │ gzip: 61.72 kB
78
+ dist/index.js  0.22 kB │ gzip: 0.16 kB
79
+ dist/AutoNumberField-C1kBJaxh.js  0.29 kB │ gzip: 0.25 kB
80
+ dist/SummaryField-CnEJ_GZI.js  0.49 kB gzip: 0.36 kB
81
+ dist/FormulaField-BXNiyGoh.js  0.53 kB │ gzip: 0.37 kB
82
+ dist/VectorField-cPYmcKnV.js  0.81 kB │ gzip: 0.43 kB
83
+ dist/LocationField-BIfN5QIq.js  0.95 kB │ gzip: 0.53 kB
84
+ dist/RichTextField-CyQwSi2C.js  1.19 kB gzip: 0.58 kB
85
+ dist/ObjectField-BpkQpIF-.js  1.65 kB │ gzip: 0.76 kB
86
+ dist/GridField-CcjQp4WM.js  1.75 kB │ gzip: 0.67 kB
87
+ dist/UserField-DJjaVyrV.js  2.50 kB │ gzip: 0.93 kB
88
+ dist/AddressField-Bntpynvd.js  3.12 kB │ gzip: 0.75 kB
89
+ dist/SignatureField-Cr4tsEbj.js  3.40 kB │ gzip: 1.28 kB
90
+ dist/QRCodeField-VCBewTDG.js  3.46 kB │ gzip: 1.24 kB
91
+ dist/FileField-BDwbJvor.js  3.59 kB │ gzip: 1.34 kB
92
+ dist/MasterDetailField-CAEmxbIT.js  3.96 kB │ gzip: 1.17 kB
93
+ dist/GeolocationField-Df3yYcM9.js  4.57 kB │ gzip: 1.51 kB
94
+ dist/AgGridImpl-3Mmf2qrR.js  7.21 kB │ gzip: 2.37 kB
95
+ dist/index-B87wd1E0.js  20.43 kB │ gzip: 5.11 kB
96
+ dist/ObjectAgGridImpl-EjifM4aY.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.26 kB │ gzip: 182.92 kB
99
+ ✓ built in 24.22s
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @object-ui/plugin-aggrid
2
2
 
3
+ ## 2.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - b859617: Release v1.0.0 — unify all package versions to 1.0.0
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [b859617]
12
+ - @object-ui/types@2.0.0
13
+ - @object-ui/core@2.0.0
14
+ - @object-ui/react@2.0.0
15
+ - @object-ui/components@2.0.0
16
+ - @object-ui/fields@2.0.0
17
+ - @object-ui/data-objectstack@2.0.0
18
+
3
19
  ## 0.4.1
4
20
 
5
21
  ### Patch Changes
package/QUICKSTART.md CHANGED
@@ -143,7 +143,7 @@ Your ObjectStack backend should provide:
143
143
 
144
144
  1. **Metadata Endpoint**: Returns object schema with field definitions
145
145
  ```typescript
146
- GET /api/meta/objects/{objectName}
146
+ GET /api/v1/metadata/object/{objectName}
147
147
  ```
148
148
 
149
149
  2. **Data Endpoint**: Returns paginated data
@@ -0,0 +1,95 @@
1
+ import { j as e } from "./index-B87wd1E0.js";
2
+ import { Label as d, Input as r } from "@object-ui/components";
3
+ function u({ value: n, onChange: o, field: h, readonly: a, ...i }) {
4
+ const s = n || {}, l = (t, c) => {
5
+ o({
6
+ ...s,
7
+ [t]: c
8
+ });
9
+ }, x = (t) => [
10
+ t.street,
11
+ t.city,
12
+ [t.state, t.zipCode].filter(Boolean).join(" "),
13
+ t.country
14
+ ].filter(Boolean).join(", ") || "-";
15
+ return a ? /* @__PURE__ */ e.jsx("span", { className: "text-sm", children: x(s) }) : /* @__PURE__ */ e.jsxs("div", { className: "space-y-3", children: [
16
+ /* @__PURE__ */ e.jsxs("div", { children: [
17
+ /* @__PURE__ */ e.jsx(d, { htmlFor: "street", className: "text-xs", children: "Street Address" }),
18
+ /* @__PURE__ */ e.jsx(
19
+ r,
20
+ {
21
+ id: "street",
22
+ type: "text",
23
+ value: s.street || "",
24
+ onChange: (t) => l("street", t.target.value),
25
+ placeholder: "123 Main St",
26
+ disabled: a || i.disabled,
27
+ className: i.className
28
+ }
29
+ )
30
+ ] }),
31
+ /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-2 gap-3", children: [
32
+ /* @__PURE__ */ e.jsxs("div", { children: [
33
+ /* @__PURE__ */ e.jsx(d, { htmlFor: "city", className: "text-xs", children: "City" }),
34
+ /* @__PURE__ */ e.jsx(
35
+ r,
36
+ {
37
+ id: "city",
38
+ type: "text",
39
+ value: s.city || "",
40
+ onChange: (t) => l("city", t.target.value),
41
+ placeholder: "San Francisco",
42
+ disabled: a || i.disabled
43
+ }
44
+ )
45
+ ] }),
46
+ /* @__PURE__ */ e.jsxs("div", { children: [
47
+ /* @__PURE__ */ e.jsx(d, { htmlFor: "state", className: "text-xs", children: "State / Province" }),
48
+ /* @__PURE__ */ e.jsx(
49
+ r,
50
+ {
51
+ id: "state",
52
+ type: "text",
53
+ value: s.state || "",
54
+ onChange: (t) => l("state", t.target.value),
55
+ placeholder: "CA",
56
+ disabled: a || i.disabled
57
+ }
58
+ )
59
+ ] })
60
+ ] }),
61
+ /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-2 gap-3", children: [
62
+ /* @__PURE__ */ e.jsxs("div", { children: [
63
+ /* @__PURE__ */ e.jsx(d, { htmlFor: "zipCode", className: "text-xs", children: "ZIP / Postal Code" }),
64
+ /* @__PURE__ */ e.jsx(
65
+ r,
66
+ {
67
+ id: "zipCode",
68
+ type: "text",
69
+ value: s.zipCode || "",
70
+ onChange: (t) => l("zipCode", t.target.value),
71
+ placeholder: "94102",
72
+ disabled: a || i.disabled
73
+ }
74
+ )
75
+ ] }),
76
+ /* @__PURE__ */ e.jsxs("div", { children: [
77
+ /* @__PURE__ */ e.jsx(d, { htmlFor: "country", className: "text-xs", children: "Country" }),
78
+ /* @__PURE__ */ e.jsx(
79
+ r,
80
+ {
81
+ id: "country",
82
+ type: "text",
83
+ value: s.country || "",
84
+ onChange: (t) => l("country", t.target.value),
85
+ placeholder: "United States",
86
+ disabled: a || i.disabled
87
+ }
88
+ )
89
+ ] })
90
+ ] })
91
+ ] });
92
+ }
93
+ export {
94
+ u as AddressField
95
+ };
@@ -0,0 +1,229 @@
1
+ import { j as f } from "./index-B87wd1E0.js";
2
+ import { useRef as Z, useMemo as C, useCallback as d } from "react";
3
+ import { AgGridReact as _ } from "ag-grid-react";
4
+ function G({
5
+ rowData: i = [],
6
+ columnDefs: v = [],
7
+ gridOptions: c = {},
8
+ pagination: A = !1,
9
+ paginationPageSize: y = 10,
10
+ domLayout: R = "normal",
11
+ animateRows: N = !0,
12
+ rowSelection: E,
13
+ theme: O = "quartz",
14
+ height: h = 500,
15
+ className: Q = "",
16
+ editable: g = !1,
17
+ editType: F,
18
+ singleClickEdit: V = !1,
19
+ stopEditingWhenCellsLoseFocus: j = !0,
20
+ exportConfig: l,
21
+ statusBar: x,
22
+ callbacks: n,
23
+ columnConfig: o,
24
+ enableRangeSelection: z = !1,
25
+ enableCharts: H = !1,
26
+ contextMenu: u,
27
+ treeData: p,
28
+ rowGrouping: r,
29
+ excelExport: m
30
+ }) {
31
+ const t = Z(null), b = C(() => {
32
+ if (!x?.enabled) return;
33
+ const e = x.aggregations || ["count", "sum", "avg"], s = [];
34
+ return e.includes("count") && s.push({ statusPanel: "agAggregationComponent", statusPanelParams: { aggFuncs: ["count"] } }), e.includes("sum") && s.push({ statusPanel: "agAggregationComponent", statusPanelParams: { aggFuncs: ["sum"] } }), e.includes("avg") && s.push({ statusPanel: "agAggregationComponent", statusPanelParams: { aggFuncs: ["avg"] } }), e.includes("min") && s.push({ statusPanel: "agAggregationComponent", statusPanelParams: { aggFuncs: ["min"] } }), e.includes("max") && s.push({ statusPanel: "agAggregationComponent", statusPanelParams: { aggFuncs: ["max"] } }), s;
35
+ }, [x]), S = d(() => {
36
+ if (!t.current?.api) return;
37
+ const e = {
38
+ fileName: l?.fileName || "export.csv",
39
+ skipColumnHeaders: l?.skipColumnHeaders || !1,
40
+ allColumns: l?.allColumns || !1,
41
+ onlySelected: l?.onlySelected || !1
42
+ };
43
+ if (t.current.api.exportDataAsCsv(e), n?.onExport) {
44
+ const s = l?.onlySelected ? t.current.api.getSelectedRows() : i;
45
+ n.onExport(s || [], "csv");
46
+ }
47
+ }, [l, n, i]), P = d(() => {
48
+ if (!t.current?.api) return;
49
+ const e = m?.fileName || l?.fileName || "export.csv", s = m?.includeHeaders !== !1, K = {
50
+ fileName: e,
51
+ skipColumnHeaders: !s,
52
+ allColumns: !0,
53
+ onlySelected: m?.onlySelected || !1
54
+ };
55
+ if (t.current.api.exportDataAsCsv(K), n?.onExport) {
56
+ const a = m?.onlySelected ? t.current.api.getSelectedRows() : i;
57
+ n.onExport(a || [], "excel");
58
+ }
59
+ }, [m, l, n, i]), I = d((e) => {
60
+ if (!u?.enabled) return [];
61
+ const s = [];
62
+ return (u.items || ["copy", "copyWithHeaders", "separator", "export"]).forEach((a) => {
63
+ a === "export" ? s.push({
64
+ name: "Export CSV",
65
+ icon: "<span>📥</span>",
66
+ action: () => S()
67
+ }) : a === "export-excel" ? s.push({
68
+ name: "Export Excel (CSV)",
69
+ icon: "<span>📊</span>",
70
+ action: () => P()
71
+ }) : a === "autoSizeAll" ? s.push({
72
+ name: "Auto-size All Columns",
73
+ action: () => {
74
+ t.current?.api && t.current.api.autoSizeAllColumns();
75
+ }
76
+ }) : a === "resetColumns" ? s.push({
77
+ name: "Reset Columns",
78
+ action: () => {
79
+ t.current?.api && t.current.api.resetColumnState();
80
+ }
81
+ }) : s.push(a);
82
+ }), u.customItems && (s.length > 0 && s.push("separator"), u.customItems.forEach((a) => {
83
+ s.push({
84
+ name: a.name,
85
+ disabled: a.disabled,
86
+ action: () => {
87
+ n?.onContextMenuAction && n.onContextMenuAction(a.action, e.node?.data);
88
+ }
89
+ });
90
+ })), s;
91
+ }, [u, S, P, n]), B = d((e) => {
92
+ n?.onCellClicked?.(e);
93
+ }, [n]), W = d((e) => {
94
+ n?.onRowClicked?.(e);
95
+ }, [n]), $ = d((e) => {
96
+ n?.onSelectionChanged?.(e);
97
+ }, [n]), q = d((e) => {
98
+ n?.onCellValueChanged?.(e);
99
+ }, [n]), J = d((e) => {
100
+ t.current = e;
101
+ }, []), T = C(() => v ? v.map((e) => {
102
+ const s = { ...e };
103
+ return g && e.editable !== !1 && (s.editable = !0), o && (o.resizable !== void 0 && e.resizable === void 0 && (s.resizable = o.resizable), o.sortable !== void 0 && e.sortable === void 0 && (s.sortable = o.sortable), o.filterable !== void 0 && e.filter === void 0 && (s.filter = o.filterable)), r?.enabled && r.groupByFields?.includes(e.field || "") && (s.rowGroup = !0, s.hide = !0), r?.aggregations && e.field && r.aggregations[e.field] && (s.aggFunc = r.aggregations[e.field]), s;
104
+ }) : [], [v, g, o, r]), U = C(() => ({
105
+ ...c,
106
+ pagination: A,
107
+ paginationPageSize: y,
108
+ domLayout: R,
109
+ animateRows: N,
110
+ rowSelection: E,
111
+ editType: F,
112
+ singleClickEdit: V,
113
+ stopEditingWhenCellsLoseFocus: j,
114
+ statusBar: b ? { statusPanels: b } : void 0,
115
+ enableRangeSelection: z,
116
+ enableCharts: H,
117
+ getContextMenuItems: u?.enabled ? I : void 0,
118
+ // Tree data support
119
+ ...p?.enabled ? {
120
+ treeData: !0,
121
+ getDataPath: p.pathField ? (e) => e[p.pathField] : void 0,
122
+ autoGroupColumnDef: {
123
+ headerName: "Hierarchy",
124
+ minWidth: 250,
125
+ cellRendererParams: {
126
+ suppressCount: !1
127
+ }
128
+ },
129
+ groupDefaultExpanded: p.expandAll ? -1 : p.expandDepth ?? 0
130
+ } : {},
131
+ // Row grouping
132
+ ...r?.enabled ? {
133
+ groupDefaultExpanded: r.groupByFields?.length ? 1 : 0,
134
+ autoGroupColumnDef: {
135
+ minWidth: 200,
136
+ cellRendererParams: {
137
+ suppressCount: !r.showRowCount
138
+ }
139
+ }
140
+ } : {},
141
+ // Default options for better UX
142
+ suppressCellFocus: !g,
143
+ enableCellTextSelection: !0,
144
+ ensureDomOrder: !0,
145
+ // Virtual scrolling optimizations for large datasets
146
+ rowBuffer: c.rowBuffer ?? 10,
147
+ debounceVerticalScrollbar: c.debounceVerticalScrollbar ?? i.length > 1e3,
148
+ // Event handlers
149
+ onCellClicked: B,
150
+ onRowClicked: W,
151
+ onSelectionChanged: $,
152
+ onCellValueChanged: q,
153
+ onGridReady: J
154
+ }), [
155
+ c,
156
+ A,
157
+ y,
158
+ R,
159
+ N,
160
+ E,
161
+ F,
162
+ V,
163
+ j,
164
+ b,
165
+ z,
166
+ H,
167
+ u,
168
+ I,
169
+ p,
170
+ r,
171
+ g,
172
+ i.length,
173
+ B,
174
+ W,
175
+ $,
176
+ q,
177
+ J
178
+ ]), X = C(() => ({
179
+ height: typeof h == "number" ? `${h}px` : h,
180
+ width: "100%"
181
+ }), [h]), Y = [
182
+ `ag-theme-${O}`,
183
+ "rounded-xl",
184
+ "border",
185
+ "border-border",
186
+ "overflow-hidden",
187
+ "shadow-lg",
188
+ Q
189
+ ].filter(Boolean).join(" ");
190
+ return /* @__PURE__ */ f.jsxs("div", { className: "ag-grid-container", children: [
191
+ (l?.enabled || m?.enabled) && /* @__PURE__ */ f.jsxs("div", { className: "mb-2 flex gap-2", children: [
192
+ l?.enabled && /* @__PURE__ */ f.jsx(
193
+ "button",
194
+ {
195
+ onClick: S,
196
+ className: "px-3 py-1.5 text-sm font-medium text-white bg-blue-600 hover:bg-blue-700 rounded-md transition-colors",
197
+ children: "Export CSV"
198
+ }
199
+ ),
200
+ m?.enabled && /* @__PURE__ */ f.jsx(
201
+ "button",
202
+ {
203
+ onClick: P,
204
+ className: "px-3 py-1.5 text-sm font-medium text-white bg-green-600 hover:bg-green-700 rounded-md transition-colors",
205
+ children: "Export Excel (CSV)"
206
+ }
207
+ )
208
+ ] }),
209
+ /* @__PURE__ */ f.jsx(
210
+ "div",
211
+ {
212
+ className: Y,
213
+ style: X,
214
+ children: /* @__PURE__ */ f.jsx(
215
+ _,
216
+ {
217
+ ref: t,
218
+ rowData: i,
219
+ columnDefs: T,
220
+ gridOptions: U
221
+ }
222
+ )
223
+ }
224
+ )
225
+ ] });
226
+ }
227
+ export {
228
+ G as default
229
+ };
@@ -0,0 +1,8 @@
1
+ import { j as n } from "./index-B87wd1E0.js";
2
+ function a({ value: t, field: o, ...s }) {
3
+ const e = t != null ? String(t) : "-";
4
+ return /* @__PURE__ */ n.jsx("span", { className: `text-sm font-mono text-gray-700 ${s.className || ""}`, children: e });
5
+ }
6
+ export {
7
+ a as AutoNumberField
8
+ };
@@ -0,0 +1,101 @@
1
+ import { j as e } from "./index-B87wd1E0.js";
2
+ import { useRef as y } from "react";
3
+ import { Button as p } from "@object-ui/components";
4
+ import { c as N, X as g, U as F } from "./ObjectAgGridImpl-EjifM4aY.js";
5
+ const z = [
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
+ ], b = N("file", z);
15
+ function R({ value: t, onChange: r, field: x, readonly: h, ...o }) {
16
+ const d = y(null), c = x || o.schema, m = c?.multiple || !1, f = c?.accept ? c.accept.join(",") : void 0;
17
+ if (h) {
18
+ if (!t) return /* @__PURE__ */ e.jsx("span", { className: "text-sm", children: "-" });
19
+ const a = Array.isArray(t) ? t : [t];
20
+ return /* @__PURE__ */ e.jsx("div", { className: "flex flex-wrap gap-2", children: a.map((s, l) => /* @__PURE__ */ e.jsx("span", { className: "text-sm truncate max-w-xs", children: s.name || s.original_name || "File" }, l)) });
21
+ }
22
+ const n = t ? Array.isArray(t) ? t : [t] : [], j = (a) => {
23
+ const s = Array.from(a.target.files || []);
24
+ if (s.length === 0) return;
25
+ const l = s.map((i) => ({
26
+ name: i.name,
27
+ original_name: i.name,
28
+ size: i.size,
29
+ mime_type: i.type,
30
+ // In a real implementation, this would upload the file and return a URL
31
+ url: URL.createObjectURL(i)
32
+ }));
33
+ r(m ? [...n, ...l] : l[0]);
34
+ }, u = (a) => {
35
+ if (m) {
36
+ const s = n.filter((l, i) => i !== a);
37
+ r(s.length > 0 ? s : null);
38
+ } else
39
+ r(null);
40
+ };
41
+ return /* @__PURE__ */ e.jsxs("div", { className: o.className, children: [
42
+ /* @__PURE__ */ e.jsx(
43
+ "input",
44
+ {
45
+ ref: d,
46
+ type: "file",
47
+ multiple: m,
48
+ accept: f,
49
+ onChange: j,
50
+ className: "hidden"
51
+ }
52
+ ),
53
+ /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
54
+ n.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "space-y-1", children: n.map((a, s) => /* @__PURE__ */ e.jsxs(
55
+ "div",
56
+ {
57
+ className: "flex items-center justify-between gap-2 p-2 bg-gray-50 rounded-md border border-gray-200",
58
+ children: [
59
+ /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2 flex-1 min-w-0", children: [
60
+ /* @__PURE__ */ e.jsx(b, { className: "size-4 text-gray-500 flex-shrink-0" }),
61
+ /* @__PURE__ */ e.jsx("span", { className: "text-sm truncate", children: a.name || a.original_name || "File" }),
62
+ a.size && /* @__PURE__ */ e.jsxs("span", { className: "text-xs text-gray-500", children: [
63
+ "(",
64
+ (a.size / 1024).toFixed(1),
65
+ " KB)"
66
+ ] })
67
+ ] }),
68
+ /* @__PURE__ */ e.jsx(
69
+ p,
70
+ {
71
+ type: "button",
72
+ variant: "ghost",
73
+ size: "sm",
74
+ onClick: () => u(s),
75
+ className: "h-6 w-6 p-0",
76
+ children: /* @__PURE__ */ e.jsx(g, { className: "size-3" })
77
+ }
78
+ )
79
+ ]
80
+ },
81
+ s
82
+ )) }),
83
+ /* @__PURE__ */ e.jsxs(
84
+ p,
85
+ {
86
+ type: "button",
87
+ variant: "outline",
88
+ onClick: () => d.current?.click(),
89
+ className: "w-full",
90
+ children: [
91
+ /* @__PURE__ */ e.jsx(F, { className: "size-4 mr-2" }),
92
+ n.length > 0 ? "Add More Files" : "Upload File"
93
+ ]
94
+ }
95
+ )
96
+ ] })
97
+ ] });
98
+ }
99
+ export {
100
+ R as FileField
101
+ };
@@ -0,0 +1,9 @@
1
+ import { j as s } from "./index-B87wd1E0.js";
2
+ function m({ value: e, field: o, ...r }) {
3
+ const n = (o || r.schema)?.return_type || "text";
4
+ let t = "-";
5
+ return e != null && (n === "number" || n === "currency" ? t = typeof e == "number" ? e.toFixed(2) : String(e) : n === "boolean" ? t = e ? "Yes" : "No" : n === "date" ? t = new Date(e).toLocaleDateString() : t = String(e)), /* @__PURE__ */ s.jsx("span", { className: `text-sm font-mono text-gray-700 ${r.className || ""}`, children: t });
6
+ }
7
+ export {
8
+ m as FormulaField
9
+ };