@object-ui/plugin-gantt 0.3.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.
- package/LICENSE +21 -0
- package/README.md +260 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +504 -0
- package/dist/index.umd.cjs +6 -0
- package/dist/src/ObjectGantt.d.ts +12 -0
- package/dist/src/ObjectGantt.d.ts.map +1 -0
- package/dist/src/index.d.ts +4 -0
- package/dist/src/index.d.ts.map +1 -0
- package/package.json +53 -0
- package/src/ObjectGantt.tsx +408 -0
- package/src/index.tsx +29 -0
- package/tsconfig.json +18 -0
- package/vite.config.ts +50 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,504 @@
|
|
|
1
|
+
import ne, { useState as M, useEffect as Z, useMemo as z } from "react";
|
|
2
|
+
import { ComponentRegistry as ae } from "@object-ui/core";
|
|
3
|
+
var $ = { exports: {} }, D = {};
|
|
4
|
+
var K;
|
|
5
|
+
function se() {
|
|
6
|
+
if (K) return D;
|
|
7
|
+
K = 1;
|
|
8
|
+
var t = /* @__PURE__ */ Symbol.for("react.transitional.element"), u = /* @__PURE__ */ Symbol.for("react.fragment");
|
|
9
|
+
function f(g, m, b) {
|
|
10
|
+
var E = null;
|
|
11
|
+
if (b !== void 0 && (E = "" + b), m.key !== void 0 && (E = "" + m.key), "key" in m) {
|
|
12
|
+
b = {};
|
|
13
|
+
for (var x in m)
|
|
14
|
+
x !== "key" && (b[x] = m[x]);
|
|
15
|
+
} else b = m;
|
|
16
|
+
return m = b.ref, {
|
|
17
|
+
$$typeof: t,
|
|
18
|
+
type: g,
|
|
19
|
+
key: E,
|
|
20
|
+
ref: m !== void 0 ? m : null,
|
|
21
|
+
props: b
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
return D.Fragment = u, D.jsx = f, D.jsxs = f, D;
|
|
25
|
+
}
|
|
26
|
+
var O = {};
|
|
27
|
+
var ee;
|
|
28
|
+
function oe() {
|
|
29
|
+
return ee || (ee = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
30
|
+
function t(e) {
|
|
31
|
+
if (e == null) return null;
|
|
32
|
+
if (typeof e == "function")
|
|
33
|
+
return e.$$typeof === k ? null : e.displayName || e.name || null;
|
|
34
|
+
if (typeof e == "string") return e;
|
|
35
|
+
switch (e) {
|
|
36
|
+
case j:
|
|
37
|
+
return "Fragment";
|
|
38
|
+
case L:
|
|
39
|
+
return "Profiler";
|
|
40
|
+
case P:
|
|
41
|
+
return "StrictMode";
|
|
42
|
+
case d:
|
|
43
|
+
return "Suspense";
|
|
44
|
+
case i:
|
|
45
|
+
return "SuspenseList";
|
|
46
|
+
case W:
|
|
47
|
+
return "Activity";
|
|
48
|
+
}
|
|
49
|
+
if (typeof e == "object")
|
|
50
|
+
switch (typeof e.tag == "number" && console.error(
|
|
51
|
+
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
52
|
+
), e.$$typeof) {
|
|
53
|
+
case y:
|
|
54
|
+
return "Portal";
|
|
55
|
+
case n:
|
|
56
|
+
return e.displayName || "Context";
|
|
57
|
+
case G:
|
|
58
|
+
return (e._context.displayName || "Context") + ".Consumer";
|
|
59
|
+
case s:
|
|
60
|
+
var r = e.render;
|
|
61
|
+
return e = e.displayName, e || (e = r.displayName || r.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
|
|
62
|
+
case T:
|
|
63
|
+
return r = e.displayName || null, r !== null ? r : t(e.type) || "Memo";
|
|
64
|
+
case p:
|
|
65
|
+
r = e._payload, e = e._init;
|
|
66
|
+
try {
|
|
67
|
+
return t(e(r));
|
|
68
|
+
} catch {
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return null;
|
|
72
|
+
}
|
|
73
|
+
function u(e) {
|
|
74
|
+
return "" + e;
|
|
75
|
+
}
|
|
76
|
+
function f(e) {
|
|
77
|
+
try {
|
|
78
|
+
u(e);
|
|
79
|
+
var r = !1;
|
|
80
|
+
} catch {
|
|
81
|
+
r = !0;
|
|
82
|
+
}
|
|
83
|
+
if (r) {
|
|
84
|
+
r = console;
|
|
85
|
+
var o = r.error, l = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
86
|
+
return o.call(
|
|
87
|
+
r,
|
|
88
|
+
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
89
|
+
l
|
|
90
|
+
), u(e);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
function g(e) {
|
|
94
|
+
if (e === j) return "<>";
|
|
95
|
+
if (typeof e == "object" && e !== null && e.$$typeof === p)
|
|
96
|
+
return "<...>";
|
|
97
|
+
try {
|
|
98
|
+
var r = t(e);
|
|
99
|
+
return r ? "<" + r + ">" : "<...>";
|
|
100
|
+
} catch {
|
|
101
|
+
return "<...>";
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
function m() {
|
|
105
|
+
var e = R.A;
|
|
106
|
+
return e === null ? null : e.getOwner();
|
|
107
|
+
}
|
|
108
|
+
function b() {
|
|
109
|
+
return Error("react-stack-top-frame");
|
|
110
|
+
}
|
|
111
|
+
function E(e) {
|
|
112
|
+
if (F.call(e, "key")) {
|
|
113
|
+
var r = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
114
|
+
if (r && r.isReactWarning) return !1;
|
|
115
|
+
}
|
|
116
|
+
return e.key !== void 0;
|
|
117
|
+
}
|
|
118
|
+
function x(e, r) {
|
|
119
|
+
function o() {
|
|
120
|
+
V || (V = !0, console.error(
|
|
121
|
+
"%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)",
|
|
122
|
+
r
|
|
123
|
+
));
|
|
124
|
+
}
|
|
125
|
+
o.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
126
|
+
get: o,
|
|
127
|
+
configurable: !0
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
function A() {
|
|
131
|
+
var e = t(this.type);
|
|
132
|
+
return X[e] || (X[e] = !0, console.error(
|
|
133
|
+
"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."
|
|
134
|
+
)), e = this.props.ref, e !== void 0 ? e : null;
|
|
135
|
+
}
|
|
136
|
+
function Y(e, r, o, l, C, J) {
|
|
137
|
+
var c = o.ref;
|
|
138
|
+
return e = {
|
|
139
|
+
$$typeof: _,
|
|
140
|
+
type: e,
|
|
141
|
+
key: r,
|
|
142
|
+
props: o,
|
|
143
|
+
_owner: l
|
|
144
|
+
}, (c !== void 0 ? c : null) !== null ? Object.defineProperty(e, "ref", {
|
|
145
|
+
enumerable: !1,
|
|
146
|
+
get: A
|
|
147
|
+
}) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
|
|
148
|
+
configurable: !1,
|
|
149
|
+
enumerable: !1,
|
|
150
|
+
writable: !0,
|
|
151
|
+
value: 0
|
|
152
|
+
}), Object.defineProperty(e, "_debugInfo", {
|
|
153
|
+
configurable: !1,
|
|
154
|
+
enumerable: !1,
|
|
155
|
+
writable: !0,
|
|
156
|
+
value: null
|
|
157
|
+
}), Object.defineProperty(e, "_debugStack", {
|
|
158
|
+
configurable: !1,
|
|
159
|
+
enumerable: !1,
|
|
160
|
+
writable: !0,
|
|
161
|
+
value: C
|
|
162
|
+
}), Object.defineProperty(e, "_debugTask", {
|
|
163
|
+
configurable: !1,
|
|
164
|
+
enumerable: !1,
|
|
165
|
+
writable: !0,
|
|
166
|
+
value: J
|
|
167
|
+
}), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
|
|
168
|
+
}
|
|
169
|
+
function I(e, r, o, l, C, J) {
|
|
170
|
+
var c = r.children;
|
|
171
|
+
if (c !== void 0)
|
|
172
|
+
if (l)
|
|
173
|
+
if (q(c)) {
|
|
174
|
+
for (l = 0; l < c.length; l++)
|
|
175
|
+
S(c[l]);
|
|
176
|
+
Object.freeze && Object.freeze(c);
|
|
177
|
+
} else
|
|
178
|
+
console.error(
|
|
179
|
+
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
180
|
+
);
|
|
181
|
+
else S(c);
|
|
182
|
+
if (F.call(r, "key")) {
|
|
183
|
+
c = t(e);
|
|
184
|
+
var w = Object.keys(r).filter(function(re) {
|
|
185
|
+
return re !== "key";
|
|
186
|
+
});
|
|
187
|
+
l = 0 < w.length ? "{key: someKey, " + w.join(": ..., ") + ": ...}" : "{key: someKey}", Q[c + l] || (w = 0 < w.length ? "{" + w.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
188
|
+
`A props object containing a "key" prop is being spread into JSX:
|
|
189
|
+
let props = %s;
|
|
190
|
+
<%s {...props} />
|
|
191
|
+
React keys must be passed directly to JSX without using spread:
|
|
192
|
+
let props = %s;
|
|
193
|
+
<%s key={someKey} {...props} />`,
|
|
194
|
+
l,
|
|
195
|
+
c,
|
|
196
|
+
w,
|
|
197
|
+
c
|
|
198
|
+
), Q[c + l] = !0);
|
|
199
|
+
}
|
|
200
|
+
if (c = null, o !== void 0 && (f(o), c = "" + o), E(r) && (f(r.key), c = "" + r.key), "key" in r) {
|
|
201
|
+
o = {};
|
|
202
|
+
for (var U in r)
|
|
203
|
+
U !== "key" && (o[U] = r[U]);
|
|
204
|
+
} else o = r;
|
|
205
|
+
return c && x(
|
|
206
|
+
o,
|
|
207
|
+
typeof e == "function" ? e.displayName || e.name || "Unknown" : e
|
|
208
|
+
), Y(
|
|
209
|
+
e,
|
|
210
|
+
c,
|
|
211
|
+
o,
|
|
212
|
+
m(),
|
|
213
|
+
C,
|
|
214
|
+
J
|
|
215
|
+
);
|
|
216
|
+
}
|
|
217
|
+
function S(e) {
|
|
218
|
+
v(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e !== null && e.$$typeof === p && (e._payload.status === "fulfilled" ? v(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
|
|
219
|
+
}
|
|
220
|
+
function v(e) {
|
|
221
|
+
return typeof e == "object" && e !== null && e.$$typeof === _;
|
|
222
|
+
}
|
|
223
|
+
var h = ne, _ = /* @__PURE__ */ Symbol.for("react.transitional.element"), y = /* @__PURE__ */ Symbol.for("react.portal"), j = /* @__PURE__ */ Symbol.for("react.fragment"), P = /* @__PURE__ */ Symbol.for("react.strict_mode"), L = /* @__PURE__ */ Symbol.for("react.profiler"), G = /* @__PURE__ */ Symbol.for("react.consumer"), n = /* @__PURE__ */ Symbol.for("react.context"), s = /* @__PURE__ */ Symbol.for("react.forward_ref"), d = /* @__PURE__ */ Symbol.for("react.suspense"), i = /* @__PURE__ */ Symbol.for("react.suspense_list"), T = /* @__PURE__ */ Symbol.for("react.memo"), p = /* @__PURE__ */ Symbol.for("react.lazy"), W = /* @__PURE__ */ Symbol.for("react.activity"), k = /* @__PURE__ */ Symbol.for("react.client.reference"), R = h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, F = Object.prototype.hasOwnProperty, q = Array.isArray, N = console.createTask ? console.createTask : function() {
|
|
224
|
+
return null;
|
|
225
|
+
};
|
|
226
|
+
h = {
|
|
227
|
+
react_stack_bottom_frame: function(e) {
|
|
228
|
+
return e();
|
|
229
|
+
}
|
|
230
|
+
};
|
|
231
|
+
var V, X = {}, B = h.react_stack_bottom_frame.bind(
|
|
232
|
+
h,
|
|
233
|
+
b
|
|
234
|
+
)(), H = N(g(b)), Q = {};
|
|
235
|
+
O.Fragment = j, O.jsx = function(e, r, o) {
|
|
236
|
+
var l = 1e4 > R.recentlyCreatedOwnerStacks++;
|
|
237
|
+
return I(
|
|
238
|
+
e,
|
|
239
|
+
r,
|
|
240
|
+
o,
|
|
241
|
+
!1,
|
|
242
|
+
l ? Error("react-stack-top-frame") : B,
|
|
243
|
+
l ? N(g(e)) : H
|
|
244
|
+
);
|
|
245
|
+
}, O.jsxs = function(e, r, o) {
|
|
246
|
+
var l = 1e4 > R.recentlyCreatedOwnerStacks++;
|
|
247
|
+
return I(
|
|
248
|
+
e,
|
|
249
|
+
r,
|
|
250
|
+
o,
|
|
251
|
+
!0,
|
|
252
|
+
l ? Error("react-stack-top-frame") : B,
|
|
253
|
+
l ? N(g(e)) : H
|
|
254
|
+
);
|
|
255
|
+
};
|
|
256
|
+
})()), O;
|
|
257
|
+
}
|
|
258
|
+
var te;
|
|
259
|
+
function ie() {
|
|
260
|
+
return te || (te = 1, process.env.NODE_ENV === "production" ? $.exports = se() : $.exports = oe()), $.exports;
|
|
261
|
+
}
|
|
262
|
+
var a = ie();
|
|
263
|
+
function le(t) {
|
|
264
|
+
return t.data ? t.data : t.staticData ? {
|
|
265
|
+
provider: "value",
|
|
266
|
+
items: t.staticData
|
|
267
|
+
} : t.objectName ? {
|
|
268
|
+
provider: "object",
|
|
269
|
+
object: t.objectName
|
|
270
|
+
} : null;
|
|
271
|
+
}
|
|
272
|
+
function ce(t) {
|
|
273
|
+
if (t) {
|
|
274
|
+
if (typeof t == "string") {
|
|
275
|
+
const u = t.split(" "), f = u[0], g = u[1]?.toLowerCase() === "desc" ? "desc" : "asc";
|
|
276
|
+
return { [f]: g };
|
|
277
|
+
}
|
|
278
|
+
if (Array.isArray(t))
|
|
279
|
+
return t.reduce((u, f) => (f.field && f.order && (u[f.field] = f.order), u), {});
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
function ue(t) {
|
|
283
|
+
return t.filter && typeof t.filter == "object" && "gantt" in t.filter ? t.filter.gantt : t.gantt ? t.gantt : null;
|
|
284
|
+
}
|
|
285
|
+
const de = ({
|
|
286
|
+
schema: t,
|
|
287
|
+
dataSource: u,
|
|
288
|
+
className: f,
|
|
289
|
+
onTaskClick: g
|
|
290
|
+
}) => {
|
|
291
|
+
const [m, b] = M([]), [E, x] = M(!0), [A, Y] = M(null), [I, S] = M(null), v = le(t), h = ue(t), _ = v?.provider === "value";
|
|
292
|
+
Z(() => {
|
|
293
|
+
(async () => {
|
|
294
|
+
try {
|
|
295
|
+
if (x(!0), _ && v?.provider === "value") {
|
|
296
|
+
b(v.items), x(!1);
|
|
297
|
+
return;
|
|
298
|
+
}
|
|
299
|
+
if (!u)
|
|
300
|
+
throw new Error("DataSource required for object/api providers");
|
|
301
|
+
if (v?.provider === "object") {
|
|
302
|
+
const s = v.object, d = await u.find(s, {
|
|
303
|
+
$filter: t.filter,
|
|
304
|
+
$orderby: ce(t.sort)
|
|
305
|
+
});
|
|
306
|
+
b(d?.data || []);
|
|
307
|
+
} else v?.provider === "api" && (console.warn("API provider not yet implemented for ObjectGantt"), b([]));
|
|
308
|
+
x(!1);
|
|
309
|
+
} catch (s) {
|
|
310
|
+
Y(s), x(!1);
|
|
311
|
+
}
|
|
312
|
+
})();
|
|
313
|
+
}, [v, u, _, t.filter, t.sort]), Z(() => {
|
|
314
|
+
!_ && u && (async () => {
|
|
315
|
+
try {
|
|
316
|
+
if (!u) return;
|
|
317
|
+
const s = v?.provider === "object" ? v.object : t.objectName;
|
|
318
|
+
if (!s) return;
|
|
319
|
+
const d = await u.getObjectSchema(s);
|
|
320
|
+
S(d);
|
|
321
|
+
} catch (s) {
|
|
322
|
+
console.error("Failed to fetch object schema:", s);
|
|
323
|
+
}
|
|
324
|
+
})();
|
|
325
|
+
}, [t.objectName, u, _, v]);
|
|
326
|
+
const y = z(() => {
|
|
327
|
+
if (!h || !m.length)
|
|
328
|
+
return [];
|
|
329
|
+
const { startDateField: n, endDateField: s, titleField: d, progressField: i, dependenciesField: T } = h;
|
|
330
|
+
return m.map((p, W) => {
|
|
331
|
+
const k = p[n], R = p[s], F = p[d] || "Untitled Task", q = i ? p[i] : 0, N = T ? p[T] : [];
|
|
332
|
+
return {
|
|
333
|
+
id: p.id || p._id || `task-${W}`,
|
|
334
|
+
title: F,
|
|
335
|
+
start: k ? new Date(k) : /* @__PURE__ */ new Date(),
|
|
336
|
+
end: R ? new Date(R) : /* @__PURE__ */ new Date(),
|
|
337
|
+
progress: Math.min(100, Math.max(0, q || 0)),
|
|
338
|
+
// Clamp between 0-100
|
|
339
|
+
dependencies: Array.isArray(N) ? N : [],
|
|
340
|
+
data: p
|
|
341
|
+
};
|
|
342
|
+
}).filter((p) => !isNaN(p.start.getTime()) && !isNaN(p.end.getTime()));
|
|
343
|
+
}, [m, h]), j = z(() => {
|
|
344
|
+
if (!y.length) {
|
|
345
|
+
const i = /* @__PURE__ */ new Date();
|
|
346
|
+
return {
|
|
347
|
+
start: new Date(i.getFullYear(), i.getMonth(), 1),
|
|
348
|
+
end: new Date(i.getFullYear(), i.getMonth() + 3, 0)
|
|
349
|
+
};
|
|
350
|
+
}
|
|
351
|
+
const n = y.flatMap((i) => [i.start, i.end]), s = new Date(Math.min(...n.map((i) => i.getTime()))), d = new Date(Math.max(...n.map((i) => i.getTime())));
|
|
352
|
+
return s.setDate(s.getDate() - 7), d.setDate(d.getDate() + 7), { start: s, end: d };
|
|
353
|
+
}, [y]), P = z(() => {
|
|
354
|
+
const n = [], s = new Date(j.start);
|
|
355
|
+
for (s.setDate(1); s <= j.end; )
|
|
356
|
+
n.push(new Date(s)), s.setMonth(s.getMonth() + 1);
|
|
357
|
+
return n;
|
|
358
|
+
}, [j]), L = (n) => {
|
|
359
|
+
const s = (j.end.getTime() - j.start.getTime()) / 864e5, d = (n.start.getTime() - j.start.getTime()) / (1e3 * 60 * 60 * 24), i = (n.end.getTime() - n.start.getTime()) / (1e3 * 60 * 60 * 24);
|
|
360
|
+
return {
|
|
361
|
+
left: `${d / s * 100}%`,
|
|
362
|
+
width: `${i / s * 100}%`
|
|
363
|
+
};
|
|
364
|
+
};
|
|
365
|
+
if (E)
|
|
366
|
+
return /* @__PURE__ */ a.jsx("div", { className: f, children: /* @__PURE__ */ a.jsx("div", { className: "flex items-center justify-center h-96", children: /* @__PURE__ */ a.jsx("div", { className: "text-muted-foreground", children: "Loading Gantt chart..." }) }) });
|
|
367
|
+
if (A)
|
|
368
|
+
return /* @__PURE__ */ a.jsx("div", { className: f, children: /* @__PURE__ */ a.jsx("div", { className: "flex items-center justify-center h-96", children: /* @__PURE__ */ a.jsxs("div", { className: "text-destructive", children: [
|
|
369
|
+
"Error: ",
|
|
370
|
+
A.message
|
|
371
|
+
] }) }) });
|
|
372
|
+
if (!h)
|
|
373
|
+
return /* @__PURE__ */ a.jsx("div", { className: f, children: /* @__PURE__ */ a.jsx("div", { className: "flex items-center justify-center h-96", children: /* @__PURE__ */ a.jsx("div", { className: "text-muted-foreground", children: "Gantt configuration required. Please specify startDateField, endDateField, and titleField." }) }) });
|
|
374
|
+
const G = [
|
|
375
|
+
"Jan",
|
|
376
|
+
"Feb",
|
|
377
|
+
"Mar",
|
|
378
|
+
"Apr",
|
|
379
|
+
"May",
|
|
380
|
+
"Jun",
|
|
381
|
+
"Jul",
|
|
382
|
+
"Aug",
|
|
383
|
+
"Sep",
|
|
384
|
+
"Oct",
|
|
385
|
+
"Nov",
|
|
386
|
+
"Dec"
|
|
387
|
+
];
|
|
388
|
+
return /* @__PURE__ */ a.jsx("div", { className: f, children: /* @__PURE__ */ a.jsx("div", { className: "border rounded-lg bg-background overflow-hidden", children: /* @__PURE__ */ a.jsxs("div", { className: "flex", children: [
|
|
389
|
+
/* @__PURE__ */ a.jsxs("div", { className: "w-64 border-r flex-shrink-0", children: [
|
|
390
|
+
/* @__PURE__ */ a.jsx("div", { className: "border-b p-3 font-semibold bg-muted", children: "Tasks" }),
|
|
391
|
+
/* @__PURE__ */ a.jsx("div", { children: y.map((n) => /* @__PURE__ */ a.jsxs(
|
|
392
|
+
"div",
|
|
393
|
+
{
|
|
394
|
+
className: "border-b p-3 hover:bg-muted/50 cursor-pointer",
|
|
395
|
+
onClick: () => g?.(n.data),
|
|
396
|
+
children: [
|
|
397
|
+
/* @__PURE__ */ a.jsx("div", { className: "font-medium text-sm truncate", children: n.title }),
|
|
398
|
+
/* @__PURE__ */ a.jsxs("div", { className: "text-xs text-muted-foreground mt-1", children: [
|
|
399
|
+
n.start.toLocaleDateString(),
|
|
400
|
+
" - ",
|
|
401
|
+
n.end.toLocaleDateString()
|
|
402
|
+
] }),
|
|
403
|
+
n.progress > 0 && /* @__PURE__ */ a.jsxs("div", { className: "mt-2", children: [
|
|
404
|
+
/* @__PURE__ */ a.jsxs("div", { className: "flex justify-between text-xs mb-1", children: [
|
|
405
|
+
/* @__PURE__ */ a.jsx("span", { children: "Progress" }),
|
|
406
|
+
/* @__PURE__ */ a.jsxs("span", { children: [
|
|
407
|
+
n.progress,
|
|
408
|
+
"%"
|
|
409
|
+
] })
|
|
410
|
+
] }),
|
|
411
|
+
/* @__PURE__ */ a.jsx("div", { className: "h-1.5 bg-muted rounded-full overflow-hidden", children: /* @__PURE__ */ a.jsx(
|
|
412
|
+
"div",
|
|
413
|
+
{
|
|
414
|
+
className: "h-full bg-primary",
|
|
415
|
+
style: { width: `${n.progress}%` }
|
|
416
|
+
}
|
|
417
|
+
) })
|
|
418
|
+
] })
|
|
419
|
+
]
|
|
420
|
+
},
|
|
421
|
+
n.id
|
|
422
|
+
)) })
|
|
423
|
+
] }),
|
|
424
|
+
/* @__PURE__ */ a.jsxs("div", { className: "flex-1 overflow-x-auto", children: [
|
|
425
|
+
/* @__PURE__ */ a.jsx("div", { className: "border-b bg-muted sticky top-0 z-10", children: /* @__PURE__ */ a.jsx("div", { className: "flex", children: P.map((n, s) => {
|
|
426
|
+
const d = new Date(
|
|
427
|
+
n.getFullYear(),
|
|
428
|
+
n.getMonth() + 1,
|
|
429
|
+
0
|
|
430
|
+
).getDate();
|
|
431
|
+
return /* @__PURE__ */ a.jsxs(
|
|
432
|
+
"div",
|
|
433
|
+
{
|
|
434
|
+
className: "border-r p-3 text-center font-semibold text-sm",
|
|
435
|
+
style: { minWidth: `${d * 20}px` },
|
|
436
|
+
children: [
|
|
437
|
+
G[n.getMonth()],
|
|
438
|
+
" ",
|
|
439
|
+
n.getFullYear()
|
|
440
|
+
]
|
|
441
|
+
},
|
|
442
|
+
s
|
|
443
|
+
);
|
|
444
|
+
}) }) }),
|
|
445
|
+
/* @__PURE__ */ a.jsx("div", { className: "relative", children: y.map((n) => {
|
|
446
|
+
const s = L(n);
|
|
447
|
+
return /* @__PURE__ */ a.jsxs(
|
|
448
|
+
"div",
|
|
449
|
+
{
|
|
450
|
+
className: "border-b relative",
|
|
451
|
+
style: { height: "60px" },
|
|
452
|
+
children: [
|
|
453
|
+
/* @__PURE__ */ a.jsx("div", { className: "absolute inset-0 flex pointer-events-none", children: P.map((d, i) => {
|
|
454
|
+
const T = new Date(
|
|
455
|
+
d.getFullYear(),
|
|
456
|
+
d.getMonth() + 1,
|
|
457
|
+
0
|
|
458
|
+
).getDate();
|
|
459
|
+
return /* @__PURE__ */ a.jsx(
|
|
460
|
+
"div",
|
|
461
|
+
{
|
|
462
|
+
className: "border-r",
|
|
463
|
+
style: { minWidth: `${T * 20}px` }
|
|
464
|
+
},
|
|
465
|
+
i
|
|
466
|
+
);
|
|
467
|
+
}) }),
|
|
468
|
+
/* @__PURE__ */ a.jsxs(
|
|
469
|
+
"div",
|
|
470
|
+
{
|
|
471
|
+
className: "absolute top-1/2 -translate-y-1/2 h-8 bg-primary/80 rounded cursor-pointer hover:bg-primary transition-colors flex items-center px-2 text-white text-xs font-medium overflow-hidden",
|
|
472
|
+
style: s,
|
|
473
|
+
onClick: () => g?.(n.data),
|
|
474
|
+
children: [
|
|
475
|
+
n.progress > 0 && /* @__PURE__ */ a.jsx(
|
|
476
|
+
"div",
|
|
477
|
+
{
|
|
478
|
+
className: "absolute inset-0 bg-primary-foreground/20",
|
|
479
|
+
style: { width: `${n.progress}%` }
|
|
480
|
+
}
|
|
481
|
+
),
|
|
482
|
+
/* @__PURE__ */ a.jsx("span", { className: "relative z-10 truncate", children: n.title })
|
|
483
|
+
]
|
|
484
|
+
}
|
|
485
|
+
)
|
|
486
|
+
]
|
|
487
|
+
},
|
|
488
|
+
n.id
|
|
489
|
+
);
|
|
490
|
+
}) })
|
|
491
|
+
] })
|
|
492
|
+
] }) }) });
|
|
493
|
+
}, fe = ({ schema: t }) => /* @__PURE__ */ a.jsx(de, { schema: t, dataSource: null });
|
|
494
|
+
ae.register("object-gantt", fe, {
|
|
495
|
+
label: "Object Gantt",
|
|
496
|
+
category: "plugin",
|
|
497
|
+
inputs: [
|
|
498
|
+
{ name: "objectName", type: "string", label: "Object Name", required: !0 },
|
|
499
|
+
{ name: "gantt", type: "object", label: "Gantt Config", description: "startDateField, endDateField, titleField, progressField, dependenciesField" }
|
|
500
|
+
]
|
|
501
|
+
});
|
|
502
|
+
export {
|
|
503
|
+
de as ObjectGantt
|
|
504
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
(function(y,b){typeof exports=="object"&&typeof module<"u"?b(exports,require("react"),require("@object-ui/core")):typeof define=="function"&&define.amd?define(["exports","react","@object-ui/core"],b):(y=typeof globalThis<"u"?globalThis:y||self,b(y.ObjectUIPluginGantt={},y.React,y.ObjectUICore))})(this,(function(y,b,re){"use strict";var P={exports:{}},S={};var X;function ne(){if(X)return S;X=1;var t=Symbol.for("react.transitional.element"),u=Symbol.for("react.fragment");function f(j,m,v){var _=null;if(v!==void 0&&(_=""+v),m.key!==void 0&&(_=""+m.key),"key"in m){v={};for(var x in m)x!=="key"&&(v[x]=m[x])}else v=m;return m=v.ref,{$$typeof:t,type:j,key:_,ref:m!==void 0?m:null,props:v}}return S.Fragment=u,S.jsx=f,S.jsxs=f,S}var A={};var q;function ae(){return q||(q=1,process.env.NODE_ENV!=="production"&&(function(){function t(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===M?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case h:return"Fragment";case U:return"Profiler";case C:return"StrictMode";case d:return"Suspense";case i:return"SuspenseList";case J:return"Activity"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case R:return"Portal";case a:return e.displayName||"Context";case W:return(e._context.displayName||"Context")+".Consumer";case s:var r=e.render;return e=e.displayName,e||(e=r.displayName||r.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case N:return r=e.displayName||null,r!==null?r:t(e.type)||"Memo";case p:r=e._payload,e=e._init;try{return t(e(r))}catch{}}return null}function u(e){return""+e}function f(e){try{u(e);var r=!1}catch{r=!0}if(r){r=console;var o=r.error,l=typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return o.call(r,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",l),u(e)}}function j(e){if(e===h)return"<>";if(typeof e=="object"&&e!==null&&e.$$typeof===p)return"<...>";try{var r=t(e);return r?"<"+r+">":"<...>"}catch{return"<...>"}}function m(){var e=w.A;return e===null?null:e.getOwner()}function v(){return Error("react-stack-top-frame")}function _(e){if(Y.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function x(e,r){function o(){Q||(Q=!0,console.error("%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)",r))}o.isReactWarning=!0,Object.defineProperty(e,"key",{get:o,configurable:!0})}function k(){var e=t(this.type);return Z[e]||(Z[e]=!0,console.error("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.")),e=this.props.ref,e!==void 0?e:null}function G(e,r,o,l,I,V){var c=o.ref;return e={$$typeof:T,type:e,key:r,props:o,_owner:l},(c!==void 0?c:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:k}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:I}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:V}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function L(e,r,o,l,I,V){var c=r.children;if(c!==void 0)if(l)if(z(c)){for(l=0;l<c.length;l++)F(c[l]);Object.freeze&&Object.freeze(c)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else F(c);if(Y.call(r,"key")){c=t(e);var O=Object.keys(r).filter(function(ue){return ue!=="key"});l=0<O.length?"{key: someKey, "+O.join(": ..., ")+": ...}":"{key: someKey}",te[c+l]||(O=0<O.length?"{"+O.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
2
|
+
let props = %s;
|
|
3
|
+
<%s {...props} />
|
|
4
|
+
React keys must be passed directly to JSX without using spread:
|
|
5
|
+
let props = %s;
|
|
6
|
+
<%s key={someKey} {...props} />`,l,c,O,c),te[c+l]=!0)}if(c=null,o!==void 0&&(f(o),c=""+o),_(r)&&(f(r.key),c=""+r.key),"key"in r){o={};for(var $ in r)$!=="key"&&(o[$]=r[$])}else o=r;return c&&x(o,typeof e=="function"?e.displayName||e.name||"Unknown":e),G(e,c,o,m(),I,V)}function F(e){g(e)?e._store&&(e._store.validated=1):typeof e=="object"&&e!==null&&e.$$typeof===p&&(e._payload.status==="fulfilled"?g(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1))}function g(e){return typeof e=="object"&&e!==null&&e.$$typeof===T}var E=b,T=Symbol.for("react.transitional.element"),R=Symbol.for("react.portal"),h=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),U=Symbol.for("react.profiler"),W=Symbol.for("react.consumer"),a=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),i=Symbol.for("react.suspense_list"),N=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),J=Symbol.for("react.activity"),M=Symbol.for("react.client.reference"),w=E.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y=Object.prototype.hasOwnProperty,z=Array.isArray,D=console.createTask?console.createTask:function(){return null};E={react_stack_bottom_frame:function(e){return e()}};var Q,Z={},K=E.react_stack_bottom_frame.bind(E,v)(),ee=D(j(v)),te={};A.Fragment=h,A.jsx=function(e,r,o){var l=1e4>w.recentlyCreatedOwnerStacks++;return L(e,r,o,!1,l?Error("react-stack-top-frame"):K,l?D(j(e)):ee)},A.jsxs=function(e,r,o){var l=1e4>w.recentlyCreatedOwnerStacks++;return L(e,r,o,!0,l?Error("react-stack-top-frame"):K,l?D(j(e)):ee)}})()),A}var B;function se(){return B||(B=1,process.env.NODE_ENV==="production"?P.exports=ne():P.exports=ae()),P.exports}var n=se();function oe(t){return t.data?t.data:t.staticData?{provider:"value",items:t.staticData}:t.objectName?{provider:"object",object:t.objectName}:null}function ie(t){if(t){if(typeof t=="string"){const u=t.split(" "),f=u[0],j=u[1]?.toLowerCase()==="desc"?"desc":"asc";return{[f]:j}}if(Array.isArray(t))return t.reduce((u,f)=>(f.field&&f.order&&(u[f.field]=f.order),u),{})}}function le(t){return t.filter&&typeof t.filter=="object"&&"gantt"in t.filter?t.filter.gantt:t.gantt?t.gantt:null}const H=({schema:t,dataSource:u,className:f,onTaskClick:j})=>{const[m,v]=b.useState([]),[_,x]=b.useState(!0),[k,G]=b.useState(null),[L,F]=b.useState(null),g=oe(t),E=le(t),T=g?.provider==="value";b.useEffect(()=>{(async()=>{try{if(x(!0),T&&g?.provider==="value"){v(g.items),x(!1);return}if(!u)throw new Error("DataSource required for object/api providers");if(g?.provider==="object"){const s=g.object,d=await u.find(s,{$filter:t.filter,$orderby:ie(t.sort)});v(d?.data||[])}else g?.provider==="api"&&(console.warn("API provider not yet implemented for ObjectGantt"),v([]));x(!1)}catch(s){G(s),x(!1)}})()},[g,u,T,t.filter,t.sort]),b.useEffect(()=>{!T&&u&&(async()=>{try{if(!u)return;const s=g?.provider==="object"?g.object:t.objectName;if(!s)return;const d=await u.getObjectSchema(s);F(d)}catch(s){console.error("Failed to fetch object schema:",s)}})()},[t.objectName,u,T,g]);const R=b.useMemo(()=>{if(!E||!m.length)return[];const{startDateField:a,endDateField:s,titleField:d,progressField:i,dependenciesField:N}=E;return m.map((p,J)=>{const M=p[a],w=p[s],Y=p[d]||"Untitled Task",z=i?p[i]:0,D=N?p[N]:[];return{id:p.id||p._id||`task-${J}`,title:Y,start:M?new Date(M):new Date,end:w?new Date(w):new Date,progress:Math.min(100,Math.max(0,z||0)),dependencies:Array.isArray(D)?D:[],data:p}}).filter(p=>!isNaN(p.start.getTime())&&!isNaN(p.end.getTime()))},[m,E]),h=b.useMemo(()=>{if(!R.length){const i=new Date;return{start:new Date(i.getFullYear(),i.getMonth(),1),end:new Date(i.getFullYear(),i.getMonth()+3,0)}}const a=R.flatMap(i=>[i.start,i.end]),s=new Date(Math.min(...a.map(i=>i.getTime()))),d=new Date(Math.max(...a.map(i=>i.getTime())));return s.setDate(s.getDate()-7),d.setDate(d.getDate()+7),{start:s,end:d}},[R]),C=b.useMemo(()=>{const a=[],s=new Date(h.start);for(s.setDate(1);s<=h.end;)a.push(new Date(s)),s.setMonth(s.getMonth()+1);return a},[h]),U=a=>{const s=(h.end.getTime()-h.start.getTime())/864e5,d=(a.start.getTime()-h.start.getTime())/(1e3*60*60*24),i=(a.end.getTime()-a.start.getTime())/(1e3*60*60*24);return{left:`${d/s*100}%`,width:`${i/s*100}%`}};if(_)return n.jsx("div",{className:f,children:n.jsx("div",{className:"flex items-center justify-center h-96",children:n.jsx("div",{className:"text-muted-foreground",children:"Loading Gantt chart..."})})});if(k)return n.jsx("div",{className:f,children:n.jsx("div",{className:"flex items-center justify-center h-96",children:n.jsxs("div",{className:"text-destructive",children:["Error: ",k.message]})})});if(!E)return n.jsx("div",{className:f,children:n.jsx("div",{className:"flex items-center justify-center h-96",children:n.jsx("div",{className:"text-muted-foreground",children:"Gantt configuration required. Please specify startDateField, endDateField, and titleField."})})});const W=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];return n.jsx("div",{className:f,children:n.jsx("div",{className:"border rounded-lg bg-background overflow-hidden",children:n.jsxs("div",{className:"flex",children:[n.jsxs("div",{className:"w-64 border-r flex-shrink-0",children:[n.jsx("div",{className:"border-b p-3 font-semibold bg-muted",children:"Tasks"}),n.jsx("div",{children:R.map(a=>n.jsxs("div",{className:"border-b p-3 hover:bg-muted/50 cursor-pointer",onClick:()=>j?.(a.data),children:[n.jsx("div",{className:"font-medium text-sm truncate",children:a.title}),n.jsxs("div",{className:"text-xs text-muted-foreground mt-1",children:[a.start.toLocaleDateString()," - ",a.end.toLocaleDateString()]}),a.progress>0&&n.jsxs("div",{className:"mt-2",children:[n.jsxs("div",{className:"flex justify-between text-xs mb-1",children:[n.jsx("span",{children:"Progress"}),n.jsxs("span",{children:[a.progress,"%"]})]}),n.jsx("div",{className:"h-1.5 bg-muted rounded-full overflow-hidden",children:n.jsx("div",{className:"h-full bg-primary",style:{width:`${a.progress}%`}})})]})]},a.id))})]}),n.jsxs("div",{className:"flex-1 overflow-x-auto",children:[n.jsx("div",{className:"border-b bg-muted sticky top-0 z-10",children:n.jsx("div",{className:"flex",children:C.map((a,s)=>{const d=new Date(a.getFullYear(),a.getMonth()+1,0).getDate();return n.jsxs("div",{className:"border-r p-3 text-center font-semibold text-sm",style:{minWidth:`${d*20}px`},children:[W[a.getMonth()]," ",a.getFullYear()]},s)})})}),n.jsx("div",{className:"relative",children:R.map(a=>{const s=U(a);return n.jsxs("div",{className:"border-b relative",style:{height:"60px"},children:[n.jsx("div",{className:"absolute inset-0 flex pointer-events-none",children:C.map((d,i)=>{const N=new Date(d.getFullYear(),d.getMonth()+1,0).getDate();return n.jsx("div",{className:"border-r",style:{minWidth:`${N*20}px`}},i)})}),n.jsxs("div",{className:"absolute top-1/2 -translate-y-1/2 h-8 bg-primary/80 rounded cursor-pointer hover:bg-primary transition-colors flex items-center px-2 text-white text-xs font-medium overflow-hidden",style:s,onClick:()=>j?.(a.data),children:[a.progress>0&&n.jsx("div",{className:"absolute inset-0 bg-primary-foreground/20",style:{width:`${a.progress}%`}}),n.jsx("span",{className:"relative z-10 truncate",children:a.title})]})]},a.id)})})]})]})})})},ce=({schema:t})=>n.jsx(H,{schema:t,dataSource:null});re.ComponentRegistry.register("object-gantt",ce,{label:"Object Gantt",category:"plugin",inputs:[{name:"objectName",type:"string",label:"Object Name",required:!0},{name:"gantt",type:"object",label:"Gantt Config",description:"startDateField, endDateField, titleField, progressField, dependenciesField"}]}),y.ObjectGantt=H,Object.defineProperty(y,Symbol.toStringTag,{value:"Module"})}));
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ObjectGridSchema, DataSource } from '@object-ui/types';
|
|
3
|
+
export interface ObjectGanttProps {
|
|
4
|
+
schema: ObjectGridSchema;
|
|
5
|
+
dataSource?: DataSource;
|
|
6
|
+
className?: string;
|
|
7
|
+
onTaskClick?: (record: any) => void;
|
|
8
|
+
onEdit?: (record: any) => void;
|
|
9
|
+
onDelete?: (record: any) => void;
|
|
10
|
+
}
|
|
11
|
+
export declare const ObjectGantt: React.FC<ObjectGanttProps>;
|
|
12
|
+
//# sourceMappingURL=ObjectGantt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ObjectGantt.d.ts","sourceRoot":"","sources":["../../src/ObjectGantt.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAuC,MAAM,OAAO,CAAC;AAC5D,OAAO,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAyB,MAAM,kBAAkB,CAAC;AAE5F,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,gBAAgB,CAAC;IACzB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,IAAI,CAAC;IACpC,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,IAAI,CAAC;IAC/B,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,IAAI,CAAC;CAClC;AAuED,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CA8SlD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEtD,OAAO,EAAE,WAAW,EAAE,CAAC;AACvB,YAAY,EAAE,gBAAgB,EAAE,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@object-ui/plugin-gantt",
|
|
3
|
+
"version": "0.3.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"description": "Gantt chart plugin for Object UI",
|
|
7
|
+
"homepage": "https://www.objectui.org",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "https://github.com/objectstack-ai/objectui.git",
|
|
11
|
+
"directory": "packages/plugin-gantt"
|
|
12
|
+
},
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/objectstack-ai/objectui/issues"
|
|
15
|
+
},
|
|
16
|
+
"main": "dist/index.umd.cjs",
|
|
17
|
+
"module": "dist/index.js",
|
|
18
|
+
"types": "dist/index.d.ts",
|
|
19
|
+
"exports": {
|
|
20
|
+
".": {
|
|
21
|
+
"types": "./dist/index.d.ts",
|
|
22
|
+
"import": "./dist/index.js",
|
|
23
|
+
"require": "./dist/index.umd.cjs"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"dependencies": {
|
|
27
|
+
"lucide-react": "^0.563.0",
|
|
28
|
+
"@object-ui/components": "0.3.0",
|
|
29
|
+
"@object-ui/core": "0.3.0",
|
|
30
|
+
"@object-ui/fields": "0.3.0",
|
|
31
|
+
"@object-ui/react": "0.3.0",
|
|
32
|
+
"@object-ui/types": "0.3.0"
|
|
33
|
+
},
|
|
34
|
+
"peerDependencies": {
|
|
35
|
+
"react": "^18.0.0 || ^19.0.0",
|
|
36
|
+
"react-dom": "^18.0.0 || ^19.0.0"
|
|
37
|
+
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"@types/react": "^19.2.9",
|
|
40
|
+
"@types/react-dom": "^19.2.3",
|
|
41
|
+
"@vitejs/plugin-react": "^4.2.1",
|
|
42
|
+
"typescript": "^5.9.3",
|
|
43
|
+
"vite": "^7.3.1",
|
|
44
|
+
"vite-plugin-dts": "^4.5.4"
|
|
45
|
+
},
|
|
46
|
+
"scripts": {
|
|
47
|
+
"build": "vite build",
|
|
48
|
+
"test": "vitest run",
|
|
49
|
+
"test:watch": "vitest",
|
|
50
|
+
"type-check": "tsc --noEmit",
|
|
51
|
+
"lint": "eslint ."
|
|
52
|
+
}
|
|
53
|
+
}
|