@object-ui/plugin-kanban 0.3.1 → 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.
- package/.turbo/turbo-build.log +20 -0
- package/dist/KanbanEnhanced-BqDEu7Z6.js +894 -0
- package/dist/KanbanImpl-B8nu2BvG.js +144 -0
- package/dist/index-CrR06na7.js +562 -0
- package/dist/index.js +6 -3
- package/dist/index.umd.cjs +6 -3
- package/dist/{KanbanImpl-CUWM-JC-.js → sortable.esm-ZHwgFQIO.js} +1053 -1183
- package/dist/src/KanbanEnhanced.d.ts +36 -0
- package/dist/src/KanbanEnhanced.d.ts.map +1 -0
- package/dist/src/ObjectKanban.d.ts +10 -0
- package/dist/src/ObjectKanban.d.ts.map +1 -0
- package/dist/src/index.d.ts +9 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/types.d.ts +21 -1
- package/dist/src/types.d.ts.map +1 -1
- package/package.json +11 -8
- package/src/KanbanEnhanced.tsx +394 -0
- package/src/ObjectKanban.msw.test.tsx +91 -0
- package/src/ObjectKanban.tsx +188 -0
- package/src/__tests__/KanbanEnhanced.test.tsx +259 -0
- package/src/index.test.ts +1 -1
- package/src/index.tsx +85 -2
- package/src/registration.test.tsx +26 -0
- package/src/types.ts +25 -0
- package/vite.config.ts +13 -0
- package/vitest.config.ts +12 -0
- package/vitest.setup.ts +1 -0
- package/dist/index-BV3FWhCb.js +0 -395
package/dist/index-BV3FWhCb.js
DELETED
|
@@ -1,395 +0,0 @@
|
|
|
1
|
-
import h, { Suspense as te } from "react";
|
|
2
|
-
import { ComponentRegistry as ae } from "@object-ui/core";
|
|
3
|
-
import { Skeleton as ne } from "@object-ui/components";
|
|
4
|
-
var R = { exports: {} }, b = {};
|
|
5
|
-
var F;
|
|
6
|
-
function oe() {
|
|
7
|
-
if (F) return b;
|
|
8
|
-
F = 1;
|
|
9
|
-
var l = /* @__PURE__ */ Symbol.for("react.transitional.element"), d = /* @__PURE__ */ Symbol.for("react.fragment");
|
|
10
|
-
function c(u, o, i) {
|
|
11
|
-
var s = null;
|
|
12
|
-
if (i !== void 0 && (s = "" + i), o.key !== void 0 && (s = "" + o.key), "key" in o) {
|
|
13
|
-
i = {};
|
|
14
|
-
for (var f in o)
|
|
15
|
-
f !== "key" && (i[f] = o[f]);
|
|
16
|
-
} else i = o;
|
|
17
|
-
return o = i.ref, {
|
|
18
|
-
$$typeof: l,
|
|
19
|
-
type: u,
|
|
20
|
-
key: s,
|
|
21
|
-
ref: o !== void 0 ? o : null,
|
|
22
|
-
props: i
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
return b.Fragment = d, b.jsx = c, b.jsxs = c, b;
|
|
26
|
-
}
|
|
27
|
-
var _ = {};
|
|
28
|
-
var $;
|
|
29
|
-
function se() {
|
|
30
|
-
return $ || ($ = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
31
|
-
function l(e) {
|
|
32
|
-
if (e == null) return null;
|
|
33
|
-
if (typeof e == "function")
|
|
34
|
-
return e.$$typeof === Q ? null : e.displayName || e.name || null;
|
|
35
|
-
if (typeof e == "string") return e;
|
|
36
|
-
switch (e) {
|
|
37
|
-
case T:
|
|
38
|
-
return "Fragment";
|
|
39
|
-
case J:
|
|
40
|
-
return "Profiler";
|
|
41
|
-
case q:
|
|
42
|
-
return "StrictMode";
|
|
43
|
-
case X:
|
|
44
|
-
return "Suspense";
|
|
45
|
-
case H:
|
|
46
|
-
return "SuspenseList";
|
|
47
|
-
case Z:
|
|
48
|
-
return "Activity";
|
|
49
|
-
}
|
|
50
|
-
if (typeof e == "object")
|
|
51
|
-
switch (typeof e.tag == "number" && console.error(
|
|
52
|
-
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
53
|
-
), e.$$typeof) {
|
|
54
|
-
case z:
|
|
55
|
-
return "Portal";
|
|
56
|
-
case G:
|
|
57
|
-
return e.displayName || "Context";
|
|
58
|
-
case V:
|
|
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 K:
|
|
64
|
-
return r = e.displayName || null, r !== null ? r : l(e.type) || "Memo";
|
|
65
|
-
case k:
|
|
66
|
-
r = e._payload, e = e._init;
|
|
67
|
-
try {
|
|
68
|
-
return l(e(r));
|
|
69
|
-
} catch {
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
return null;
|
|
73
|
-
}
|
|
74
|
-
function d(e) {
|
|
75
|
-
return "" + e;
|
|
76
|
-
}
|
|
77
|
-
function c(e) {
|
|
78
|
-
try {
|
|
79
|
-
d(e);
|
|
80
|
-
var r = !1;
|
|
81
|
-
} catch {
|
|
82
|
-
r = !0;
|
|
83
|
-
}
|
|
84
|
-
if (r) {
|
|
85
|
-
r = console;
|
|
86
|
-
var t = r.error, a = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
87
|
-
return t.call(
|
|
88
|
-
r,
|
|
89
|
-
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
90
|
-
a
|
|
91
|
-
), d(e);
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
function u(e) {
|
|
95
|
-
if (e === T) return "<>";
|
|
96
|
-
if (typeof e == "object" && e !== null && e.$$typeof === k)
|
|
97
|
-
return "<...>";
|
|
98
|
-
try {
|
|
99
|
-
var r = l(e);
|
|
100
|
-
return r ? "<" + r + ">" : "<...>";
|
|
101
|
-
} catch {
|
|
102
|
-
return "<...>";
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
function o() {
|
|
106
|
-
var e = y.A;
|
|
107
|
-
return e === null ? null : e.getOwner();
|
|
108
|
-
}
|
|
109
|
-
function i() {
|
|
110
|
-
return Error("react-stack-top-frame");
|
|
111
|
-
}
|
|
112
|
-
function s(e) {
|
|
113
|
-
if (C.call(e, "key")) {
|
|
114
|
-
var r = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
115
|
-
if (r && r.isReactWarning) return !1;
|
|
116
|
-
}
|
|
117
|
-
return e.key !== void 0;
|
|
118
|
-
}
|
|
119
|
-
function f(e, r) {
|
|
120
|
-
function t() {
|
|
121
|
-
N || (N = !0, console.error(
|
|
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
|
|
124
|
-
));
|
|
125
|
-
}
|
|
126
|
-
t.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
127
|
-
get: t,
|
|
128
|
-
configurable: !0
|
|
129
|
-
});
|
|
130
|
-
}
|
|
131
|
-
function p() {
|
|
132
|
-
var e = l(this.type);
|
|
133
|
-
return Y[e] || (Y[e] = !0, console.error(
|
|
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
|
-
)), e = this.props.ref, e !== void 0 ? e : null;
|
|
136
|
-
}
|
|
137
|
-
function U(e, r, t, a, E, A) {
|
|
138
|
-
var n = t.ref;
|
|
139
|
-
return e = {
|
|
140
|
-
$$typeof: j,
|
|
141
|
-
type: e,
|
|
142
|
-
key: r,
|
|
143
|
-
props: t,
|
|
144
|
-
_owner: a
|
|
145
|
-
}, (n !== void 0 ? n : null) !== null ? Object.defineProperty(e, "ref", {
|
|
146
|
-
enumerable: !1,
|
|
147
|
-
get: p
|
|
148
|
-
}) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
|
|
149
|
-
configurable: !1,
|
|
150
|
-
enumerable: !1,
|
|
151
|
-
writable: !0,
|
|
152
|
-
value: 0
|
|
153
|
-
}), Object.defineProperty(e, "_debugInfo", {
|
|
154
|
-
configurable: !1,
|
|
155
|
-
enumerable: !1,
|
|
156
|
-
writable: !0,
|
|
157
|
-
value: null
|
|
158
|
-
}), Object.defineProperty(e, "_debugStack", {
|
|
159
|
-
configurable: !1,
|
|
160
|
-
enumerable: !1,
|
|
161
|
-
writable: !0,
|
|
162
|
-
value: E
|
|
163
|
-
}), Object.defineProperty(e, "_debugTask", {
|
|
164
|
-
configurable: !1,
|
|
165
|
-
enumerable: !1,
|
|
166
|
-
writable: !0,
|
|
167
|
-
value: A
|
|
168
|
-
}), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
|
|
169
|
-
}
|
|
170
|
-
function P(e, r, t, a, E, A) {
|
|
171
|
-
var n = r.children;
|
|
172
|
-
if (n !== void 0)
|
|
173
|
-
if (a)
|
|
174
|
-
if (ee(n)) {
|
|
175
|
-
for (a = 0; a < n.length; a++)
|
|
176
|
-
w(n[a]);
|
|
177
|
-
Object.freeze && Object.freeze(n);
|
|
178
|
-
} else
|
|
179
|
-
console.error(
|
|
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
|
-
);
|
|
182
|
-
else w(n);
|
|
183
|
-
if (C.call(r, "key")) {
|
|
184
|
-
n = l(e);
|
|
185
|
-
var m = Object.keys(r).filter(function(re) {
|
|
186
|
-
return re !== "key";
|
|
187
|
-
});
|
|
188
|
-
a = 0 < m.length ? "{key: someKey, " + m.join(": ..., ") + ": ...}" : "{key: someKey}", M[n + a] || (m = 0 < m.length ? "{" + m.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
189
|
-
`A props object containing a "key" prop is being spread into JSX:
|
|
190
|
-
let props = %s;
|
|
191
|
-
<%s {...props} />
|
|
192
|
-
React keys must be passed directly to JSX without using spread:
|
|
193
|
-
let props = %s;
|
|
194
|
-
<%s key={someKey} {...props} />`,
|
|
195
|
-
a,
|
|
196
|
-
n,
|
|
197
|
-
m,
|
|
198
|
-
n
|
|
199
|
-
), M[n + a] = !0);
|
|
200
|
-
}
|
|
201
|
-
if (n = null, t !== void 0 && (c(t), n = "" + t), s(r) && (c(r.key), n = "" + r.key), "key" in r) {
|
|
202
|
-
t = {};
|
|
203
|
-
for (var O in r)
|
|
204
|
-
O !== "key" && (t[O] = r[O]);
|
|
205
|
-
} else t = r;
|
|
206
|
-
return n && f(
|
|
207
|
-
t,
|
|
208
|
-
typeof e == "function" ? e.displayName || e.name || "Unknown" : e
|
|
209
|
-
), U(
|
|
210
|
-
e,
|
|
211
|
-
n,
|
|
212
|
-
t,
|
|
213
|
-
o(),
|
|
214
|
-
E,
|
|
215
|
-
A
|
|
216
|
-
);
|
|
217
|
-
}
|
|
218
|
-
function w(e) {
|
|
219
|
-
x(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e !== null && e.$$typeof === k && (e._payload.status === "fulfilled" ? x(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
|
|
220
|
-
}
|
|
221
|
-
function x(e) {
|
|
222
|
-
return typeof e == "object" && e !== null && e.$$typeof === j;
|
|
223
|
-
}
|
|
224
|
-
var v = h, j = /* @__PURE__ */ Symbol.for("react.transitional.element"), z = /* @__PURE__ */ Symbol.for("react.portal"), T = /* @__PURE__ */ Symbol.for("react.fragment"), q = /* @__PURE__ */ Symbol.for("react.strict_mode"), J = /* @__PURE__ */ Symbol.for("react.profiler"), V = /* @__PURE__ */ Symbol.for("react.consumer"), G = /* @__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"), K = /* @__PURE__ */ Symbol.for("react.memo"), k = /* @__PURE__ */ Symbol.for("react.lazy"), Z = /* @__PURE__ */ Symbol.for("react.activity"), Q = /* @__PURE__ */ Symbol.for("react.client.reference"), y = v.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, C = Object.prototype.hasOwnProperty, ee = Array.isArray, g = console.createTask ? console.createTask : function() {
|
|
225
|
-
return null;
|
|
226
|
-
};
|
|
227
|
-
v = {
|
|
228
|
-
react_stack_bottom_frame: function(e) {
|
|
229
|
-
return e();
|
|
230
|
-
}
|
|
231
|
-
};
|
|
232
|
-
var N, Y = {}, I = v.react_stack_bottom_frame.bind(
|
|
233
|
-
v,
|
|
234
|
-
i
|
|
235
|
-
)(), D = g(u(i)), M = {};
|
|
236
|
-
_.Fragment = T, _.jsx = function(e, r, t) {
|
|
237
|
-
var a = 1e4 > y.recentlyCreatedOwnerStacks++;
|
|
238
|
-
return P(
|
|
239
|
-
e,
|
|
240
|
-
r,
|
|
241
|
-
t,
|
|
242
|
-
!1,
|
|
243
|
-
a ? Error("react-stack-top-frame") : I,
|
|
244
|
-
a ? g(u(e)) : D
|
|
245
|
-
);
|
|
246
|
-
}, _.jsxs = function(e, r, t) {
|
|
247
|
-
var a = 1e4 > y.recentlyCreatedOwnerStacks++;
|
|
248
|
-
return P(
|
|
249
|
-
e,
|
|
250
|
-
r,
|
|
251
|
-
t,
|
|
252
|
-
!0,
|
|
253
|
-
a ? Error("react-stack-top-frame") : I,
|
|
254
|
-
a ? g(u(e)) : D
|
|
255
|
-
);
|
|
256
|
-
};
|
|
257
|
-
})()), _;
|
|
258
|
-
}
|
|
259
|
-
var L;
|
|
260
|
-
function le() {
|
|
261
|
-
return L || (L = 1, process.env.NODE_ENV === "production" ? R.exports = oe() : R.exports = se()), R.exports;
|
|
262
|
-
}
|
|
263
|
-
var S = le();
|
|
264
|
-
const ie = h.lazy(() => import("./KanbanImpl-CUWM-JC-.js")), W = ({ schema: l }) => {
|
|
265
|
-
const d = h.useMemo(() => {
|
|
266
|
-
const { columns: c = [], data: u, groupBy: o } = l;
|
|
267
|
-
if (u && o && Array.isArray(u)) {
|
|
268
|
-
const i = u.reduce((s, f) => {
|
|
269
|
-
const p = f[o];
|
|
270
|
-
return s[p] || (s[p] = []), s[p].push(f), s;
|
|
271
|
-
}, {});
|
|
272
|
-
return c.map((s) => ({
|
|
273
|
-
...s,
|
|
274
|
-
cards: [
|
|
275
|
-
...s.cards || [],
|
|
276
|
-
// Preserve static cards
|
|
277
|
-
...i[s.id] || []
|
|
278
|
-
// Add dynamic cards
|
|
279
|
-
]
|
|
280
|
-
}));
|
|
281
|
-
}
|
|
282
|
-
return c;
|
|
283
|
-
}, [l]);
|
|
284
|
-
return /* @__PURE__ */ S.jsx(te, { fallback: /* @__PURE__ */ S.jsx(ne, { className: "w-full h-[600px]" }), children: /* @__PURE__ */ S.jsx(
|
|
285
|
-
ie,
|
|
286
|
-
{
|
|
287
|
-
columns: d,
|
|
288
|
-
onCardMove: l.onCardMove,
|
|
289
|
-
className: l.className
|
|
290
|
-
}
|
|
291
|
-
) });
|
|
292
|
-
};
|
|
293
|
-
ae.register(
|
|
294
|
-
"kanban",
|
|
295
|
-
W,
|
|
296
|
-
{
|
|
297
|
-
label: "Kanban Board",
|
|
298
|
-
icon: "LayoutDashboard",
|
|
299
|
-
category: "plugin",
|
|
300
|
-
inputs: [
|
|
301
|
-
{
|
|
302
|
-
name: "columns",
|
|
303
|
-
type: "array",
|
|
304
|
-
label: "Columns",
|
|
305
|
-
description: "Array of { id, title, cards, limit, className }",
|
|
306
|
-
required: !0
|
|
307
|
-
},
|
|
308
|
-
{
|
|
309
|
-
name: "onCardMove",
|
|
310
|
-
type: "code",
|
|
311
|
-
label: "On Card Move",
|
|
312
|
-
description: "Callback when a card is moved",
|
|
313
|
-
advanced: !0
|
|
314
|
-
},
|
|
315
|
-
{
|
|
316
|
-
name: "className",
|
|
317
|
-
type: "string",
|
|
318
|
-
label: "CSS Class"
|
|
319
|
-
}
|
|
320
|
-
],
|
|
321
|
-
defaultProps: {
|
|
322
|
-
columns: [
|
|
323
|
-
{
|
|
324
|
-
id: "todo",
|
|
325
|
-
title: "To Do",
|
|
326
|
-
cards: [
|
|
327
|
-
{
|
|
328
|
-
id: "card-1",
|
|
329
|
-
title: "Task 1",
|
|
330
|
-
description: "This is the first task",
|
|
331
|
-
badges: [
|
|
332
|
-
{ label: "High Priority", variant: "destructive" },
|
|
333
|
-
{ label: "Feature", variant: "default" }
|
|
334
|
-
]
|
|
335
|
-
},
|
|
336
|
-
{
|
|
337
|
-
id: "card-2",
|
|
338
|
-
title: "Task 2",
|
|
339
|
-
description: "This is the second task",
|
|
340
|
-
badges: [
|
|
341
|
-
{ label: "Bug", variant: "destructive" }
|
|
342
|
-
]
|
|
343
|
-
}
|
|
344
|
-
]
|
|
345
|
-
},
|
|
346
|
-
{
|
|
347
|
-
id: "in-progress",
|
|
348
|
-
title: "In Progress",
|
|
349
|
-
limit: 3,
|
|
350
|
-
cards: [
|
|
351
|
-
{
|
|
352
|
-
id: "card-3",
|
|
353
|
-
title: "Task 3",
|
|
354
|
-
description: "Currently working on this",
|
|
355
|
-
badges: [
|
|
356
|
-
{ label: "In Progress", variant: "default" }
|
|
357
|
-
]
|
|
358
|
-
}
|
|
359
|
-
]
|
|
360
|
-
},
|
|
361
|
-
{
|
|
362
|
-
id: "done",
|
|
363
|
-
title: "Done",
|
|
364
|
-
cards: [
|
|
365
|
-
{
|
|
366
|
-
id: "card-4",
|
|
367
|
-
title: "Task 4",
|
|
368
|
-
description: "This task is completed",
|
|
369
|
-
badges: [
|
|
370
|
-
{ label: "Completed", variant: "outline" }
|
|
371
|
-
]
|
|
372
|
-
},
|
|
373
|
-
{
|
|
374
|
-
id: "card-5",
|
|
375
|
-
title: "Task 5",
|
|
376
|
-
description: "Another completed task",
|
|
377
|
-
badges: [
|
|
378
|
-
{ label: "Completed", variant: "outline" }
|
|
379
|
-
]
|
|
380
|
-
}
|
|
381
|
-
]
|
|
382
|
-
}
|
|
383
|
-
],
|
|
384
|
-
className: "w-full"
|
|
385
|
-
}
|
|
386
|
-
}
|
|
387
|
-
);
|
|
388
|
-
const de = {
|
|
389
|
-
kanban: W
|
|
390
|
-
};
|
|
391
|
-
export {
|
|
392
|
-
W as K,
|
|
393
|
-
S as j,
|
|
394
|
-
de as k
|
|
395
|
-
};
|