@object-ui/plugin-kanban 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.
- package/.turbo/turbo-build.log +7 -7
- package/CHANGELOG.md +14 -0
- package/dist/{KanbanEnhanced-BqDEu7Z6.js → KanbanEnhanced-BMreTWOT.js} +1 -1
- package/dist/{KanbanImpl-B8nu2BvG.js → KanbanImpl--kTNN_B8.js} +1 -1
- package/dist/{index-CrR06na7.js → index-a4_RI-v7.js} +221 -204
- package/dist/index.js +1 -1
- package/dist/index.umd.cjs +4 -4
- package/dist/src/index.d.ts.map +1 -1
- package/package.json +7 -7
- package/src/index.test.ts +8 -8
- package/src/index.tsx +27 -4
|
@@ -1,69 +1,69 @@
|
|
|
1
|
-
import N, { useState as
|
|
2
|
-
import { ComponentRegistry as
|
|
3
|
-
import { useDataScope as
|
|
1
|
+
import N, { useState as x, useEffect as W, useMemo as J, Suspense as Z } from "react";
|
|
2
|
+
import { ComponentRegistry as P } from "@object-ui/core";
|
|
3
|
+
import { useDataScope as de, useSchemaContext as fe } from "@object-ui/react";
|
|
4
4
|
import { Skeleton as Q } from "@object-ui/components";
|
|
5
|
-
var
|
|
5
|
+
var h = { exports: {} }, A = {};
|
|
6
6
|
var G;
|
|
7
|
-
function
|
|
8
|
-
if (G) return
|
|
7
|
+
function be() {
|
|
8
|
+
if (G) return A;
|
|
9
9
|
G = 1;
|
|
10
|
-
var r = /* @__PURE__ */ Symbol.for("react.transitional.element"),
|
|
11
|
-
function b
|
|
10
|
+
var r = /* @__PURE__ */ Symbol.for("react.transitional.element"), f = /* @__PURE__ */ Symbol.for("react.fragment");
|
|
11
|
+
function m(b, i, d) {
|
|
12
12
|
var a = null;
|
|
13
|
-
if (
|
|
14
|
-
|
|
15
|
-
for (var
|
|
16
|
-
|
|
17
|
-
} else
|
|
18
|
-
return
|
|
13
|
+
if (d !== void 0 && (a = "" + d), i.key !== void 0 && (a = "" + i.key), "key" in i) {
|
|
14
|
+
d = {};
|
|
15
|
+
for (var n in i)
|
|
16
|
+
n !== "key" && (d[n] = i[n]);
|
|
17
|
+
} else d = i;
|
|
18
|
+
return i = d.ref, {
|
|
19
19
|
$$typeof: r,
|
|
20
|
-
type:
|
|
20
|
+
type: b,
|
|
21
21
|
key: a,
|
|
22
|
-
ref:
|
|
23
|
-
props:
|
|
22
|
+
ref: i !== void 0 ? i : null,
|
|
23
|
+
props: d
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
|
-
return
|
|
26
|
+
return A.Fragment = f, A.jsx = m, A.jsxs = m, A;
|
|
27
27
|
}
|
|
28
|
-
var
|
|
28
|
+
var C = {};
|
|
29
29
|
var X;
|
|
30
|
-
function
|
|
30
|
+
function me() {
|
|
31
31
|
return X || (X = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
32
32
|
function r(e) {
|
|
33
33
|
if (e == null) return null;
|
|
34
34
|
if (typeof e == "function")
|
|
35
|
-
return e.$$typeof ===
|
|
35
|
+
return e.$$typeof === ie ? null : e.displayName || e.name || null;
|
|
36
36
|
if (typeof e == "string") return e;
|
|
37
37
|
switch (e) {
|
|
38
|
-
case
|
|
38
|
+
case S:
|
|
39
39
|
return "Fragment";
|
|
40
40
|
case p:
|
|
41
41
|
return "Profiler";
|
|
42
|
-
case
|
|
42
|
+
case l:
|
|
43
43
|
return "StrictMode";
|
|
44
|
-
case ae:
|
|
45
|
-
return "Suspense";
|
|
46
44
|
case ne:
|
|
45
|
+
return "Suspense";
|
|
46
|
+
case oe:
|
|
47
47
|
return "SuspenseList";
|
|
48
|
-
case
|
|
48
|
+
case se:
|
|
49
49
|
return "Activity";
|
|
50
50
|
}
|
|
51
51
|
if (typeof e == "object")
|
|
52
52
|
switch (typeof e.tag == "number" && console.error(
|
|
53
53
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
54
54
|
), e.$$typeof) {
|
|
55
|
-
case
|
|
55
|
+
case M:
|
|
56
56
|
return "Portal";
|
|
57
|
-
case
|
|
57
|
+
case k:
|
|
58
58
|
return e.displayName || "Context";
|
|
59
|
-
case
|
|
59
|
+
case o:
|
|
60
60
|
return (e._context.displayName || "Context") + ".Consumer";
|
|
61
|
-
case
|
|
61
|
+
case ae:
|
|
62
62
|
var t = e.render;
|
|
63
63
|
return e = e.displayName, e || (e = t.displayName || t.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
|
|
64
|
-
case
|
|
64
|
+
case le:
|
|
65
65
|
return t = e.displayName || null, t !== null ? t : r(e.type) || "Memo";
|
|
66
|
-
case
|
|
66
|
+
case D:
|
|
67
67
|
t = e._payload, e = e._init;
|
|
68
68
|
try {
|
|
69
69
|
return r(e(t));
|
|
@@ -72,29 +72,29 @@ function be() {
|
|
|
72
72
|
}
|
|
73
73
|
return null;
|
|
74
74
|
}
|
|
75
|
-
function
|
|
75
|
+
function f(e) {
|
|
76
76
|
return "" + e;
|
|
77
77
|
}
|
|
78
|
-
function
|
|
78
|
+
function m(e) {
|
|
79
79
|
try {
|
|
80
|
-
|
|
80
|
+
f(e);
|
|
81
81
|
var t = !1;
|
|
82
82
|
} catch {
|
|
83
83
|
t = !0;
|
|
84
84
|
}
|
|
85
85
|
if (t) {
|
|
86
86
|
t = console;
|
|
87
|
-
var
|
|
88
|
-
return
|
|
87
|
+
var s = t.error, u = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
88
|
+
return s.call(
|
|
89
89
|
t,
|
|
90
90
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
91
|
-
|
|
92
|
-
),
|
|
91
|
+
u
|
|
92
|
+
), f(e);
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
|
-
function
|
|
96
|
-
if (e ===
|
|
97
|
-
if (typeof e == "object" && e !== null && e.$$typeof ===
|
|
95
|
+
function b(e) {
|
|
96
|
+
if (e === S) return "<>";
|
|
97
|
+
if (typeof e == "object" && e !== null && e.$$typeof === D)
|
|
98
98
|
return "<...>";
|
|
99
99
|
try {
|
|
100
100
|
var t = r(e);
|
|
@@ -103,11 +103,11 @@ function be() {
|
|
|
103
103
|
return "<...>";
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
|
-
function
|
|
107
|
-
var e =
|
|
106
|
+
function i() {
|
|
107
|
+
var e = F.A;
|
|
108
108
|
return e === null ? null : e.getOwner();
|
|
109
109
|
}
|
|
110
|
-
function
|
|
110
|
+
function d() {
|
|
111
111
|
return Error("react-stack-top-frame");
|
|
112
112
|
}
|
|
113
113
|
function a(e) {
|
|
@@ -117,33 +117,33 @@ function be() {
|
|
|
117
117
|
}
|
|
118
118
|
return e.key !== void 0;
|
|
119
119
|
}
|
|
120
|
-
function
|
|
121
|
-
function
|
|
120
|
+
function n(e, t) {
|
|
121
|
+
function s() {
|
|
122
122
|
B || (B = !0, console.error(
|
|
123
123
|
"%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)",
|
|
124
124
|
t
|
|
125
125
|
));
|
|
126
126
|
}
|
|
127
|
-
|
|
128
|
-
get:
|
|
127
|
+
s.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
128
|
+
get: s,
|
|
129
129
|
configurable: !0
|
|
130
130
|
});
|
|
131
131
|
}
|
|
132
132
|
function g() {
|
|
133
133
|
var e = r(this.type);
|
|
134
|
-
return
|
|
134
|
+
return K[e] || (K[e] = !0, console.error(
|
|
135
135
|
"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."
|
|
136
136
|
)), e = this.props.ref, e !== void 0 ? e : null;
|
|
137
137
|
}
|
|
138
|
-
function
|
|
139
|
-
var
|
|
138
|
+
function _(e, t, s, u, w, L) {
|
|
139
|
+
var c = s.ref;
|
|
140
140
|
return e = {
|
|
141
|
-
$$typeof:
|
|
141
|
+
$$typeof: T,
|
|
142
142
|
type: e,
|
|
143
143
|
key: t,
|
|
144
|
-
props:
|
|
145
|
-
_owner:
|
|
146
|
-
}, (
|
|
144
|
+
props: s,
|
|
145
|
+
_owner: u
|
|
146
|
+
}, (c !== void 0 ? c : null) !== null ? Object.defineProperty(e, "ref", {
|
|
147
147
|
enumerable: !1,
|
|
148
148
|
get: g
|
|
149
149
|
}) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
|
|
@@ -160,233 +160,237 @@ function be() {
|
|
|
160
160
|
configurable: !1,
|
|
161
161
|
enumerable: !1,
|
|
162
162
|
writable: !0,
|
|
163
|
-
value:
|
|
163
|
+
value: w
|
|
164
164
|
}), Object.defineProperty(e, "_debugTask", {
|
|
165
165
|
configurable: !1,
|
|
166
166
|
enumerable: !1,
|
|
167
167
|
writable: !0,
|
|
168
|
-
value:
|
|
168
|
+
value: L
|
|
169
169
|
}), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
|
|
170
170
|
}
|
|
171
|
-
function
|
|
172
|
-
var
|
|
173
|
-
if (
|
|
174
|
-
if (
|
|
175
|
-
if (
|
|
176
|
-
for (
|
|
177
|
-
|
|
178
|
-
Object.freeze && Object.freeze(
|
|
171
|
+
function v(e, t, s, u, w, L) {
|
|
172
|
+
var c = t.children;
|
|
173
|
+
if (c !== void 0)
|
|
174
|
+
if (u)
|
|
175
|
+
if (ue(c)) {
|
|
176
|
+
for (u = 0; u < c.length; u++)
|
|
177
|
+
O(c[u]);
|
|
178
|
+
Object.freeze && Object.freeze(c);
|
|
179
179
|
} else
|
|
180
180
|
console.error(
|
|
181
181
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
182
182
|
);
|
|
183
|
-
else
|
|
183
|
+
else O(c);
|
|
184
184
|
if (V.call(t, "key")) {
|
|
185
|
-
|
|
186
|
-
var
|
|
187
|
-
return
|
|
185
|
+
c = r(e);
|
|
186
|
+
var j = Object.keys(t).filter(function(ce) {
|
|
187
|
+
return ce !== "key";
|
|
188
188
|
});
|
|
189
|
-
|
|
189
|
+
u = 0 < j.length ? "{key: someKey, " + j.join(": ..., ") + ": ...}" : "{key: someKey}", U[c + u] || (j = 0 < j.length ? "{" + j.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
190
190
|
`A props object containing a "key" prop is being spread into JSX:
|
|
191
191
|
let props = %s;
|
|
192
192
|
<%s {...props} />
|
|
193
193
|
React keys must be passed directly to JSX without using spread:
|
|
194
194
|
let props = %s;
|
|
195
195
|
<%s key={someKey} {...props} />`,
|
|
196
|
-
i,
|
|
197
196
|
u,
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
197
|
+
c,
|
|
198
|
+
j,
|
|
199
|
+
c
|
|
200
|
+
), U[c + u] = !0);
|
|
201
201
|
}
|
|
202
|
-
if (
|
|
203
|
-
|
|
202
|
+
if (c = null, s !== void 0 && (m(s), c = "" + s), a(t) && (m(t.key), c = "" + t.key), "key" in t) {
|
|
203
|
+
s = {};
|
|
204
204
|
for (var I in t)
|
|
205
|
-
I !== "key" && (
|
|
206
|
-
} else
|
|
207
|
-
return
|
|
208
|
-
|
|
205
|
+
I !== "key" && (s[I] = t[I]);
|
|
206
|
+
} else s = t;
|
|
207
|
+
return c && n(
|
|
208
|
+
s,
|
|
209
209
|
typeof e == "function" ? e.displayName || e.name || "Unknown" : e
|
|
210
|
-
),
|
|
210
|
+
), _(
|
|
211
211
|
e,
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
212
|
+
c,
|
|
213
|
+
s,
|
|
214
|
+
i(),
|
|
215
|
+
w,
|
|
216
|
+
L
|
|
217
217
|
);
|
|
218
218
|
}
|
|
219
|
-
function
|
|
220
|
-
|
|
219
|
+
function O(e) {
|
|
220
|
+
R(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e !== null && e.$$typeof === D && (e._payload.status === "fulfilled" ? R(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
|
|
221
221
|
}
|
|
222
|
-
function
|
|
223
|
-
return typeof e == "object" && e !== null && e.$$typeof ===
|
|
222
|
+
function R(e) {
|
|
223
|
+
return typeof e == "object" && e !== null && e.$$typeof === T;
|
|
224
224
|
}
|
|
225
|
-
var
|
|
225
|
+
var E = N, T = /* @__PURE__ */ Symbol.for("react.transitional.element"), M = /* @__PURE__ */ Symbol.for("react.portal"), S = /* @__PURE__ */ Symbol.for("react.fragment"), l = /* @__PURE__ */ Symbol.for("react.strict_mode"), p = /* @__PURE__ */ Symbol.for("react.profiler"), o = /* @__PURE__ */ Symbol.for("react.consumer"), k = /* @__PURE__ */ Symbol.for("react.context"), ae = /* @__PURE__ */ Symbol.for("react.forward_ref"), ne = /* @__PURE__ */ Symbol.for("react.suspense"), oe = /* @__PURE__ */ Symbol.for("react.suspense_list"), le = /* @__PURE__ */ Symbol.for("react.memo"), D = /* @__PURE__ */ Symbol.for("react.lazy"), se = /* @__PURE__ */ Symbol.for("react.activity"), ie = /* @__PURE__ */ Symbol.for("react.client.reference"), F = E.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, V = Object.prototype.hasOwnProperty, ue = Array.isArray, Y = console.createTask ? console.createTask : function() {
|
|
226
226
|
return null;
|
|
227
227
|
};
|
|
228
|
-
|
|
228
|
+
E = {
|
|
229
229
|
react_stack_bottom_frame: function(e) {
|
|
230
230
|
return e();
|
|
231
231
|
}
|
|
232
232
|
};
|
|
233
|
-
var B,
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
)(),
|
|
237
|
-
|
|
238
|
-
var
|
|
239
|
-
return
|
|
233
|
+
var B, K = {}, q = E.react_stack_bottom_frame.bind(
|
|
234
|
+
E,
|
|
235
|
+
d
|
|
236
|
+
)(), z = Y(b(d)), U = {};
|
|
237
|
+
C.Fragment = S, C.jsx = function(e, t, s) {
|
|
238
|
+
var u = 1e4 > F.recentlyCreatedOwnerStacks++;
|
|
239
|
+
return v(
|
|
240
240
|
e,
|
|
241
241
|
t,
|
|
242
|
-
|
|
242
|
+
s,
|
|
243
243
|
!1,
|
|
244
|
-
|
|
245
|
-
|
|
244
|
+
u ? Error("react-stack-top-frame") : q,
|
|
245
|
+
u ? Y(b(e)) : z
|
|
246
246
|
);
|
|
247
|
-
},
|
|
248
|
-
var
|
|
249
|
-
return
|
|
247
|
+
}, C.jsxs = function(e, t, s) {
|
|
248
|
+
var u = 1e4 > F.recentlyCreatedOwnerStacks++;
|
|
249
|
+
return v(
|
|
250
250
|
e,
|
|
251
251
|
t,
|
|
252
|
-
|
|
252
|
+
s,
|
|
253
253
|
!0,
|
|
254
|
-
|
|
255
|
-
|
|
254
|
+
u ? Error("react-stack-top-frame") : q,
|
|
255
|
+
u ? Y(b(e)) : z
|
|
256
256
|
);
|
|
257
257
|
};
|
|
258
|
-
})()),
|
|
258
|
+
})()), C;
|
|
259
259
|
}
|
|
260
260
|
var H;
|
|
261
|
-
function
|
|
262
|
-
return H || (H = 1, process.env.NODE_ENV === "production" ?
|
|
261
|
+
function pe() {
|
|
262
|
+
return H || (H = 1, process.env.NODE_ENV === "production" ? h.exports = be() : h.exports = me()), h.exports;
|
|
263
263
|
}
|
|
264
|
-
var
|
|
264
|
+
var y = pe();
|
|
265
265
|
const ee = ({
|
|
266
266
|
schema: r,
|
|
267
|
-
dataSource:
|
|
268
|
-
className:
|
|
269
|
-
...
|
|
267
|
+
dataSource: f,
|
|
268
|
+
className: m,
|
|
269
|
+
...b
|
|
270
270
|
}) => {
|
|
271
|
-
const [
|
|
272
|
-
|
|
273
|
-
let
|
|
271
|
+
const [i, d] = x([]), [a, n] = x(null), [g, _] = x(!1), [v, O] = x(null), R = de(r.bind);
|
|
272
|
+
W(() => {
|
|
273
|
+
let l = !0;
|
|
274
274
|
return (async () => {
|
|
275
|
-
if (!(!
|
|
275
|
+
if (!(!f || !r.objectName))
|
|
276
276
|
try {
|
|
277
|
-
const
|
|
278
|
-
|
|
279
|
-
} catch (
|
|
280
|
-
console.warn("Failed to fetch object def",
|
|
277
|
+
const o = await f.getObjectSchema(r.objectName);
|
|
278
|
+
l && n(o);
|
|
279
|
+
} catch (o) {
|
|
280
|
+
console.warn("Failed to fetch object def", o);
|
|
281
281
|
}
|
|
282
282
|
})(), () => {
|
|
283
|
-
|
|
283
|
+
l = !1;
|
|
284
284
|
};
|
|
285
|
-
}, [r.objectName,
|
|
286
|
-
let
|
|
285
|
+
}, [r.objectName, f]), W(() => {
|
|
286
|
+
let l = !0;
|
|
287
287
|
const p = async () => {
|
|
288
|
-
if (!(!
|
|
289
|
-
|
|
288
|
+
if (!(!f || !r.objectName)) {
|
|
289
|
+
l && _(!0);
|
|
290
290
|
try {
|
|
291
|
-
const
|
|
291
|
+
const o = await f.find(r.objectName, {
|
|
292
292
|
options: { $top: 100 },
|
|
293
293
|
$filter: r.filter
|
|
294
294
|
});
|
|
295
|
-
let
|
|
296
|
-
Array.isArray(
|
|
297
|
-
} catch (
|
|
298
|
-
console.error("[ObjectKanban] Fetch error:",
|
|
295
|
+
let k = [];
|
|
296
|
+
Array.isArray(o) ? k = o : o && typeof o == "object" && (Array.isArray(o.value) ? k = o.value : Array.isArray(o.data) && (k = o.data)), console.log(`[ObjectKanban] Extracted data (length: ${k.length})`), l && d(k);
|
|
297
|
+
} catch (o) {
|
|
298
|
+
console.error("[ObjectKanban] Fetch error:", o), l && O(o);
|
|
299
299
|
} finally {
|
|
300
|
-
|
|
300
|
+
l && _(!1);
|
|
301
301
|
}
|
|
302
302
|
}
|
|
303
303
|
};
|
|
304
|
-
return r.objectName && !
|
|
305
|
-
|
|
304
|
+
return r.objectName && !R && !r.data && !b.data && p(), () => {
|
|
305
|
+
l = !1;
|
|
306
306
|
};
|
|
307
|
-
}, [r.objectName,
|
|
308
|
-
const
|
|
309
|
-
if (!Array.isArray(
|
|
310
|
-
let
|
|
311
|
-
if (!
|
|
307
|
+
}, [r.objectName, f, R, r.data, r.filter, b.data]);
|
|
308
|
+
const E = b.data || R || r.data || i, T = J(() => {
|
|
309
|
+
if (!Array.isArray(E)) return [];
|
|
310
|
+
let l = r.cardTitle || r.titleField;
|
|
311
|
+
if (!l && a) {
|
|
312
312
|
if (a.titleFormat) {
|
|
313
|
-
const
|
|
314
|
-
|
|
313
|
+
const o = /\{(.+?)\}/.exec(a.titleFormat);
|
|
314
|
+
o && (l = o[1]);
|
|
315
315
|
}
|
|
316
|
-
!
|
|
316
|
+
!l && a.NAME_FIELD_KEY && (l = a.NAME_FIELD_KEY);
|
|
317
317
|
}
|
|
318
|
-
const p =
|
|
319
|
-
return
|
|
320
|
-
...
|
|
318
|
+
const p = l || "name";
|
|
319
|
+
return E.map((o) => ({
|
|
320
|
+
...o,
|
|
321
321
|
// Ensure id exists
|
|
322
|
-
id:
|
|
322
|
+
id: o.id || o._id,
|
|
323
323
|
// Map title
|
|
324
|
-
title:
|
|
324
|
+
title: o[p] || o.title || "Untitled"
|
|
325
325
|
}));
|
|
326
|
-
}, [
|
|
326
|
+
}, [E, r, a]), M = J(() => {
|
|
327
327
|
if (r.columns && r.columns.length > 0)
|
|
328
328
|
if (typeof r.columns[0] == "string") {
|
|
329
329
|
if (!r.groupBy)
|
|
330
|
-
return r.columns.map((
|
|
331
|
-
id:
|
|
332
|
-
title:
|
|
330
|
+
return r.columns.map((l) => ({
|
|
331
|
+
id: l,
|
|
332
|
+
title: l
|
|
333
333
|
}));
|
|
334
334
|
} else
|
|
335
335
|
return r.columns;
|
|
336
336
|
if (r.groupBy && a?.fields?.[r.groupBy]?.options)
|
|
337
|
-
return a.fields[r.groupBy].options.map((
|
|
338
|
-
id:
|
|
339
|
-
title:
|
|
337
|
+
return a.fields[r.groupBy].options.map((l) => ({
|
|
338
|
+
id: l.value,
|
|
339
|
+
title: l.label
|
|
340
340
|
}));
|
|
341
|
-
if (r.groupBy &&
|
|
342
|
-
const
|
|
343
|
-
return Array.from(
|
|
341
|
+
if (r.groupBy && T.length > 0) {
|
|
342
|
+
const l = new Set(T.map((p) => p[r.groupBy]));
|
|
343
|
+
return Array.from(l).map((p) => ({
|
|
344
344
|
id: String(p),
|
|
345
345
|
title: String(p)
|
|
346
346
|
}));
|
|
347
347
|
}
|
|
348
348
|
return [];
|
|
349
|
-
}, [r.columns, r.groupBy,
|
|
349
|
+
}, [r.columns, r.groupBy, T, a]), S = {
|
|
350
350
|
...r,
|
|
351
|
-
data:
|
|
352
|
-
columns:
|
|
353
|
-
className:
|
|
351
|
+
data: T,
|
|
352
|
+
columns: M,
|
|
353
|
+
className: m || r.className
|
|
354
354
|
};
|
|
355
|
-
return
|
|
355
|
+
return v ? /* @__PURE__ */ y.jsxs("div", { className: "p-4 border border-destructive/50 rounded bg-destructive/10 text-destructive", children: [
|
|
356
356
|
"Error loading kanban data: ",
|
|
357
|
-
|
|
358
|
-
] }) : /* @__PURE__ */
|
|
359
|
-
},
|
|
360
|
-
const
|
|
361
|
-
const { columns:
|
|
362
|
-
if (
|
|
363
|
-
const
|
|
364
|
-
|
|
365
|
-
|
|
357
|
+
v.message
|
|
358
|
+
] }) : /* @__PURE__ */ y.jsx($, { schema: S });
|
|
359
|
+
}, ge = N.lazy(() => import("./KanbanImpl--kTNN_B8.js")), re = N.lazy(() => import("./KanbanEnhanced-BMreTWOT.js")), $ = ({ schema: r }) => {
|
|
360
|
+
const f = N.useMemo(() => {
|
|
361
|
+
const { columns: m = [], data: b, groupBy: i } = r;
|
|
362
|
+
if (b && i && Array.isArray(b)) {
|
|
363
|
+
const d = {};
|
|
364
|
+
m.forEach((n) => {
|
|
365
|
+
n.id && (d[String(n.id).toLowerCase()] = n.id), n.title && (d[String(n.title).toLowerCase()] = n.id);
|
|
366
|
+
});
|
|
367
|
+
const a = b.reduce((n, g) => {
|
|
368
|
+
const _ = String(g[i] ?? ""), v = d[_.toLowerCase()] ?? _;
|
|
369
|
+
return n[v] || (n[v] = []), n[v].push(g), n;
|
|
366
370
|
}, {});
|
|
367
|
-
return
|
|
368
|
-
...
|
|
371
|
+
return m.map((n) => ({
|
|
372
|
+
...n,
|
|
369
373
|
cards: [
|
|
370
|
-
...
|
|
374
|
+
...n.cards || [],
|
|
371
375
|
// Preserve static cards
|
|
372
|
-
...
|
|
376
|
+
...a[n.id] || []
|
|
373
377
|
// Add dynamic cards
|
|
374
378
|
]
|
|
375
379
|
}));
|
|
376
380
|
}
|
|
377
|
-
return
|
|
381
|
+
return m;
|
|
378
382
|
}, [r]);
|
|
379
|
-
return /* @__PURE__ */
|
|
380
|
-
|
|
383
|
+
return /* @__PURE__ */ y.jsx(Z, { fallback: /* @__PURE__ */ y.jsx(Q, { className: "w-full h-[600px]" }), children: /* @__PURE__ */ y.jsx(
|
|
384
|
+
ge,
|
|
381
385
|
{
|
|
382
|
-
columns:
|
|
386
|
+
columns: f,
|
|
383
387
|
onCardMove: r.onCardMove,
|
|
384
388
|
className: r.className
|
|
385
389
|
}
|
|
386
390
|
) });
|
|
387
391
|
};
|
|
388
|
-
|
|
389
|
-
"kanban",
|
|
392
|
+
P.register(
|
|
393
|
+
"kanban-ui",
|
|
390
394
|
$,
|
|
391
395
|
{
|
|
392
396
|
namespace: "plugin-kanban",
|
|
@@ -486,27 +490,27 @@ const Te = {
|
|
|
486
490
|
"kanban-enhanced": re,
|
|
487
491
|
"object-kanban": ee
|
|
488
492
|
};
|
|
489
|
-
|
|
493
|
+
P.register(
|
|
490
494
|
"kanban-enhanced",
|
|
491
495
|
({ schema: r }) => {
|
|
492
|
-
const
|
|
493
|
-
const { columns:
|
|
494
|
-
if (
|
|
495
|
-
const
|
|
496
|
-
const g =
|
|
497
|
-
return a[g] || (a[g] = []), a[g].push(
|
|
496
|
+
const f = N.useMemo(() => {
|
|
497
|
+
const { columns: m = [], data: b, groupBy: i } = r;
|
|
498
|
+
if (b && i && Array.isArray(b)) {
|
|
499
|
+
const d = b.reduce((a, n) => {
|
|
500
|
+
const g = n[i];
|
|
501
|
+
return a[g] || (a[g] = []), a[g].push(n), a;
|
|
498
502
|
}, {});
|
|
499
|
-
return
|
|
503
|
+
return m.map((a) => ({
|
|
500
504
|
...a,
|
|
501
|
-
cards: [...a.cards || [], ...
|
|
505
|
+
cards: [...a.cards || [], ...d[a.id] || []]
|
|
502
506
|
}));
|
|
503
507
|
}
|
|
504
|
-
return
|
|
508
|
+
return m;
|
|
505
509
|
}, [r]);
|
|
506
|
-
return /* @__PURE__ */
|
|
510
|
+
return /* @__PURE__ */ y.jsx(Z, { fallback: /* @__PURE__ */ y.jsx(Q, { className: "w-full h-[600px]" }), children: /* @__PURE__ */ y.jsx(
|
|
507
511
|
re,
|
|
508
512
|
{
|
|
509
|
-
columns:
|
|
513
|
+
columns: f,
|
|
510
514
|
onCardMove: r.onCardMove,
|
|
511
515
|
onColumnToggle: r.onColumnToggle,
|
|
512
516
|
enableVirtualScrolling: r.enableVirtualScrolling,
|
|
@@ -536,17 +540,30 @@ L.register(
|
|
|
536
540
|
}
|
|
537
541
|
}
|
|
538
542
|
);
|
|
539
|
-
const
|
|
540
|
-
const { dataSource:
|
|
541
|
-
return /* @__PURE__ */
|
|
543
|
+
const te = ({ schema: r, ...f }) => {
|
|
544
|
+
const { dataSource: m } = fe() || {};
|
|
545
|
+
return /* @__PURE__ */ y.jsx(ee, { schema: r, dataSource: m, ...f });
|
|
542
546
|
};
|
|
543
|
-
|
|
547
|
+
P.register(
|
|
544
548
|
"object-kanban",
|
|
545
|
-
|
|
549
|
+
te,
|
|
546
550
|
{
|
|
547
551
|
namespace: "plugin-kanban",
|
|
548
552
|
label: "Object Kanban",
|
|
549
|
-
category: "
|
|
553
|
+
category: "view",
|
|
554
|
+
inputs: [
|
|
555
|
+
{ name: "objectName", type: "string", label: "Object Name", required: !0 },
|
|
556
|
+
{ name: "columns", type: "array", label: "Columns" }
|
|
557
|
+
]
|
|
558
|
+
}
|
|
559
|
+
);
|
|
560
|
+
P.register(
|
|
561
|
+
"kanban",
|
|
562
|
+
te,
|
|
563
|
+
{
|
|
564
|
+
namespace: "view",
|
|
565
|
+
label: "Kanban Board",
|
|
566
|
+
category: "view",
|
|
550
567
|
inputs: [
|
|
551
568
|
{ name: "objectName", type: "string", label: "Object Name", required: !0 },
|
|
552
569
|
{ name: "columns", type: "array", label: "Columns" }
|
|
@@ -556,7 +573,7 @@ L.register(
|
|
|
556
573
|
export {
|
|
557
574
|
$ as K,
|
|
558
575
|
ee as O,
|
|
559
|
-
|
|
560
|
-
|
|
576
|
+
te as a,
|
|
577
|
+
y as j,
|
|
561
578
|
Te as k
|
|
562
579
|
};
|