@object-ui/plugin-aggrid 0.4.0 → 0.5.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.
@@ -1,150 +1,150 @@
1
- import L, { Suspense as ae } from "react";
2
- import { ComponentRegistry as te } from "@object-ui/core";
3
- import { Skeleton as ne } from "@object-ui/components";
4
- var E = { exports: {} }, m = {};
5
- var V;
6
- function le() {
7
- if (V) return m;
8
- V = 1;
9
- var a = /* @__PURE__ */ Symbol.for("react.transitional.element"), b = /* @__PURE__ */ Symbol.for("react.fragment");
10
- function s(c, o, i) {
11
- var d = null;
12
- if (i !== void 0 && (d = "" + i), o.key !== void 0 && (d = "" + o.key), "key" in o) {
1
+ import N, { Suspense as G } from "react";
2
+ import { ComponentRegistry as Y } from "@object-ui/core";
3
+ import { Skeleton as q } from "@object-ui/components";
4
+ var y = { exports: {} }, b = {};
5
+ var M;
6
+ function oe() {
7
+ if (M) return b;
8
+ M = 1;
9
+ var a = /* @__PURE__ */ Symbol.for("react.transitional.element"), g = /* @__PURE__ */ Symbol.for("react.fragment");
10
+ function c(d, o, i) {
11
+ var f = null;
12
+ if (i !== void 0 && (f = "" + i), o.key !== void 0 && (f = "" + o.key), "key" in o) {
13
13
  i = {};
14
- for (var f in o)
15
- f !== "key" && (i[f] = o[f]);
14
+ for (var p in o)
15
+ p !== "key" && (i[p] = o[p]);
16
16
  } else i = o;
17
17
  return o = i.ref, {
18
18
  $$typeof: a,
19
- type: c,
20
- key: d,
19
+ type: d,
20
+ key: f,
21
21
  ref: o !== void 0 ? o : null,
22
22
  props: i
23
23
  };
24
24
  }
25
- return m.Fragment = b, m.jsx = s, m.jsxs = s, m;
25
+ return b.Fragment = g, b.jsx = c, b.jsxs = c, b;
26
26
  }
27
- var p = {};
28
- var Y;
29
- function oe() {
30
- return Y || (Y = 1, process.env.NODE_ENV !== "production" && (function() {
27
+ var m = {};
28
+ var D;
29
+ function ie() {
30
+ return D || (D = 1, process.env.NODE_ENV !== "production" && (function() {
31
31
  function a(e) {
32
32
  if (e == null) return null;
33
33
  if (typeof e == "function")
34
- return e.$$typeof === K ? null : e.displayName || e.name || null;
34
+ return e.$$typeof === re ? null : e.displayName || e.name || null;
35
35
  if (typeof e == "string") return e;
36
36
  switch (e) {
37
- case R:
37
+ case S:
38
38
  return "Fragment";
39
- case q:
39
+ case H:
40
40
  return "Profiler";
41
- case J:
41
+ case U:
42
42
  return "StrictMode";
43
- case X:
43
+ case K:
44
44
  return "Suspense";
45
- case H:
45
+ case ee:
46
46
  return "SuspenseList";
47
- case Z:
47
+ case te:
48
48
  return "Activity";
49
49
  }
50
50
  if (typeof e == "object")
51
51
  switch (typeof e.tag == "number" && console.error(
52
52
  "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
53
53
  ), e.$$typeof) {
54
- case I:
54
+ case B:
55
55
  return "Portal";
56
- case U:
56
+ case Q:
57
57
  return e.displayName || "Context";
58
- case W:
58
+ case X:
59
59
  return (e._context.displayName || "Context") + ".Consumer";
60
- case B:
61
- var r = e.render;
62
- return e = e.displayName, e || (e = r.displayName || r.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
63
- case Q:
64
- return r = e.displayName || null, r !== null ? r : a(e.type) || "Memo";
65
- case k:
66
- r = e._payload, e = e._init;
60
+ case Z:
61
+ var t = e.render;
62
+ return e = e.displayName, e || (e = t.displayName || t.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
63
+ case ae:
64
+ return t = e.displayName || null, t !== null ? t : a(e.type) || "Memo";
65
+ case R:
66
+ t = e._payload, e = e._init;
67
67
  try {
68
- return a(e(r));
68
+ return a(e(t));
69
69
  } catch {
70
70
  }
71
71
  }
72
72
  return null;
73
73
  }
74
- function b(e) {
74
+ function g(e) {
75
75
  return "" + e;
76
76
  }
77
- function s(e) {
77
+ function c(e) {
78
78
  try {
79
- b(e);
80
- var r = !1;
79
+ g(e);
80
+ var t = !1;
81
81
  } catch {
82
- r = !0;
82
+ t = !0;
83
83
  }
84
- if (r) {
85
- r = console;
86
- var t = r.error, n = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
87
- return t.call(
88
- r,
84
+ if (t) {
85
+ t = console;
86
+ var r = t.error, l = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
87
+ return r.call(
88
+ t,
89
89
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
90
- n
91
- ), b(e);
90
+ l
91
+ ), g(e);
92
92
  }
93
93
  }
94
- function c(e) {
95
- if (e === R) return "<>";
96
- if (typeof e == "object" && e !== null && e.$$typeof === k)
94
+ function d(e) {
95
+ if (e === S) return "<>";
96
+ if (typeof e == "object" && e !== null && e.$$typeof === R)
97
97
  return "<...>";
98
98
  try {
99
- var r = a(e);
100
- return r ? "<" + r + ">" : "<...>";
99
+ var t = a(e);
100
+ return t ? "<" + t + ">" : "<...>";
101
101
  } catch {
102
102
  return "<...>";
103
103
  }
104
104
  }
105
105
  function o() {
106
- var e = _.A;
106
+ var e = k.A;
107
107
  return e === null ? null : e.getOwner();
108
108
  }
109
109
  function i() {
110
110
  return Error("react-stack-top-frame");
111
111
  }
112
- function d(e) {
113
- if (N.call(e, "key")) {
114
- var r = Object.getOwnPropertyDescriptor(e, "key").get;
115
- if (r && r.isReactWarning) return !1;
112
+ function f(e) {
113
+ if (j.call(e, "key")) {
114
+ var t = Object.getOwnPropertyDescriptor(e, "key").get;
115
+ if (t && t.isReactWarning) return !1;
116
116
  }
117
117
  return e.key !== void 0;
118
118
  }
119
- function f(e, r) {
120
- function t() {
121
- h || (h = !0, console.error(
119
+ function p(e, t) {
120
+ function r() {
121
+ P || (P = !0, console.error(
122
122
  "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
123
- r
123
+ t
124
124
  ));
125
125
  }
126
- t.isReactWarning = !0, Object.defineProperty(e, "key", {
127
- get: t,
126
+ r.isReactWarning = !0, Object.defineProperty(e, "key", {
127
+ get: r,
128
128
  configurable: !0
129
129
  });
130
130
  }
131
- function G() {
131
+ function I() {
132
132
  var e = a(this.type);
133
- return P[e] || (P[e] = !0, console.error(
133
+ return h[e] || (h[e] = !0, console.error(
134
134
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
135
135
  )), e = this.props.ref, e !== void 0 ? e : null;
136
136
  }
137
- function $(e, r, t, n, v, S) {
138
- var l = t.ref;
137
+ function W(e, t, r, l, E, _) {
138
+ var n = r.ref;
139
139
  return e = {
140
- $$typeof: x,
140
+ $$typeof: A,
141
141
  type: e,
142
- key: r,
143
- props: t,
144
- _owner: n
145
- }, (l !== void 0 ? l : null) !== null ? Object.defineProperty(e, "ref", {
142
+ key: t,
143
+ props: r,
144
+ _owner: l
145
+ }, (n !== void 0 ? n : null) !== null ? Object.defineProperty(e, "ref", {
146
146
  enumerable: !1,
147
- get: G
147
+ get: I
148
148
  }) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
149
149
  configurable: !1,
150
150
  enumerable: !1,
@@ -159,110 +159,110 @@ function oe() {
159
159
  configurable: !1,
160
160
  enumerable: !1,
161
161
  writable: !0,
162
- value: v
162
+ value: E
163
163
  }), Object.defineProperty(e, "_debugTask", {
164
164
  configurable: !1,
165
165
  enumerable: !1,
166
166
  writable: !0,
167
- value: S
167
+ value: _
168
168
  }), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
169
169
  }
170
- function w(e, r, t, n, v, S) {
171
- var l = r.children;
172
- if (l !== void 0)
173
- if (n)
174
- if (ee(l)) {
175
- for (n = 0; n < l.length; n++)
176
- A(l[n]);
177
- Object.freeze && Object.freeze(l);
170
+ function w(e, t, r, l, E, _) {
171
+ var n = t.children;
172
+ if (n !== void 0)
173
+ if (l)
174
+ if (le(n)) {
175
+ for (l = 0; l < n.length; l++)
176
+ x(n[l]);
177
+ Object.freeze && Object.freeze(n);
178
178
  } else
179
179
  console.error(
180
180
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
181
181
  );
182
- else A(l);
183
- if (N.call(r, "key")) {
184
- l = a(e);
185
- var u = Object.keys(r).filter(function(re) {
186
- return re !== "key";
182
+ else x(n);
183
+ if (j.call(t, "key")) {
184
+ n = a(e);
185
+ var u = Object.keys(t).filter(function(ne) {
186
+ return ne !== "key";
187
187
  });
188
- n = 0 < u.length ? "{key: someKey, " + u.join(": ..., ") + ": ...}" : "{key: someKey}", M[l + n] || (u = 0 < u.length ? "{" + u.join(": ..., ") + ": ...}" : "{}", console.error(
188
+ l = 0 < u.length ? "{key: someKey, " + u.join(": ..., ") + ": ...}" : "{key: someKey}", L[n + l] || (u = 0 < u.length ? "{" + u.join(": ..., ") + ": ...}" : "{}", console.error(
189
189
  `A props object containing a "key" prop is being spread into JSX:
190
190
  let props = %s;
191
191
  <%s {...props} />
192
192
  React keys must be passed directly to JSX without using spread:
193
193
  let props = %s;
194
194
  <%s key={someKey} {...props} />`,
195
- n,
196
195
  l,
196
+ n,
197
197
  u,
198
- l
199
- ), M[l + n] = !0);
198
+ n
199
+ ), L[n + l] = !0);
200
200
  }
201
- if (l = null, t !== void 0 && (s(t), l = "" + t), d(r) && (s(r.key), l = "" + r.key), "key" in r) {
202
- t = {};
203
- for (var T in r)
204
- T !== "key" && (t[T] = r[T]);
205
- } else t = r;
206
- return l && f(
207
- t,
201
+ if (n = null, r !== void 0 && (c(r), n = "" + r), f(t) && (c(t.key), n = "" + t.key), "key" in t) {
202
+ r = {};
203
+ for (var T in t)
204
+ T !== "key" && (r[T] = t[T]);
205
+ } else r = t;
206
+ return n && p(
207
+ r,
208
208
  typeof e == "function" ? e.displayName || e.name || "Unknown" : e
209
- ), $(
209
+ ), W(
210
210
  e,
211
- l,
212
- t,
211
+ n,
212
+ r,
213
213
  o(),
214
- v,
215
- S
214
+ E,
215
+ _
216
216
  );
217
217
  }
218
- function A(e) {
219
- O(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e !== null && e.$$typeof === k && (e._payload.status === "fulfilled" ? O(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
218
+ function x(e) {
219
+ O(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e !== null && e.$$typeof === R && (e._payload.status === "fulfilled" ? O(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
220
220
  }
221
221
  function O(e) {
222
- return typeof e == "object" && e !== null && e.$$typeof === x;
222
+ return typeof e == "object" && e !== null && e.$$typeof === A;
223
223
  }
224
- var g = L, x = /* @__PURE__ */ Symbol.for("react.transitional.element"), I = /* @__PURE__ */ Symbol.for("react.portal"), R = /* @__PURE__ */ Symbol.for("react.fragment"), J = /* @__PURE__ */ Symbol.for("react.strict_mode"), q = /* @__PURE__ */ Symbol.for("react.profiler"), W = /* @__PURE__ */ Symbol.for("react.consumer"), U = /* @__PURE__ */ Symbol.for("react.context"), B = /* @__PURE__ */ Symbol.for("react.forward_ref"), X = /* @__PURE__ */ Symbol.for("react.suspense"), H = /* @__PURE__ */ Symbol.for("react.suspense_list"), Q = /* @__PURE__ */ Symbol.for("react.memo"), k = /* @__PURE__ */ Symbol.for("react.lazy"), Z = /* @__PURE__ */ Symbol.for("react.activity"), K = /* @__PURE__ */ Symbol.for("react.client.reference"), _ = g.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, N = Object.prototype.hasOwnProperty, ee = Array.isArray, y = console.createTask ? console.createTask : function() {
224
+ var v = N, A = /* @__PURE__ */ Symbol.for("react.transitional.element"), B = /* @__PURE__ */ Symbol.for("react.portal"), S = /* @__PURE__ */ Symbol.for("react.fragment"), U = /* @__PURE__ */ Symbol.for("react.strict_mode"), H = /* @__PURE__ */ Symbol.for("react.profiler"), X = /* @__PURE__ */ Symbol.for("react.consumer"), Q = /* @__PURE__ */ Symbol.for("react.context"), Z = /* @__PURE__ */ Symbol.for("react.forward_ref"), K = /* @__PURE__ */ Symbol.for("react.suspense"), ee = /* @__PURE__ */ Symbol.for("react.suspense_list"), ae = /* @__PURE__ */ Symbol.for("react.memo"), R = /* @__PURE__ */ Symbol.for("react.lazy"), te = /* @__PURE__ */ Symbol.for("react.activity"), re = /* @__PURE__ */ Symbol.for("react.client.reference"), k = v.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, j = Object.prototype.hasOwnProperty, le = Array.isArray, C = console.createTask ? console.createTask : function() {
225
225
  return null;
226
226
  };
227
- g = {
227
+ v = {
228
228
  react_stack_bottom_frame: function(e) {
229
229
  return e();
230
230
  }
231
231
  };
232
- var h, P = {}, j = g.react_stack_bottom_frame.bind(
233
- g,
232
+ var P, h = {}, z = v.react_stack_bottom_frame.bind(
233
+ v,
234
234
  i
235
- )(), D = y(c(i)), M = {};
236
- p.Fragment = R, p.jsx = function(e, r, t) {
237
- var n = 1e4 > _.recentlyCreatedOwnerStacks++;
235
+ )(), V = C(d(i)), L = {};
236
+ m.Fragment = S, m.jsx = function(e, t, r) {
237
+ var l = 1e4 > k.recentlyCreatedOwnerStacks++;
238
238
  return w(
239
239
  e,
240
- r,
241
240
  t,
241
+ r,
242
242
  !1,
243
- n ? Error("react-stack-top-frame") : j,
244
- n ? y(c(e)) : D
243
+ l ? Error("react-stack-top-frame") : z,
244
+ l ? C(d(e)) : V
245
245
  );
246
- }, p.jsxs = function(e, r, t) {
247
- var n = 1e4 > _.recentlyCreatedOwnerStacks++;
246
+ }, m.jsxs = function(e, t, r) {
247
+ var l = 1e4 > k.recentlyCreatedOwnerStacks++;
248
248
  return w(
249
249
  e,
250
- r,
251
250
  t,
251
+ r,
252
252
  !0,
253
- n ? Error("react-stack-top-frame") : j,
254
- n ? y(c(e)) : D
253
+ l ? Error("react-stack-top-frame") : z,
254
+ l ? C(d(e)) : V
255
255
  );
256
256
  };
257
- })()), p;
257
+ })()), m;
258
258
  }
259
259
  var F;
260
- function ie() {
261
- return F || (F = 1, process.env.NODE_ENV === "production" ? E.exports = le() : E.exports = oe()), E.exports;
260
+ function ue() {
261
+ return F || (F = 1, process.env.NODE_ENV === "production" ? y.exports = oe() : y.exports = ie()), y.exports;
262
262
  }
263
- var C = ie();
264
- const ue = L.lazy(() => import("./AgGridImpl-DKkq6v1B.js")), z = ({ schema: a }) => /* @__PURE__ */ C.jsx(ae, { fallback: /* @__PURE__ */ C.jsx(ne, { className: "w-full h-[500px]" }), children: /* @__PURE__ */ C.jsx(
265
- ue,
263
+ var s = ue();
264
+ const se = N.lazy(() => import("./AgGridImpl-BQ6tBvrq.js")), ce = N.lazy(() => import("./ObjectAgGridImpl-CGFeGvOH.js")), J = ({ schema: a }) => /* @__PURE__ */ s.jsx(G, { fallback: /* @__PURE__ */ s.jsx(q, { className: "w-full h-[500px]" }), children: /* @__PURE__ */ s.jsx(
265
+ se,
266
266
  {
267
267
  rowData: a.rowData,
268
268
  columnDefs: a.columnDefs,
@@ -288,10 +288,11 @@ const ue = L.lazy(() => import("./AgGridImpl-DKkq6v1B.js")), z = ({ schema: a })
288
288
  contextMenu: a.contextMenu
289
289
  }
290
290
  ) });
291
- te.register(
291
+ Y.register(
292
292
  "aggrid",
293
- z,
293
+ J,
294
294
  {
295
+ namespace: "plugin-aggrid",
295
296
  label: "AG Grid",
296
297
  icon: "Table",
297
298
  category: "plugin",
@@ -494,11 +495,144 @@ te.register(
494
495
  }
495
496
  }
496
497
  );
497
- const fe = {
498
- aggrid: z
498
+ const $ = ({ schema: a }) => /* @__PURE__ */ s.jsx(G, { fallback: /* @__PURE__ */ s.jsx(q, { className: "w-full h-[500px]" }), children: /* @__PURE__ */ s.jsx(
499
+ ce,
500
+ {
501
+ objectName: a.objectName,
502
+ dataSource: a.dataSource,
503
+ fields: a.fields,
504
+ fieldNames: a.fieldNames,
505
+ filters: a.filters,
506
+ sort: a.sort,
507
+ pageSize: a.pageSize,
508
+ pagination: a.pagination,
509
+ domLayout: a.domLayout,
510
+ animateRows: a.animateRows,
511
+ rowSelection: a.rowSelection,
512
+ theme: a.theme,
513
+ height: a.height,
514
+ className: a.className,
515
+ editable: a.editable,
516
+ editType: a.editType,
517
+ singleClickEdit: a.singleClickEdit,
518
+ stopEditingWhenCellsLoseFocus: a.stopEditingWhenCellsLoseFocus,
519
+ exportConfig: a.exportConfig,
520
+ statusBar: a.statusBar,
521
+ callbacks: a.callbacks,
522
+ columnConfig: a.columnConfig,
523
+ enableRangeSelection: a.enableRangeSelection,
524
+ enableCharts: a.enableCharts,
525
+ contextMenu: a.contextMenu
526
+ }
527
+ ) }), be = {
528
+ aggrid: J,
529
+ "object-aggrid": $
499
530
  };
531
+ Y.register(
532
+ "object-aggrid",
533
+ $,
534
+ {
535
+ namespace: "plugin-aggrid",
536
+ label: "Object AG Grid",
537
+ icon: "Table",
538
+ category: "plugin",
539
+ inputs: [
540
+ {
541
+ name: "objectName",
542
+ type: "string",
543
+ label: "Object Name",
544
+ description: "Name of the object to fetch metadata and data from",
545
+ required: !0
546
+ },
547
+ {
548
+ name: "dataSource",
549
+ type: "object",
550
+ label: "Data Source",
551
+ description: "ObjectStack data source adapter instance",
552
+ required: !0
553
+ },
554
+ {
555
+ name: "fieldNames",
556
+ type: "array",
557
+ label: "Field Names",
558
+ description: "Optional: Specify which fields to show (defaults to all fields)"
559
+ },
560
+ {
561
+ name: "filters",
562
+ type: "object",
563
+ label: "Filters",
564
+ description: "Query filters to apply to the data"
565
+ },
566
+ {
567
+ name: "sort",
568
+ type: "object",
569
+ label: "Sort",
570
+ description: 'Sorting configuration: { fieldName: "asc" | "desc" }'
571
+ },
572
+ {
573
+ name: "pagination",
574
+ type: "boolean",
575
+ label: "Enable Pagination",
576
+ defaultValue: !0
577
+ },
578
+ {
579
+ name: "pageSize",
580
+ type: "number",
581
+ label: "Page Size",
582
+ defaultValue: 10,
583
+ description: "Number of rows per page"
584
+ },
585
+ {
586
+ name: "theme",
587
+ type: "enum",
588
+ label: "Theme",
589
+ enum: [
590
+ { label: "Quartz", value: "quartz" },
591
+ { label: "Alpine", value: "alpine" },
592
+ { label: "Balham", value: "balham" },
593
+ { label: "Material", value: "material" }
594
+ ],
595
+ defaultValue: "quartz"
596
+ },
597
+ {
598
+ name: "height",
599
+ type: "number",
600
+ label: "Height (px)",
601
+ defaultValue: 500
602
+ },
603
+ {
604
+ name: "editable",
605
+ type: "boolean",
606
+ label: "Enable Editing",
607
+ defaultValue: !1,
608
+ description: "Allow cells to be edited inline",
609
+ advanced: !0
610
+ },
611
+ {
612
+ name: "exportConfig",
613
+ type: "code",
614
+ label: "Export Config (JSON)",
615
+ description: 'Configure CSV export: { enabled: true, fileName: "data.csv" }',
616
+ advanced: !0
617
+ },
618
+ {
619
+ name: "columnConfig",
620
+ type: "code",
621
+ label: "Column Config (JSON)",
622
+ description: "Global column settings: { resizable: true, sortable: true, filterable: true }",
623
+ advanced: !0
624
+ },
625
+ {
626
+ name: "className",
627
+ type: "string",
628
+ label: "CSS Class"
629
+ }
630
+ ]
631
+ }
632
+ );
500
633
  export {
501
- z as A,
502
- fe as a,
503
- C as j
634
+ J as A,
635
+ $ as O,
636
+ be as a,
637
+ s as j
504
638
  };