@ram_28/kf-ai-sdk 1.0.12 → 1.0.13
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/dist/auth.cjs +1 -1
- package/dist/auth.mjs +15 -15
- package/dist/form.cjs +1 -1
- package/dist/form.mjs +1745 -736
- package/dist/kanban.cjs +2 -2
- package/dist/kanban.mjs +835 -469
- package/dist/table.cjs +1 -1
- package/dist/table.mjs +1 -1
- package/dist/useQuery-BScHEo7x.cjs +1 -0
- package/dist/useQuery-KpZFg80c.js +748 -0
- package/package.json +1 -1
package/dist/kanban.mjs
CHANGED
|
@@ -1,44 +1,410 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
var $t = (a) => {
|
|
2
|
+
throw TypeError(a);
|
|
3
|
+
};
|
|
4
|
+
var St = (a, e, s) => e.has(a) || $t("Cannot " + s);
|
|
5
|
+
var l = (a, e, s) => (St(a, e, "read from private field"), s ? s.call(a) : e.get(a)), R = (a, e, s) => e.has(a) ? $t("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(a) : e.set(a, s), v = (a, e, s, t) => (St(a, e, "write to private field"), t ? t.call(a, s) : e.set(a, s), s), F = (a, e, s) => (St(a, e, "access private method"), s);
|
|
6
|
+
import * as B from "react";
|
|
7
|
+
import { useState as yt, useRef as G, useCallback as _, useEffect as _t, useMemo as Ht, createContext as ge, useContext as fe } from "react";
|
|
8
|
+
import { S as Vt, s as Gt, h as It, n as ct, r as pe, Q as Wt, a as kt, b as ye, c as me, e as be, d as Ce, f as De, g as Zt, i as Ut, j as jt, w as we, k as Oe, l as Se, m as _e, u as Qe } from "./useQuery-KpZFg80c.js";
|
|
9
|
+
import { a as M } from "./client-CfvLiGfP.js";
|
|
10
|
+
import { u as Ee } from "./useFilter-CXFqEHyI.js";
|
|
11
|
+
function ve() {
|
|
12
|
+
return {
|
|
13
|
+
context: void 0,
|
|
14
|
+
data: void 0,
|
|
15
|
+
error: null,
|
|
16
|
+
failureCount: 0,
|
|
17
|
+
failureReason: null,
|
|
18
|
+
isPaused: !1,
|
|
19
|
+
status: "idle",
|
|
20
|
+
variables: void 0,
|
|
21
|
+
submittedAt: 0
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
var z, W, $, N, Y, mt, Qt, Yt, Ke = (Yt = class extends Vt {
|
|
25
|
+
constructor(e, s) {
|
|
26
|
+
super();
|
|
27
|
+
R(this, Y);
|
|
28
|
+
R(this, z);
|
|
29
|
+
R(this, W);
|
|
30
|
+
R(this, $);
|
|
31
|
+
R(this, N);
|
|
32
|
+
v(this, z, e), this.setOptions(s), this.bindMethods(), F(this, Y, mt).call(this);
|
|
33
|
+
}
|
|
34
|
+
bindMethods() {
|
|
35
|
+
this.mutate = this.mutate.bind(this), this.reset = this.reset.bind(this);
|
|
36
|
+
}
|
|
37
|
+
setOptions(e) {
|
|
38
|
+
var t;
|
|
39
|
+
const s = this.options;
|
|
40
|
+
this.options = l(this, z).defaultMutationOptions(e), Gt(this.options, s) || l(this, z).getMutationCache().notify({
|
|
41
|
+
type: "observerOptionsUpdated",
|
|
42
|
+
mutation: l(this, $),
|
|
43
|
+
observer: this
|
|
44
|
+
}), s != null && s.mutationKey && this.options.mutationKey && It(s.mutationKey) !== It(this.options.mutationKey) ? this.reset() : ((t = l(this, $)) == null ? void 0 : t.state.status) === "pending" && l(this, $).setOptions(this.options);
|
|
45
|
+
}
|
|
46
|
+
onUnsubscribe() {
|
|
47
|
+
var e;
|
|
48
|
+
this.hasListeners() || (e = l(this, $)) == null || e.removeObserver(this);
|
|
49
|
+
}
|
|
50
|
+
onMutationUpdate(e) {
|
|
51
|
+
F(this, Y, mt).call(this), F(this, Y, Qt).call(this, e);
|
|
52
|
+
}
|
|
53
|
+
getCurrentResult() {
|
|
54
|
+
return l(this, W);
|
|
55
|
+
}
|
|
56
|
+
reset() {
|
|
57
|
+
var e;
|
|
58
|
+
(e = l(this, $)) == null || e.removeObserver(this), v(this, $, void 0), F(this, Y, mt).call(this), F(this, Y, Qt).call(this);
|
|
59
|
+
}
|
|
60
|
+
mutate(e, s) {
|
|
61
|
+
var t;
|
|
62
|
+
return v(this, N, s), (t = l(this, $)) == null || t.removeObserver(this), v(this, $, l(this, z).getMutationCache().build(l(this, z), this.options)), l(this, $).addObserver(this), l(this, $).execute(e);
|
|
63
|
+
}
|
|
64
|
+
}, z = new WeakMap(), W = new WeakMap(), $ = new WeakMap(), N = new WeakMap(), Y = new WeakSet(), mt = function() {
|
|
65
|
+
var s;
|
|
66
|
+
const e = ((s = l(this, $)) == null ? void 0 : s.state) ?? ve();
|
|
67
|
+
v(this, W, {
|
|
68
|
+
...e,
|
|
69
|
+
isPending: e.status === "pending",
|
|
70
|
+
isSuccess: e.status === "success",
|
|
71
|
+
isError: e.status === "error",
|
|
72
|
+
isIdle: e.status === "idle",
|
|
73
|
+
mutate: this.mutate,
|
|
74
|
+
reset: this.reset
|
|
75
|
+
});
|
|
76
|
+
}, Qt = function(e) {
|
|
77
|
+
ct.batch(() => {
|
|
78
|
+
var s, t, i, d, f, y, Q, E;
|
|
79
|
+
if (l(this, N) && this.hasListeners()) {
|
|
80
|
+
const C = l(this, W).variables, O = l(this, W).context, K = {
|
|
81
|
+
client: l(this, z),
|
|
82
|
+
meta: this.options.meta,
|
|
83
|
+
mutationKey: this.options.mutationKey
|
|
84
|
+
};
|
|
85
|
+
if ((e == null ? void 0 : e.type) === "success") {
|
|
86
|
+
try {
|
|
87
|
+
(t = (s = l(this, N)).onSuccess) == null || t.call(
|
|
88
|
+
s,
|
|
89
|
+
e.data,
|
|
90
|
+
C,
|
|
91
|
+
O,
|
|
92
|
+
K
|
|
93
|
+
);
|
|
94
|
+
} catch (q) {
|
|
95
|
+
Promise.reject(q);
|
|
96
|
+
}
|
|
97
|
+
try {
|
|
98
|
+
(d = (i = l(this, N)).onSettled) == null || d.call(
|
|
99
|
+
i,
|
|
100
|
+
e.data,
|
|
101
|
+
null,
|
|
102
|
+
C,
|
|
103
|
+
O,
|
|
104
|
+
K
|
|
105
|
+
);
|
|
106
|
+
} catch (q) {
|
|
107
|
+
Promise.reject(q);
|
|
108
|
+
}
|
|
109
|
+
} else if ((e == null ? void 0 : e.type) === "error") {
|
|
110
|
+
try {
|
|
111
|
+
(y = (f = l(this, N)).onError) == null || y.call(
|
|
112
|
+
f,
|
|
113
|
+
e.error,
|
|
114
|
+
C,
|
|
115
|
+
O,
|
|
116
|
+
K
|
|
117
|
+
);
|
|
118
|
+
} catch (q) {
|
|
119
|
+
Promise.reject(q);
|
|
120
|
+
}
|
|
121
|
+
try {
|
|
122
|
+
(E = (Q = l(this, N)).onSettled) == null || E.call(
|
|
123
|
+
Q,
|
|
124
|
+
void 0,
|
|
125
|
+
e.error,
|
|
126
|
+
C,
|
|
127
|
+
O,
|
|
128
|
+
K
|
|
129
|
+
);
|
|
130
|
+
} catch (q) {
|
|
131
|
+
Promise.reject(q);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
this.listeners.forEach((C) => {
|
|
136
|
+
C(l(this, W));
|
|
137
|
+
});
|
|
138
|
+
});
|
|
139
|
+
}, Yt);
|
|
140
|
+
function Bt(a, e) {
|
|
141
|
+
const s = new Set(e);
|
|
142
|
+
return a.filter((t) => !s.has(t));
|
|
143
|
+
}
|
|
144
|
+
function qe(a, e, s) {
|
|
145
|
+
const t = a.slice(0);
|
|
146
|
+
return t[e] = s, t;
|
|
147
|
+
}
|
|
148
|
+
var tt, H, it, at, I, Z, lt, dt, ht, T, Et, vt, Kt, qt, Pt, Jt, Pe = (Jt = class extends Vt {
|
|
149
|
+
constructor(e, s, t) {
|
|
150
|
+
super();
|
|
151
|
+
R(this, T);
|
|
152
|
+
R(this, tt);
|
|
153
|
+
R(this, H);
|
|
154
|
+
R(this, it);
|
|
155
|
+
R(this, at);
|
|
156
|
+
R(this, I);
|
|
157
|
+
R(this, Z);
|
|
158
|
+
R(this, lt);
|
|
159
|
+
R(this, dt);
|
|
160
|
+
R(this, ht, []);
|
|
161
|
+
v(this, tt, e), v(this, at, t), v(this, it, []), v(this, I, []), v(this, H, []), this.setQueries(s);
|
|
162
|
+
}
|
|
163
|
+
onSubscribe() {
|
|
164
|
+
this.listeners.size === 1 && l(this, I).forEach((e) => {
|
|
165
|
+
e.subscribe((s) => {
|
|
166
|
+
F(this, T, qt).call(this, e, s);
|
|
167
|
+
});
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
onUnsubscribe() {
|
|
171
|
+
this.listeners.size || this.destroy();
|
|
172
|
+
}
|
|
173
|
+
destroy() {
|
|
174
|
+
this.listeners = /* @__PURE__ */ new Set(), l(this, I).forEach((e) => {
|
|
175
|
+
e.destroy();
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
setQueries(e, s) {
|
|
179
|
+
if (v(this, it, e), v(this, at, s), process.env.NODE_ENV !== "production") {
|
|
180
|
+
const t = e.map(
|
|
181
|
+
(i) => l(this, tt).defaultQueryOptions(i).queryHash
|
|
182
|
+
);
|
|
183
|
+
new Set(t).size !== t.length && console.warn(
|
|
184
|
+
"[QueriesObserver]: Duplicate Queries found. This might result in unexpected behavior."
|
|
185
|
+
);
|
|
186
|
+
}
|
|
187
|
+
ct.batch(() => {
|
|
188
|
+
const t = l(this, I), i = F(this, T, Kt).call(this, l(this, it));
|
|
189
|
+
i.forEach(
|
|
190
|
+
(O) => O.observer.setOptions(O.defaultedQueryOptions)
|
|
191
|
+
);
|
|
192
|
+
const d = i.map((O) => O.observer), f = d.map(
|
|
193
|
+
(O) => O.getCurrentResult()
|
|
194
|
+
), y = t.length !== d.length, Q = d.some(
|
|
195
|
+
(O, K) => O !== t[K]
|
|
196
|
+
), E = y || Q, C = E ? !0 : f.some((O, K) => {
|
|
197
|
+
const q = l(this, H)[K];
|
|
198
|
+
return !q || !Gt(O, q);
|
|
199
|
+
});
|
|
200
|
+
!E && !C || (E && (v(this, ht, i), v(this, I, d)), v(this, H, f), this.hasListeners() && (E && (Bt(t, d).forEach((O) => {
|
|
201
|
+
O.destroy();
|
|
202
|
+
}), Bt(d, t).forEach((O) => {
|
|
203
|
+
O.subscribe((K) => {
|
|
204
|
+
F(this, T, qt).call(this, O, K);
|
|
205
|
+
});
|
|
206
|
+
})), F(this, T, Pt).call(this)));
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
getCurrentResult() {
|
|
210
|
+
return l(this, H);
|
|
211
|
+
}
|
|
212
|
+
getQueries() {
|
|
213
|
+
return l(this, I).map((e) => e.getCurrentQuery());
|
|
214
|
+
}
|
|
215
|
+
getObservers() {
|
|
216
|
+
return l(this, I);
|
|
217
|
+
}
|
|
218
|
+
getOptimisticResult(e, s) {
|
|
219
|
+
const t = F(this, T, Kt).call(this, e), i = t.map(
|
|
220
|
+
(d) => d.observer.getOptimisticResult(d.defaultedQueryOptions)
|
|
221
|
+
);
|
|
222
|
+
return [
|
|
223
|
+
i,
|
|
224
|
+
(d) => F(this, T, vt).call(this, d ?? i, s),
|
|
225
|
+
() => F(this, T, Et).call(this, i, t)
|
|
226
|
+
];
|
|
227
|
+
}
|
|
228
|
+
}, tt = new WeakMap(), H = new WeakMap(), it = new WeakMap(), at = new WeakMap(), I = new WeakMap(), Z = new WeakMap(), lt = new WeakMap(), dt = new WeakMap(), ht = new WeakMap(), T = new WeakSet(), Et = function(e, s) {
|
|
229
|
+
return s.map((t, i) => {
|
|
230
|
+
const d = e[i];
|
|
231
|
+
return t.defaultedQueryOptions.notifyOnChangeProps ? d : t.observer.trackResult(d, (f) => {
|
|
232
|
+
s.forEach((y) => {
|
|
233
|
+
y.observer.trackProp(f);
|
|
234
|
+
});
|
|
235
|
+
});
|
|
236
|
+
});
|
|
237
|
+
}, vt = function(e, s) {
|
|
238
|
+
return s ? ((!l(this, Z) || l(this, H) !== l(this, dt) || s !== l(this, lt)) && (v(this, lt, s), v(this, dt, l(this, H)), v(this, Z, pe(
|
|
239
|
+
l(this, Z),
|
|
240
|
+
s(e)
|
|
241
|
+
))), l(this, Z)) : e;
|
|
242
|
+
}, Kt = function(e) {
|
|
243
|
+
const s = /* @__PURE__ */ new Map();
|
|
244
|
+
l(this, I).forEach((i) => {
|
|
245
|
+
const d = i.options.queryHash;
|
|
246
|
+
if (!d) return;
|
|
247
|
+
const f = s.get(d);
|
|
248
|
+
f ? f.push(i) : s.set(d, [i]);
|
|
249
|
+
});
|
|
250
|
+
const t = [];
|
|
251
|
+
return e.forEach((i) => {
|
|
252
|
+
var Q;
|
|
253
|
+
const d = l(this, tt).defaultQueryOptions(i), y = ((Q = s.get(d.queryHash)) == null ? void 0 : Q.shift()) ?? new Wt(l(this, tt), d);
|
|
254
|
+
t.push({
|
|
255
|
+
defaultedQueryOptions: d,
|
|
256
|
+
observer: y
|
|
257
|
+
});
|
|
258
|
+
}), t;
|
|
259
|
+
}, qt = function(e, s) {
|
|
260
|
+
const t = l(this, I).indexOf(e);
|
|
261
|
+
t !== -1 && (v(this, H, qe(l(this, H), t, s)), F(this, T, Pt).call(this));
|
|
262
|
+
}, Pt = function() {
|
|
263
|
+
var e;
|
|
264
|
+
if (this.hasListeners()) {
|
|
265
|
+
const s = l(this, Z), t = F(this, T, Et).call(this, l(this, H), l(this, ht)), i = F(this, T, vt).call(this, t, (e = l(this, at)) == null ? void 0 : e.combine);
|
|
266
|
+
s !== i && ct.batch(() => {
|
|
267
|
+
this.listeners.forEach((d) => {
|
|
268
|
+
d(l(this, H));
|
|
269
|
+
});
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
}, Jt);
|
|
273
|
+
function ke({
|
|
274
|
+
queries: a,
|
|
275
|
+
...e
|
|
276
|
+
}, s) {
|
|
277
|
+
const t = kt(), i = ye(), d = me(), f = B.useMemo(
|
|
278
|
+
() => a.map((g) => {
|
|
279
|
+
const P = t.defaultQueryOptions(
|
|
280
|
+
g
|
|
281
|
+
);
|
|
282
|
+
return P._optimisticResults = i ? "isRestoring" : "optimistic", P;
|
|
283
|
+
}),
|
|
284
|
+
[a, t, i]
|
|
285
|
+
);
|
|
286
|
+
f.forEach((g) => {
|
|
287
|
+
be(g);
|
|
288
|
+
const P = t.getQueryCache().get(g.queryHash);
|
|
289
|
+
Ce(g, d, P);
|
|
290
|
+
}), De(d);
|
|
291
|
+
const [y] = B.useState(
|
|
292
|
+
() => new Pe(
|
|
293
|
+
t,
|
|
294
|
+
f,
|
|
295
|
+
e
|
|
296
|
+
)
|
|
297
|
+
), [Q, E, C] = y.getOptimisticResult(
|
|
298
|
+
f,
|
|
299
|
+
e.combine
|
|
300
|
+
), O = !i && e.subscribed !== !1;
|
|
301
|
+
B.useSyncExternalStore(
|
|
302
|
+
B.useCallback(
|
|
303
|
+
(g) => O ? y.subscribe(ct.batchCalls(g)) : Zt,
|
|
304
|
+
[y, O]
|
|
305
|
+
),
|
|
306
|
+
() => y.getCurrentResult(),
|
|
307
|
+
() => y.getCurrentResult()
|
|
308
|
+
), B.useEffect(() => {
|
|
309
|
+
y.setQueries(
|
|
310
|
+
f,
|
|
311
|
+
e
|
|
312
|
+
);
|
|
313
|
+
}, [f, e, y]);
|
|
314
|
+
const q = Q.some(
|
|
315
|
+
(g, P) => Ut(f[P], g)
|
|
316
|
+
) ? Q.flatMap((g, P) => {
|
|
317
|
+
const k = f[P];
|
|
318
|
+
if (k) {
|
|
319
|
+
const X = new Wt(t, k);
|
|
320
|
+
if (Ut(k, g))
|
|
321
|
+
return jt(k, X, d);
|
|
322
|
+
we(g, i) && jt(k, X, d);
|
|
323
|
+
}
|
|
324
|
+
return [];
|
|
325
|
+
}) : [];
|
|
326
|
+
if (q.length > 0)
|
|
327
|
+
throw Promise.all(q);
|
|
328
|
+
const J = Q.find(
|
|
329
|
+
(g, P) => {
|
|
330
|
+
const k = f[P];
|
|
331
|
+
return k && Oe({
|
|
332
|
+
result: g,
|
|
333
|
+
errorResetBoundary: d,
|
|
334
|
+
throwOnError: k.throwOnError,
|
|
335
|
+
query: t.getQueryCache().get(k.queryHash),
|
|
336
|
+
suspense: k.suspense
|
|
337
|
+
});
|
|
338
|
+
}
|
|
339
|
+
);
|
|
340
|
+
if (J != null && J.error)
|
|
341
|
+
throw J.error;
|
|
342
|
+
return E(C());
|
|
343
|
+
}
|
|
344
|
+
function ut(a, e) {
|
|
345
|
+
const s = kt(), [t] = B.useState(
|
|
346
|
+
() => new Ke(
|
|
347
|
+
s,
|
|
348
|
+
a
|
|
349
|
+
)
|
|
350
|
+
);
|
|
351
|
+
B.useEffect(() => {
|
|
352
|
+
t.setOptions(a);
|
|
353
|
+
}, [t, a]);
|
|
354
|
+
const i = B.useSyncExternalStore(
|
|
355
|
+
B.useCallback(
|
|
356
|
+
(f) => t.subscribe(ct.batchCalls(f)),
|
|
357
|
+
[t]
|
|
358
|
+
),
|
|
359
|
+
() => t.getCurrentResult(),
|
|
360
|
+
() => t.getCurrentResult()
|
|
361
|
+
), d = B.useCallback(
|
|
362
|
+
(f, y) => {
|
|
363
|
+
t.mutate(f, y).catch(Zt);
|
|
364
|
+
},
|
|
365
|
+
[t]
|
|
366
|
+
);
|
|
367
|
+
if (i.error && Se(t.options.throwOnError, [i.error]))
|
|
368
|
+
throw i.error;
|
|
369
|
+
return { ...i, mutate: d, mutateAsync: i.mutate };
|
|
370
|
+
}
|
|
371
|
+
const Xt = 50, zt = 5, Nt = 5;
|
|
372
|
+
function Ae({
|
|
373
|
+
onCardMove: a,
|
|
374
|
+
onError: e,
|
|
375
|
+
columns: s,
|
|
376
|
+
announceMove: t
|
|
11
377
|
}) {
|
|
12
|
-
const [
|
|
378
|
+
const [i, d] = yt({
|
|
13
379
|
isDragging: !1,
|
|
14
380
|
draggedCard: null,
|
|
15
381
|
dragOverColumn: null,
|
|
16
382
|
dragOverPosition: null,
|
|
17
383
|
dragSourceColumn: null
|
|
18
|
-
}),
|
|
19
|
-
|
|
384
|
+
}), f = G(null), y = G(null), Q = G(null), E = _(() => {
|
|
385
|
+
d({
|
|
20
386
|
isDragging: !1,
|
|
21
387
|
draggedCard: null,
|
|
22
388
|
dragOverColumn: null,
|
|
23
389
|
dragOverPosition: null,
|
|
24
390
|
dragSourceColumn: null
|
|
25
|
-
}),
|
|
26
|
-
}, []),
|
|
27
|
-
for (const
|
|
28
|
-
const
|
|
29
|
-
if (
|
|
30
|
-
return { card:
|
|
391
|
+
}), y.current && (clearTimeout(y.current), y.current = null);
|
|
392
|
+
}, []), C = _((h) => s.find((c) => c._id === h) || null, [s]), O = _((h) => {
|
|
393
|
+
for (const c of s) {
|
|
394
|
+
const m = c.cards.find((D) => D._id === h);
|
|
395
|
+
if (m)
|
|
396
|
+
return { card: m, column: c };
|
|
31
397
|
}
|
|
32
398
|
return null;
|
|
33
|
-
}, [
|
|
34
|
-
var
|
|
399
|
+
}, [s]), K = _((h, c) => {
|
|
400
|
+
var m, D;
|
|
35
401
|
try {
|
|
36
|
-
const
|
|
37
|
-
if (!
|
|
402
|
+
const p = h.target, b = C(c.columnId);
|
|
403
|
+
if (!b)
|
|
38
404
|
throw new Error("Source column not found");
|
|
39
|
-
(
|
|
40
|
-
const
|
|
41
|
-
|
|
405
|
+
(m = h.dataTransfer) == null || m.setData("text/plain", c._id), (D = h.dataTransfer) == null || D.setData("application/json", JSON.stringify(c));
|
|
406
|
+
const L = p.cloneNode(!0);
|
|
407
|
+
L.style.cssText = `
|
|
42
408
|
position: fixed;
|
|
43
409
|
top: -1000px;
|
|
44
410
|
left: -1000px;
|
|
@@ -50,645 +416,645 @@ function Ft({
|
|
|
50
416
|
max-width: 300px;
|
|
51
417
|
background: white;
|
|
52
418
|
border-radius: 8px;
|
|
53
|
-
`, document.body.appendChild(
|
|
419
|
+
`, document.body.appendChild(L), f.current = L, h.dataTransfer && h.dataTransfer.setDragImage(L, h.offsetX || 50, h.offsetY || 20), d({
|
|
54
420
|
isDragging: !0,
|
|
55
|
-
draggedCard:
|
|
421
|
+
draggedCard: c,
|
|
56
422
|
dragOverColumn: null,
|
|
57
423
|
dragOverPosition: null,
|
|
58
|
-
dragSourceColumn:
|
|
59
|
-
}),
|
|
60
|
-
} catch (
|
|
61
|
-
|
|
424
|
+
dragSourceColumn: b._id
|
|
425
|
+
}), t == null || t(c, b.title, "being moved");
|
|
426
|
+
} catch (p) {
|
|
427
|
+
e == null || e(p instanceof Error ? p : new Error("Drag start failed")), E();
|
|
62
428
|
}
|
|
63
|
-
}, [
|
|
64
|
-
if (
|
|
65
|
-
const
|
|
66
|
-
|
|
67
|
-
...
|
|
68
|
-
dragOverColumn: (
|
|
429
|
+
}, [C, e, E, t]), q = _((h, c) => {
|
|
430
|
+
if (h.preventDefault(), !i.isDragging || !i.draggedCard) return;
|
|
431
|
+
const m = c ? C(c) : null;
|
|
432
|
+
d((D) => ({
|
|
433
|
+
...D,
|
|
434
|
+
dragOverColumn: (m == null ? void 0 : m._id) || null,
|
|
69
435
|
dragOverPosition: null
|
|
70
436
|
// Will be calculated based on mouse position
|
|
71
|
-
})),
|
|
72
|
-
}, [
|
|
73
|
-
if (
|
|
437
|
+
})), P(h);
|
|
438
|
+
}, [i.isDragging, i.draggedCard, C]), J = _((h, c) => {
|
|
439
|
+
if (h.preventDefault(), !(!i.isDragging || !i.draggedCard))
|
|
74
440
|
try {
|
|
75
|
-
const
|
|
76
|
-
if (!
|
|
441
|
+
const m = i.draggedCard, D = i.dragSourceColumn, p = C(c), b = C(D);
|
|
442
|
+
if (!p || !b)
|
|
77
443
|
throw new Error("Target or source column not found");
|
|
78
|
-
if (
|
|
79
|
-
|
|
444
|
+
if (D === c) {
|
|
445
|
+
E();
|
|
80
446
|
return;
|
|
81
447
|
}
|
|
82
|
-
if (
|
|
83
|
-
throw new Error(`Column "${
|
|
84
|
-
|
|
85
|
-
} catch (
|
|
86
|
-
|
|
448
|
+
if (p.limit && p.cards.length >= p.limit)
|
|
449
|
+
throw new Error(`Column "${p.title}" has reached its limit of ${p.limit} cards`);
|
|
450
|
+
a == null || a(m, D, c), t == null || t(m, b.title, p.title);
|
|
451
|
+
} catch (m) {
|
|
452
|
+
e == null || e(m instanceof Error ? m : new Error("Drop failed"));
|
|
87
453
|
} finally {
|
|
88
|
-
|
|
454
|
+
E();
|
|
89
455
|
}
|
|
90
|
-
}, [
|
|
91
|
-
|
|
92
|
-
}, [
|
|
93
|
-
const
|
|
94
|
-
if (!
|
|
95
|
-
const
|
|
96
|
-
let
|
|
97
|
-
if (
|
|
98
|
-
|
|
99
|
-
const
|
|
100
|
-
|
|
456
|
+
}, [i, C, a, e, E, t]), g = _(() => {
|
|
457
|
+
f.current && (document.body.removeChild(f.current), f.current = null), E();
|
|
458
|
+
}, [E]), P = _((h) => {
|
|
459
|
+
const c = h.target.closest(".kanban-container");
|
|
460
|
+
if (!c) return;
|
|
461
|
+
const m = c.getBoundingClientRect(), D = h.clientX - m.left, p = m.width;
|
|
462
|
+
let b = 0;
|
|
463
|
+
if (D < Xt ? b = -zt : D > p - Xt && (b = zt), b !== 0) {
|
|
464
|
+
y.current && clearTimeout(y.current);
|
|
465
|
+
const L = () => {
|
|
466
|
+
c.scrollLeft += b, y.current = setTimeout(L, 16);
|
|
101
467
|
};
|
|
102
|
-
|
|
468
|
+
y.current = setTimeout(L, 100);
|
|
103
469
|
} else
|
|
104
|
-
|
|
105
|
-
}, []),
|
|
106
|
-
if (!["ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown", "Enter", "Space", "Escape"].includes(
|
|
470
|
+
y.current && (clearTimeout(y.current), y.current = null);
|
|
471
|
+
}, []), k = _((h, c) => {
|
|
472
|
+
if (!["ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown", "Enter", "Space", "Escape"].includes(h.key))
|
|
107
473
|
return;
|
|
108
|
-
|
|
109
|
-
const
|
|
110
|
-
if (!
|
|
111
|
-
const { column:
|
|
474
|
+
h.preventDefault();
|
|
475
|
+
const m = O(c._id);
|
|
476
|
+
if (!m) return;
|
|
477
|
+
const { column: D } = m, p = s.findIndex((b) => b._id === D._id);
|
|
112
478
|
try {
|
|
113
|
-
switch (
|
|
479
|
+
switch (h.key) {
|
|
114
480
|
case "ArrowLeft":
|
|
115
|
-
if (
|
|
116
|
-
const
|
|
117
|
-
|
|
481
|
+
if (p > 0) {
|
|
482
|
+
const b = s[p - 1];
|
|
483
|
+
a == null || a(c, D._id, b._id), t == null || t(c, D.title, b.title);
|
|
118
484
|
}
|
|
119
485
|
break;
|
|
120
486
|
case "ArrowRight":
|
|
121
|
-
if (
|
|
122
|
-
const
|
|
123
|
-
|
|
487
|
+
if (p < s.length - 1) {
|
|
488
|
+
const b = s[p + 1];
|
|
489
|
+
a == null || a(c, D._id, b._id), t == null || t(c, D.title, b.title);
|
|
124
490
|
}
|
|
125
491
|
break;
|
|
126
492
|
case "ArrowUp":
|
|
127
|
-
|
|
493
|
+
t == null || t(c, "current position", "position above");
|
|
128
494
|
break;
|
|
129
495
|
case "ArrowDown":
|
|
130
|
-
|
|
496
|
+
t == null || t(c, "current position", "position below");
|
|
131
497
|
break;
|
|
132
498
|
case "Enter":
|
|
133
499
|
case "Space":
|
|
134
|
-
|
|
500
|
+
t == null || t(c, D.title, "drag mode");
|
|
135
501
|
break;
|
|
136
502
|
case "Escape":
|
|
137
|
-
|
|
503
|
+
t == null || t(c, "drag mode", "cancelled");
|
|
138
504
|
break;
|
|
139
505
|
}
|
|
140
|
-
} catch (
|
|
141
|
-
|
|
506
|
+
} catch (b) {
|
|
507
|
+
e == null || e(b instanceof Error ? b : new Error("Keyboard navigation failed"));
|
|
142
508
|
}
|
|
143
|
-
}, [
|
|
144
|
-
const
|
|
145
|
-
|
|
146
|
-
x:
|
|
147
|
-
y:
|
|
148
|
-
card:
|
|
509
|
+
}, [O, s, a, e, t]), X = _((h, c) => {
|
|
510
|
+
const m = h.touches[0];
|
|
511
|
+
Q.current = {
|
|
512
|
+
x: m.clientX,
|
|
513
|
+
y: m.clientY,
|
|
514
|
+
card: c
|
|
149
515
|
};
|
|
150
|
-
}, []),
|
|
151
|
-
if (!
|
|
152
|
-
const
|
|
153
|
-
if (
|
|
154
|
-
const
|
|
155
|
-
if (!
|
|
156
|
-
|
|
516
|
+
}, []), et = _((h) => {
|
|
517
|
+
if (!Q.current) return;
|
|
518
|
+
const c = h.touches[0], m = Math.abs(c.clientX - Q.current.x), D = Math.abs(c.clientY - Q.current.y);
|
|
519
|
+
if (m > Nt || D > Nt) {
|
|
520
|
+
const p = Q.current.card, b = C(p.columnId);
|
|
521
|
+
if (!b) return;
|
|
522
|
+
d({
|
|
157
523
|
isDragging: !0,
|
|
158
|
-
draggedCard:
|
|
524
|
+
draggedCard: p,
|
|
159
525
|
dragOverColumn: null,
|
|
160
526
|
dragOverPosition: null,
|
|
161
|
-
dragSourceColumn:
|
|
162
|
-
}),
|
|
527
|
+
dragSourceColumn: b._id
|
|
528
|
+
}), t == null || t(p, b.title, "being moved");
|
|
163
529
|
}
|
|
164
|
-
}, [
|
|
165
|
-
if (!
|
|
166
|
-
|
|
530
|
+
}, [C, t]), S = _((h) => {
|
|
531
|
+
if (!i.isDragging || !i.draggedCard || !Q.current) {
|
|
532
|
+
Q.current = null;
|
|
167
533
|
return;
|
|
168
534
|
}
|
|
169
535
|
try {
|
|
170
|
-
const
|
|
171
|
-
if (
|
|
172
|
-
const
|
|
173
|
-
if (
|
|
174
|
-
if (
|
|
175
|
-
throw new Error(`Column "${
|
|
176
|
-
|
|
536
|
+
const c = h.changedTouches[0], m = document.elementFromPoint(c.clientX, c.clientY), D = m == null ? void 0 : m.closest("[data-column-id]");
|
|
537
|
+
if (D) {
|
|
538
|
+
const p = D.dataset.columnId, b = i.draggedCard, L = i.dragSourceColumn, U = C(p), gt = C(L);
|
|
539
|
+
if (U && gt && L !== p) {
|
|
540
|
+
if (U.limit && U.cards.length >= U.limit)
|
|
541
|
+
throw new Error(`Column "${U.title}" has reached its limit of ${U.limit} cards`);
|
|
542
|
+
a == null || a(b, L, p), t == null || t(b, gt.title, U.title);
|
|
177
543
|
}
|
|
178
544
|
}
|
|
179
|
-
} catch (
|
|
180
|
-
|
|
545
|
+
} catch (c) {
|
|
546
|
+
e == null || e(c instanceof Error ? c : new Error("Touch drop failed"));
|
|
181
547
|
} finally {
|
|
182
|
-
|
|
548
|
+
Q.current = null, E();
|
|
183
549
|
}
|
|
184
|
-
}, [
|
|
185
|
-
const
|
|
186
|
-
|
|
187
|
-
document.body.removeChild(
|
|
188
|
-
}, 1e3), console.log(`Kanban: ${
|
|
550
|
+
}, [i, C, a, e, E, t]), V = _((h, c, m) => {
|
|
551
|
+
const D = `Moved "${h.title}" from ${c} to ${m}`, p = document.createElement("div");
|
|
552
|
+
p.setAttribute("aria-live", "polite"), p.setAttribute("aria-atomic", "true"), p.className = "sr-only", p.textContent = D, document.body.appendChild(p), setTimeout(() => {
|
|
553
|
+
document.body.removeChild(p);
|
|
554
|
+
}, 1e3), console.log(`Kanban: ${D}`);
|
|
189
555
|
}, []);
|
|
190
|
-
return
|
|
191
|
-
|
|
556
|
+
return _t(() => () => {
|
|
557
|
+
y.current && clearTimeout(y.current), f.current && document.body.contains(f.current) && document.body.removeChild(f.current);
|
|
192
558
|
}, []), {
|
|
193
559
|
// State
|
|
194
|
-
isDragging:
|
|
195
|
-
draggedCard:
|
|
196
|
-
dragOverColumn:
|
|
197
|
-
dragOverPosition:
|
|
198
|
-
dragSourceColumn:
|
|
560
|
+
isDragging: i.isDragging,
|
|
561
|
+
draggedCard: i.draggedCard,
|
|
562
|
+
dragOverColumn: i.dragOverColumn,
|
|
563
|
+
dragOverPosition: i.dragOverPosition,
|
|
564
|
+
dragSourceColumn: i.dragSourceColumn,
|
|
199
565
|
// Handlers
|
|
200
|
-
handleDragStart:
|
|
201
|
-
handleDragOver:
|
|
202
|
-
handleDrop:
|
|
203
|
-
handleDragEnd:
|
|
204
|
-
handleKeyDown:
|
|
205
|
-
handleTouchStart:
|
|
206
|
-
handleTouchMove:
|
|
207
|
-
handleTouchEnd:
|
|
566
|
+
handleDragStart: K,
|
|
567
|
+
handleDragOver: q,
|
|
568
|
+
handleDrop: J,
|
|
569
|
+
handleDragEnd: g,
|
|
570
|
+
handleKeyDown: k,
|
|
571
|
+
handleTouchStart: X,
|
|
572
|
+
handleTouchMove: et,
|
|
573
|
+
handleTouchEnd: S,
|
|
208
574
|
// Utilities
|
|
209
|
-
announceMove:
|
|
210
|
-
reset:
|
|
575
|
+
announceMove: t || V,
|
|
576
|
+
reset: E
|
|
211
577
|
};
|
|
212
578
|
}
|
|
213
|
-
function
|
|
214
|
-
var
|
|
579
|
+
function Ie(a) {
|
|
580
|
+
var Tt, Rt, Ft;
|
|
215
581
|
const {
|
|
216
|
-
columns:
|
|
217
|
-
source:
|
|
218
|
-
enableDragDrop:
|
|
219
|
-
initialState:
|
|
220
|
-
onCardMove:
|
|
221
|
-
onCardCreate:
|
|
222
|
-
onCardUpdate:
|
|
223
|
-
onCardDelete:
|
|
224
|
-
onError:
|
|
225
|
-
} =
|
|
226
|
-
query: (
|
|
227
|
-
}), [
|
|
228
|
-
field: ((
|
|
229
|
-
direction: ((
|
|
230
|
-
}), [
|
|
231
|
-
const
|
|
232
|
-
return
|
|
233
|
-
|
|
234
|
-
}),
|
|
235
|
-
}),
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
}, [
|
|
239
|
-
const
|
|
240
|
-
initialConditions:
|
|
241
|
-
initialOperator: (
|
|
242
|
-
}),
|
|
243
|
-
const
|
|
582
|
+
columns: e,
|
|
583
|
+
source: s,
|
|
584
|
+
enableDragDrop: t = !0,
|
|
585
|
+
initialState: i,
|
|
586
|
+
onCardMove: d,
|
|
587
|
+
onCardCreate: f,
|
|
588
|
+
onCardUpdate: y,
|
|
589
|
+
onCardDelete: Q,
|
|
590
|
+
onError: E
|
|
591
|
+
} = a, [C, O] = yt({
|
|
592
|
+
query: (i == null ? void 0 : i.search) || ""
|
|
593
|
+
}), [K] = yt({
|
|
594
|
+
field: ((Tt = i == null ? void 0 : i.sorting) == null ? void 0 : Tt.field) || null,
|
|
595
|
+
direction: ((Rt = i == null ? void 0 : i.sorting) == null ? void 0 : Rt.direction) || null
|
|
596
|
+
}), [q, J] = yt(() => {
|
|
597
|
+
const r = {};
|
|
598
|
+
return e.forEach((o) => {
|
|
599
|
+
r[o.id] = 10;
|
|
600
|
+
}), r;
|
|
601
|
+
}), g = G(E), P = G(d), k = G(f), X = G(y), et = G(Q);
|
|
602
|
+
_t(() => {
|
|
603
|
+
g.current = E, P.current = d, k.current = f, X.current = y, et.current = Q;
|
|
604
|
+
}, [E, d, f, y, Q]);
|
|
605
|
+
const S = kt(), V = Ee({
|
|
606
|
+
initialConditions: i == null ? void 0 : i.filters,
|
|
607
|
+
initialOperator: (i == null ? void 0 : i.filterOperator) || "And"
|
|
608
|
+
}), h = _((r) => {
|
|
609
|
+
const o = {
|
|
244
610
|
LHSField: "columnId",
|
|
245
611
|
Operator: "EQ",
|
|
246
|
-
RHSValue:
|
|
612
|
+
RHSValue: r,
|
|
247
613
|
RHSType: "Constant"
|
|
248
|
-
},
|
|
249
|
-
let
|
|
250
|
-
|
|
251
|
-
...
|
|
252
|
-
Condition: [...
|
|
253
|
-
} :
|
|
614
|
+
}, n = V.payload;
|
|
615
|
+
let u;
|
|
616
|
+
n ? n.Operator === "And" ? u = {
|
|
617
|
+
...n,
|
|
618
|
+
Condition: [...n.Condition || [], o]
|
|
619
|
+
} : u = {
|
|
254
620
|
Operator: "And",
|
|
255
|
-
Condition: [
|
|
256
|
-
} :
|
|
621
|
+
Condition: [n, o]
|
|
622
|
+
} : u = {
|
|
257
623
|
Operator: "And",
|
|
258
|
-
Condition: [
|
|
624
|
+
Condition: [o]
|
|
259
625
|
};
|
|
260
|
-
const
|
|
626
|
+
const w = {
|
|
261
627
|
Page: 1,
|
|
262
628
|
// Always page 1 due to expanding PageSize strategy
|
|
263
|
-
PageSize:
|
|
264
|
-
Filter:
|
|
629
|
+
PageSize: q[r] || 10,
|
|
630
|
+
Filter: u
|
|
265
631
|
};
|
|
266
|
-
return
|
|
267
|
-
{ [String(
|
|
632
|
+
return K.field && K.direction ? w.Sort = [
|
|
633
|
+
{ [String(K.field)]: K.direction === "asc" ? "ASC" : "DESC" },
|
|
268
634
|
{ position: "ASC" }
|
|
269
|
-
] :
|
|
635
|
+
] : w.Sort = [
|
|
270
636
|
{ columnId: "ASC" },
|
|
271
637
|
{ position: "ASC" }
|
|
272
|
-
],
|
|
273
|
-
}, [
|
|
274
|
-
queries:
|
|
275
|
-
const
|
|
638
|
+
], C.query && (w.Search = C.query), w;
|
|
639
|
+
}, [V.payload, q, K, C.query]), c = ke({
|
|
640
|
+
queries: e.map((r) => {
|
|
641
|
+
const o = h(r.id);
|
|
276
642
|
return {
|
|
277
|
-
queryKey: ["kanban-cards",
|
|
643
|
+
queryKey: ["kanban-cards", s, r.id, o],
|
|
278
644
|
queryFn: async () => {
|
|
279
645
|
try {
|
|
280
|
-
return await
|
|
281
|
-
} catch (
|
|
282
|
-
throw
|
|
646
|
+
return await M(s).list(o);
|
|
647
|
+
} catch (n) {
|
|
648
|
+
throw n;
|
|
283
649
|
}
|
|
284
650
|
},
|
|
285
|
-
placeholderData:
|
|
651
|
+
placeholderData: _e,
|
|
286
652
|
staleTime: 30 * 1e3
|
|
287
653
|
};
|
|
288
654
|
})
|
|
289
|
-
}),
|
|
290
|
-
await Promise.all(
|
|
291
|
-
},
|
|
292
|
-
const
|
|
293
|
-
return
|
|
294
|
-
}, [
|
|
295
|
-
data:
|
|
296
|
-
isLoading:
|
|
297
|
-
error:
|
|
298
|
-
} =
|
|
299
|
-
queryKey: ["kanban-count",
|
|
655
|
+
}), m = c.some((r) => r.isLoading), D = c.some((r) => r.isFetching), p = ((Ft = c.find((r) => r.error)) == null ? void 0 : Ft.error) || null, b = async () => {
|
|
656
|
+
await Promise.all(c.map((r) => r.refetch()));
|
|
657
|
+
}, L = Ht(() => {
|
|
658
|
+
const r = {};
|
|
659
|
+
return C.query && (r.Search = C.query), V.payload && (r.Filter = V.payload), r;
|
|
660
|
+
}, [C.query, V.payload]), {
|
|
661
|
+
data: U,
|
|
662
|
+
isLoading: gt,
|
|
663
|
+
error: xt
|
|
664
|
+
} = Qe({
|
|
665
|
+
queryKey: ["kanban-count", s, L],
|
|
300
666
|
queryFn: async () => {
|
|
301
667
|
try {
|
|
302
|
-
return await
|
|
303
|
-
} catch (
|
|
304
|
-
throw
|
|
668
|
+
return await M(s).count(L);
|
|
669
|
+
} catch (r) {
|
|
670
|
+
throw g.current && g.current(r), r;
|
|
305
671
|
}
|
|
306
672
|
},
|
|
307
673
|
staleTime: 30 * 1e3,
|
|
308
674
|
gcTime: 60 * 1e3
|
|
309
|
-
}),
|
|
310
|
-
mutationFn: async (
|
|
311
|
-
const
|
|
312
|
-
return (await
|
|
675
|
+
}), At = ut({
|
|
676
|
+
mutationFn: async (r) => {
|
|
677
|
+
const o = r.position ?? 999999;
|
|
678
|
+
return (await M(s).create({ ...r, position: o }))._id;
|
|
313
679
|
},
|
|
314
|
-
onMutate: async (
|
|
315
|
-
const
|
|
316
|
-
await
|
|
317
|
-
const
|
|
318
|
-
if (
|
|
319
|
-
const
|
|
320
|
-
...
|
|
321
|
-
_id:
|
|
322
|
-
position:
|
|
680
|
+
onMutate: async (r) => {
|
|
681
|
+
const o = r.columnId, n = h(o), u = ["kanban-cards", s, o, n];
|
|
682
|
+
await S.cancelQueries({ queryKey: u });
|
|
683
|
+
const w = S.getQueryData(u);
|
|
684
|
+
if (w) {
|
|
685
|
+
const rt = w.Data, j = r.position ?? rt.length, st = `temp-${Date.now()}`, x = {
|
|
686
|
+
...r,
|
|
687
|
+
_id: st,
|
|
688
|
+
position: j,
|
|
323
689
|
_created_at: /* @__PURE__ */ new Date(),
|
|
324
690
|
_modified_at: /* @__PURE__ */ new Date()
|
|
325
691
|
};
|
|
326
|
-
|
|
327
|
-
...
|
|
328
|
-
Data: [...
|
|
692
|
+
S.setQueryData(u, {
|
|
693
|
+
...w,
|
|
694
|
+
Data: [...w.Data, x]
|
|
329
695
|
});
|
|
330
696
|
}
|
|
331
|
-
return { previousCards:
|
|
697
|
+
return { previousCards: w, queryKey: u };
|
|
332
698
|
},
|
|
333
|
-
onSuccess: async (
|
|
334
|
-
var
|
|
335
|
-
|
|
336
|
-
_id:
|
|
337
|
-
...
|
|
699
|
+
onSuccess: async (r, o, n) => {
|
|
700
|
+
var u;
|
|
701
|
+
n != null && n.queryKey && await S.invalidateQueries({ queryKey: n.queryKey }), (u = k.current) == null || u.call(k, {
|
|
702
|
+
_id: r,
|
|
703
|
+
...o
|
|
338
704
|
});
|
|
339
705
|
},
|
|
340
|
-
onError: (
|
|
341
|
-
var
|
|
342
|
-
|
|
706
|
+
onError: (r, o, n) => {
|
|
707
|
+
var u;
|
|
708
|
+
n != null && n.previousCards && (n != null && n.queryKey) && S.setQueryData(n.queryKey, n.previousCards), (u = g.current) == null || u.call(g, r);
|
|
343
709
|
},
|
|
344
|
-
onSettled: (
|
|
345
|
-
const
|
|
346
|
-
|
|
710
|
+
onSettled: (r, o, n) => {
|
|
711
|
+
const u = n.columnId, w = h(u);
|
|
712
|
+
S.invalidateQueries({ queryKey: ["kanban-cards", s, u, w] });
|
|
347
713
|
}
|
|
348
|
-
}),
|
|
349
|
-
mutationFn: async ({ id:
|
|
350
|
-
onMutate: async () => (await
|
|
351
|
-
onSuccess: async (
|
|
352
|
-
var
|
|
353
|
-
(
|
|
714
|
+
}), bt = ut({
|
|
715
|
+
mutationFn: async ({ id: r, updates: o }) => (await M(s).update(r, o), { id: r, updates: o }),
|
|
716
|
+
onMutate: async () => (await S.cancelQueries({ queryKey: ["kanban-cards", s] }), {}),
|
|
717
|
+
onSuccess: async (r) => {
|
|
718
|
+
var o;
|
|
719
|
+
(o = X.current) == null || o.call(X, { _id: r.id, ...r.updates });
|
|
354
720
|
},
|
|
355
|
-
onError: (
|
|
356
|
-
var
|
|
357
|
-
(
|
|
721
|
+
onError: (r, o, n) => {
|
|
722
|
+
var u;
|
|
723
|
+
(u = g.current) == null || u.call(g, r);
|
|
358
724
|
},
|
|
359
725
|
onSettled: () => {
|
|
360
|
-
|
|
726
|
+
S.invalidateQueries({ queryKey: ["kanban-cards", s] });
|
|
361
727
|
}
|
|
362
|
-
}),
|
|
363
|
-
mutationFn: async (
|
|
364
|
-
onMutate: async () => (await
|
|
365
|
-
onSuccess: async (
|
|
366
|
-
var
|
|
367
|
-
(
|
|
728
|
+
}), Ct = ut({
|
|
729
|
+
mutationFn: async (r) => (await M(s).delete(r), r),
|
|
730
|
+
onMutate: async () => (await S.cancelQueries({ queryKey: ["kanban-cards", s] }), {}),
|
|
731
|
+
onSuccess: async (r) => {
|
|
732
|
+
var o;
|
|
733
|
+
(o = et.current) == null || o.call(et, r);
|
|
368
734
|
},
|
|
369
|
-
onError: (
|
|
370
|
-
var
|
|
371
|
-
(
|
|
735
|
+
onError: (r, o, n) => {
|
|
736
|
+
var u;
|
|
737
|
+
(u = g.current) == null || u.call(g, r);
|
|
372
738
|
},
|
|
373
739
|
onSettled: () => {
|
|
374
|
-
|
|
740
|
+
S.invalidateQueries({ queryKey: ["kanban-cards", s] });
|
|
375
741
|
}
|
|
376
|
-
}),
|
|
377
|
-
mutationFn: async ({ cardId:
|
|
378
|
-
const
|
|
379
|
-
return await
|
|
742
|
+
}), nt = ut({
|
|
743
|
+
mutationFn: async ({ cardId: r, fromColumnId: o, toColumnId: n, position: u }) => {
|
|
744
|
+
const w = { columnId: n, ...u !== void 0 && { position: u } };
|
|
745
|
+
return await M(s).update(r, w), { cardId: r, fromColumnId: o, toColumnId: n, position: u };
|
|
380
746
|
},
|
|
381
|
-
onMutate: async ({ cardId:
|
|
382
|
-
const
|
|
383
|
-
await
|
|
384
|
-
const
|
|
385
|
-
if (
|
|
386
|
-
const
|
|
387
|
-
if (
|
|
388
|
-
const
|
|
389
|
-
...
|
|
390
|
-
Data:
|
|
391
|
-
},
|
|
392
|
-
...
|
|
393
|
-
columnId:
|
|
394
|
-
position:
|
|
747
|
+
onMutate: async ({ cardId: r, fromColumnId: o, toColumnId: n, position: u }) => {
|
|
748
|
+
const w = h(o), rt = h(n), j = ["kanban-cards", s, o, w], st = ["kanban-cards", s, n, rt];
|
|
749
|
+
await S.cancelQueries({ queryKey: j }), await S.cancelQueries({ queryKey: st });
|
|
750
|
+
const x = S.getQueryData(j), ot = S.getQueryData(st);
|
|
751
|
+
if (x && ot) {
|
|
752
|
+
const Lt = x.Data.find((wt) => wt._id === r);
|
|
753
|
+
if (Lt) {
|
|
754
|
+
const wt = {
|
|
755
|
+
...x,
|
|
756
|
+
Data: x.Data.filter((Ot) => Ot._id !== r)
|
|
757
|
+
}, le = {
|
|
758
|
+
...Lt,
|
|
759
|
+
columnId: n,
|
|
760
|
+
position: u ?? ot.Data.length,
|
|
395
761
|
_modified_at: /* @__PURE__ */ new Date()
|
|
396
|
-
},
|
|
397
|
-
...
|
|
398
|
-
Data: [...
|
|
762
|
+
}, de = {
|
|
763
|
+
...ot,
|
|
764
|
+
Data: [...ot.Data, le].sort((Ot, he) => Ot.position - he.position)
|
|
399
765
|
};
|
|
400
|
-
|
|
766
|
+
S.setQueryData(j, wt), S.setQueryData(st, de);
|
|
401
767
|
}
|
|
402
768
|
}
|
|
403
769
|
return {
|
|
404
|
-
previousFromData:
|
|
405
|
-
previousToData:
|
|
406
|
-
fromQueryKey:
|
|
407
|
-
toQueryKey:
|
|
408
|
-
fromColumnId:
|
|
409
|
-
toColumnId:
|
|
770
|
+
previousFromData: x,
|
|
771
|
+
previousToData: ot,
|
|
772
|
+
fromQueryKey: j,
|
|
773
|
+
toQueryKey: st,
|
|
774
|
+
fromColumnId: o,
|
|
775
|
+
toColumnId: n
|
|
410
776
|
};
|
|
411
777
|
},
|
|
412
|
-
onSuccess: async (
|
|
413
|
-
var
|
|
414
|
-
(
|
|
415
|
-
|
|
416
|
-
{ _id:
|
|
417
|
-
|
|
418
|
-
|
|
778
|
+
onSuccess: async (r) => {
|
|
779
|
+
var o;
|
|
780
|
+
(o = P.current) == null || o.call(
|
|
781
|
+
P,
|
|
782
|
+
{ _id: r.cardId },
|
|
783
|
+
r.fromColumnId,
|
|
784
|
+
r.toColumnId
|
|
419
785
|
);
|
|
420
786
|
},
|
|
421
|
-
onError: (
|
|
422
|
-
var
|
|
423
|
-
|
|
787
|
+
onError: (r, o, n) => {
|
|
788
|
+
var u;
|
|
789
|
+
n != null && n.previousFromData && (n != null && n.fromQueryKey) && S.setQueryData(n.fromQueryKey, n.previousFromData), n != null && n.previousToData && (n != null && n.toQueryKey) && S.setQueryData(n.toQueryKey, n.previousToData), (u = g.current) == null || u.call(g, r);
|
|
424
790
|
},
|
|
425
|
-
onSettled: (
|
|
426
|
-
const
|
|
427
|
-
|
|
791
|
+
onSettled: (r, o, n) => {
|
|
792
|
+
const u = h(n.fromColumnId), w = h(n.toColumnId);
|
|
793
|
+
S.invalidateQueries({ queryKey: ["kanban-cards", s, n.fromColumnId, u] }), S.invalidateQueries({ queryKey: ["kanban-cards", s, n.toColumnId, w] });
|
|
428
794
|
}
|
|
429
|
-
}),
|
|
430
|
-
mutationFn: async ({ cardIds:
|
|
431
|
-
const
|
|
795
|
+
}), Dt = ut({
|
|
796
|
+
mutationFn: async ({ cardIds: r, columnId: o }) => {
|
|
797
|
+
const n = r.map((u, w) => ({ id: u, position: w, columnId: o }));
|
|
432
798
|
await Promise.all(
|
|
433
|
-
|
|
434
|
-
(
|
|
799
|
+
n.map(
|
|
800
|
+
(u) => M(s).update(u.id, { position: u.position, columnId: u.columnId })
|
|
435
801
|
)
|
|
436
802
|
);
|
|
437
803
|
},
|
|
438
|
-
onMutate: async ({ columnId:
|
|
439
|
-
const
|
|
440
|
-
return await
|
|
804
|
+
onMutate: async ({ columnId: r }) => {
|
|
805
|
+
const o = h(r), n = ["kanban-cards", s, r, o];
|
|
806
|
+
return await S.cancelQueries({ queryKey: n }), {};
|
|
441
807
|
},
|
|
442
808
|
onSuccess: () => {
|
|
443
809
|
},
|
|
444
|
-
onError: (
|
|
445
|
-
var
|
|
446
|
-
(
|
|
810
|
+
onError: (r, o, n) => {
|
|
811
|
+
var u;
|
|
812
|
+
(u = g.current) == null || u.call(g, r);
|
|
447
813
|
},
|
|
448
|
-
onSettled: (
|
|
449
|
-
const
|
|
450
|
-
|
|
814
|
+
onSettled: (r, o, n) => {
|
|
815
|
+
const u = h(n.columnId);
|
|
816
|
+
S.invalidateQueries({ queryKey: ["kanban-cards", s, n.columnId, u] });
|
|
451
817
|
}
|
|
452
|
-
}),
|
|
453
|
-
async (
|
|
818
|
+
}), Mt = _(
|
|
819
|
+
async (r, o, n) => {
|
|
454
820
|
try {
|
|
455
|
-
await
|
|
456
|
-
cardId:
|
|
457
|
-
fromColumnId:
|
|
458
|
-
toColumnId:
|
|
821
|
+
await nt.mutateAsync({
|
|
822
|
+
cardId: r._id,
|
|
823
|
+
fromColumnId: o,
|
|
824
|
+
toColumnId: n,
|
|
459
825
|
position: void 0
|
|
460
826
|
});
|
|
461
827
|
} catch {
|
|
462
828
|
}
|
|
463
829
|
},
|
|
464
|
-
[
|
|
465
|
-
),
|
|
466
|
-
var
|
|
467
|
-
const
|
|
830
|
+
[nt]
|
|
831
|
+
), ft = Ht(() => e.sort((r, o) => r.position - o.position).map((r, o) => {
|
|
832
|
+
var w;
|
|
833
|
+
const u = ((w = c[o].data) == null ? void 0 : w.Data) || [];
|
|
468
834
|
return {
|
|
469
|
-
_id:
|
|
470
|
-
title:
|
|
471
|
-
position:
|
|
472
|
-
color:
|
|
473
|
-
limit:
|
|
474
|
-
cards:
|
|
835
|
+
_id: r.id,
|
|
836
|
+
title: r.title,
|
|
837
|
+
position: r.position,
|
|
838
|
+
color: r.color,
|
|
839
|
+
limit: r.limit,
|
|
840
|
+
cards: u.sort((rt, j) => rt.position - j.position),
|
|
475
841
|
_created_at: /* @__PURE__ */ new Date(),
|
|
476
842
|
_modified_at: /* @__PURE__ */ new Date()
|
|
477
843
|
};
|
|
478
|
-
}), [
|
|
479
|
-
onCardMove:
|
|
480
|
-
onError:
|
|
481
|
-
columns:
|
|
482
|
-
announceMove: (
|
|
844
|
+
}), [e, c]), A = Ae({
|
|
845
|
+
onCardMove: Mt,
|
|
846
|
+
onError: g.current,
|
|
847
|
+
columns: ft,
|
|
848
|
+
announceMove: (r, o, n) => {
|
|
483
849
|
console.log(
|
|
484
|
-
`Kanban: Moved "${
|
|
850
|
+
`Kanban: Moved "${r.title}" from ${o} to ${n}`
|
|
485
851
|
);
|
|
486
852
|
}
|
|
487
|
-
}),
|
|
488
|
-
(
|
|
489
|
-
var
|
|
853
|
+
}), te = _(
|
|
854
|
+
(r) => {
|
|
855
|
+
var o, n;
|
|
490
856
|
return {
|
|
491
857
|
draggable: !0,
|
|
492
858
|
role: "option",
|
|
493
|
-
"aria-selected":
|
|
494
|
-
"aria-grabbed":
|
|
495
|
-
onDragStart: (
|
|
496
|
-
if (!
|
|
497
|
-
|
|
498
|
-
const
|
|
499
|
-
|
|
859
|
+
"aria-selected": t && ((o = A.draggedCard) == null ? void 0 : o._id) === r._id,
|
|
860
|
+
"aria-grabbed": t && ((n = A.draggedCard) == null ? void 0 : n._id) === r._id,
|
|
861
|
+
onDragStart: (u) => {
|
|
862
|
+
if (!t) return;
|
|
863
|
+
u.dataTransfer.setData("text/plain", JSON.stringify(r));
|
|
864
|
+
const w = u.nativeEvent || u;
|
|
865
|
+
A.handleDragStart(w, r);
|
|
500
866
|
},
|
|
501
|
-
onDragEnd:
|
|
502
|
-
onKeyDown: (
|
|
503
|
-
if (!
|
|
504
|
-
const
|
|
505
|
-
|
|
867
|
+
onDragEnd: A.handleDragEnd,
|
|
868
|
+
onKeyDown: (u) => {
|
|
869
|
+
if (!t) return;
|
|
870
|
+
const w = u.nativeEvent || u;
|
|
871
|
+
A.handleKeyDown(w, r);
|
|
506
872
|
}
|
|
507
873
|
};
|
|
508
874
|
},
|
|
509
|
-
[
|
|
510
|
-
),
|
|
511
|
-
(
|
|
512
|
-
"data-column-id":
|
|
875
|
+
[t, A]
|
|
876
|
+
), ee = _(
|
|
877
|
+
(r) => ({
|
|
878
|
+
"data-column-id": r,
|
|
513
879
|
role: "listbox",
|
|
514
|
-
onDragOver: (
|
|
515
|
-
if (!
|
|
516
|
-
const
|
|
517
|
-
|
|
880
|
+
onDragOver: (o) => {
|
|
881
|
+
if (!t) return;
|
|
882
|
+
const n = o.nativeEvent || o;
|
|
883
|
+
A.handleDragOver(n, r);
|
|
518
884
|
},
|
|
519
|
-
onDrop: (
|
|
520
|
-
if (!
|
|
521
|
-
const
|
|
522
|
-
|
|
885
|
+
onDrop: (o) => {
|
|
886
|
+
if (!t) return;
|
|
887
|
+
const n = o.nativeEvent || o;
|
|
888
|
+
A.handleDrop(n, r);
|
|
523
889
|
}
|
|
524
890
|
}),
|
|
525
|
-
[
|
|
526
|
-
),
|
|
527
|
-
|
|
528
|
-
}, []),
|
|
529
|
-
|
|
530
|
-
}, []),
|
|
531
|
-
await
|
|
532
|
-
}, [
|
|
533
|
-
await
|
|
534
|
-
predicate: (
|
|
891
|
+
[t, A]
|
|
892
|
+
), re = _((r) => {
|
|
893
|
+
O({ query: r });
|
|
894
|
+
}, []), se = _(() => {
|
|
895
|
+
O({ query: "" });
|
|
896
|
+
}, []), ie = (U == null ? void 0 : U.Count) || 0, ae = m || gt, ne = D, oe = At.isPending || bt.isPending || Ct.isPending || nt.isPending || Dt.isPending, pt = p || xt, ue = _(async () => {
|
|
897
|
+
await b();
|
|
898
|
+
}, [b]), ce = _(async () => {
|
|
899
|
+
await S.invalidateQueries({
|
|
900
|
+
predicate: (r) => r.queryKey[0] === "kanban-cards" || r.queryKey[0] === "kanban-count"
|
|
535
901
|
});
|
|
536
|
-
}, [
|
|
537
|
-
return
|
|
538
|
-
|
|
539
|
-
}, [
|
|
902
|
+
}, [S]);
|
|
903
|
+
return _t(() => {
|
|
904
|
+
pt && g.current && g.current(pt);
|
|
905
|
+
}, [pt]), {
|
|
540
906
|
// Data
|
|
541
|
-
columns:
|
|
542
|
-
totalCards:
|
|
907
|
+
columns: ft,
|
|
908
|
+
totalCards: ie,
|
|
543
909
|
// Loading States
|
|
544
|
-
isLoading:
|
|
545
|
-
isFetching:
|
|
546
|
-
isUpdating:
|
|
910
|
+
isLoading: ae,
|
|
911
|
+
isFetching: ne,
|
|
912
|
+
isUpdating: oe,
|
|
547
913
|
// Error Handling
|
|
548
|
-
error:
|
|
914
|
+
error: pt,
|
|
549
915
|
// Card Operations (Flat Access)
|
|
550
|
-
createCard:
|
|
551
|
-
updateCard:
|
|
552
|
-
async (
|
|
553
|
-
await
|
|
916
|
+
createCard: At.mutateAsync,
|
|
917
|
+
updateCard: _(
|
|
918
|
+
async (r, o) => {
|
|
919
|
+
await bt.mutateAsync({ id: r, updates: o });
|
|
554
920
|
},
|
|
555
|
-
[
|
|
921
|
+
[bt]
|
|
556
922
|
),
|
|
557
|
-
deleteCard:
|
|
558
|
-
async (
|
|
559
|
-
await
|
|
923
|
+
deleteCard: _(
|
|
924
|
+
async (r) => {
|
|
925
|
+
await Ct.mutateAsync(r);
|
|
560
926
|
},
|
|
561
|
-
[
|
|
927
|
+
[Ct]
|
|
562
928
|
),
|
|
563
|
-
moveCard:
|
|
564
|
-
async (
|
|
565
|
-
if (!
|
|
566
|
-
for (const
|
|
567
|
-
if (
|
|
568
|
-
|
|
929
|
+
moveCard: _(
|
|
930
|
+
async (r, o, n, u) => {
|
|
931
|
+
if (!u) {
|
|
932
|
+
for (const w of ft)
|
|
933
|
+
if (w.cards.find((j) => j._id === r)) {
|
|
934
|
+
u = w._id;
|
|
569
935
|
break;
|
|
570
936
|
}
|
|
571
|
-
if (!
|
|
572
|
-
throw new Error(`Card ${
|
|
937
|
+
if (!u)
|
|
938
|
+
throw new Error(`Card ${r} not found in any column`);
|
|
573
939
|
}
|
|
574
|
-
await
|
|
940
|
+
await nt.mutateAsync({ cardId: r, fromColumnId: u, toColumnId: o, position: n });
|
|
575
941
|
},
|
|
576
|
-
[
|
|
942
|
+
[nt, ft]
|
|
577
943
|
),
|
|
578
|
-
reorderCards:
|
|
579
|
-
async (
|
|
580
|
-
await
|
|
944
|
+
reorderCards: _(
|
|
945
|
+
async (r, o) => {
|
|
946
|
+
await Dt.mutateAsync({ cardIds: r, columnId: o });
|
|
581
947
|
},
|
|
582
|
-
[
|
|
948
|
+
[Dt]
|
|
583
949
|
),
|
|
584
950
|
// Search (Flat Access)
|
|
585
|
-
searchQuery:
|
|
586
|
-
setSearchQuery:
|
|
587
|
-
clearSearch:
|
|
951
|
+
searchQuery: C.query,
|
|
952
|
+
setSearchQuery: re,
|
|
953
|
+
clearSearch: se,
|
|
588
954
|
// Filter (Simplified chainable API)
|
|
589
|
-
filter:
|
|
955
|
+
filter: V,
|
|
590
956
|
// Drag Drop (Flat Access)
|
|
591
|
-
isDragging:
|
|
592
|
-
draggedCard:
|
|
593
|
-
dragOverColumn:
|
|
594
|
-
handleDragStart:
|
|
957
|
+
isDragging: t ? A.isDragging : !1,
|
|
958
|
+
draggedCard: t ? A.draggedCard : null,
|
|
959
|
+
dragOverColumn: t ? A.dragOverColumn : null,
|
|
960
|
+
handleDragStart: t ? A.handleDragStart : () => {
|
|
595
961
|
},
|
|
596
|
-
handleDragOver:
|
|
962
|
+
handleDragOver: t ? A.handleDragOver : () => {
|
|
597
963
|
},
|
|
598
|
-
handleDrop:
|
|
964
|
+
handleDrop: t ? A.handleDrop : () => {
|
|
599
965
|
},
|
|
600
|
-
handleDragEnd:
|
|
966
|
+
handleDragEnd: t ? A.handleDragEnd : () => {
|
|
601
967
|
},
|
|
602
|
-
handleKeyDown:
|
|
968
|
+
handleKeyDown: t ? A.handleKeyDown : () => {
|
|
603
969
|
},
|
|
604
970
|
// Prop Getters
|
|
605
|
-
getCardProps:
|
|
606
|
-
getColumnProps:
|
|
971
|
+
getCardProps: t ? te : (r) => ({}),
|
|
972
|
+
getColumnProps: t ? ee : (r) => ({}),
|
|
607
973
|
// Load More (Per Column)
|
|
608
|
-
loadMore:
|
|
609
|
-
|
|
610
|
-
...
|
|
611
|
-
[
|
|
974
|
+
loadMore: _((r) => {
|
|
975
|
+
J((o) => ({
|
|
976
|
+
...o,
|
|
977
|
+
[r]: (o[r] || 10) + 10
|
|
612
978
|
}));
|
|
613
979
|
}, []),
|
|
614
980
|
// Utilities
|
|
615
|
-
refetch:
|
|
616
|
-
refresh:
|
|
981
|
+
refetch: ue,
|
|
982
|
+
refresh: ce
|
|
617
983
|
};
|
|
618
984
|
}
|
|
619
|
-
const
|
|
620
|
-
function
|
|
621
|
-
const
|
|
622
|
-
if (!
|
|
985
|
+
const Te = ge(null);
|
|
986
|
+
function Ue() {
|
|
987
|
+
const a = fe(Te);
|
|
988
|
+
if (!a)
|
|
623
989
|
throw new Error(
|
|
624
990
|
"Kanban components must be used within a KanbanBoard component"
|
|
625
991
|
);
|
|
626
|
-
return
|
|
992
|
+
return a;
|
|
627
993
|
}
|
|
628
|
-
function
|
|
629
|
-
const
|
|
630
|
-
return
|
|
631
|
-
...
|
|
632
|
-
cards: (
|
|
994
|
+
function je(a, e) {
|
|
995
|
+
const s = e.reduce((t, i) => (t[i.columnId] || (t[i.columnId] = []), t[i.columnId].push(i), t), {});
|
|
996
|
+
return a.map((t) => ({
|
|
997
|
+
...t,
|
|
998
|
+
cards: (s[t._id] || []).sort((i, d) => i.position - d.position)
|
|
633
999
|
}));
|
|
634
1000
|
}
|
|
635
|
-
function
|
|
636
|
-
if (
|
|
1001
|
+
function Be(a, e) {
|
|
1002
|
+
if (a.cards.length === 0)
|
|
637
1003
|
return 0;
|
|
638
|
-
if (
|
|
639
|
-
return
|
|
640
|
-
if (
|
|
641
|
-
const
|
|
642
|
-
return Math.max(0,
|
|
1004
|
+
if (e === void 0 || e >= a.cards.length)
|
|
1005
|
+
return a.cards[a.cards.length - 1].position + 1;
|
|
1006
|
+
if (e === 0) {
|
|
1007
|
+
const i = a.cards[0];
|
|
1008
|
+
return Math.max(0, i.position - 1);
|
|
643
1009
|
}
|
|
644
|
-
const
|
|
645
|
-
return Math.floor((
|
|
1010
|
+
const s = a.cards[e - 1], t = a.cards[e];
|
|
1011
|
+
return Math.floor((s.position + t.position) / 2);
|
|
646
1012
|
}
|
|
647
|
-
function
|
|
648
|
-
if (
|
|
1013
|
+
function Xe(a, e) {
|
|
1014
|
+
if (a.length === 0)
|
|
649
1015
|
return 0;
|
|
650
|
-
if (
|
|
651
|
-
return
|
|
652
|
-
if (
|
|
653
|
-
const
|
|
654
|
-
return Math.max(0,
|
|
1016
|
+
if (e === void 0 || e >= a.length)
|
|
1017
|
+
return a[a.length - 1].position + 1;
|
|
1018
|
+
if (e === 0) {
|
|
1019
|
+
const i = a[0];
|
|
1020
|
+
return Math.max(0, i.position - 1);
|
|
655
1021
|
}
|
|
656
|
-
const
|
|
657
|
-
return Math.floor((
|
|
1022
|
+
const s = a[e - 1], t = a[e];
|
|
1023
|
+
return Math.floor((s.position + t.position) / 2);
|
|
658
1024
|
}
|
|
659
|
-
function
|
|
660
|
-
return
|
|
661
|
-
...
|
|
662
|
-
position:
|
|
1025
|
+
function ze(a) {
|
|
1026
|
+
return a.sort((e, s) => e.position - s.position).map((e, s) => ({
|
|
1027
|
+
...e,
|
|
1028
|
+
position: s
|
|
663
1029
|
}));
|
|
664
1030
|
}
|
|
665
|
-
function
|
|
666
|
-
const
|
|
667
|
-
return
|
|
1031
|
+
function Ne(a, e, s, t) {
|
|
1032
|
+
const i = `Failed to ${e} ${s}`, d = t ? ` (ID: ${t})` : "";
|
|
1033
|
+
return a instanceof Error ? new Error(`${i}${d}: ${a.message}`) : new Error(`${i}${d}: Unknown error`);
|
|
668
1034
|
}
|
|
669
|
-
function
|
|
670
|
-
switch (
|
|
1035
|
+
function Ye(a, e) {
|
|
1036
|
+
switch (e) {
|
|
671
1037
|
case "list":
|
|
672
|
-
return
|
|
1038
|
+
return a && Array.isArray(a.Data);
|
|
673
1039
|
case "single":
|
|
674
|
-
return
|
|
1040
|
+
return a && typeof a == "object";
|
|
675
1041
|
case "create":
|
|
676
|
-
return
|
|
1042
|
+
return a && typeof a._id == "string";
|
|
677
1043
|
case "delete":
|
|
678
|
-
return
|
|
1044
|
+
return a && a.status === "success";
|
|
679
1045
|
default:
|
|
680
1046
|
return !1;
|
|
681
1047
|
}
|
|
682
1048
|
}
|
|
683
1049
|
export {
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
1050
|
+
Te as KanbanContext,
|
|
1051
|
+
Be as calculateCardPosition,
|
|
1052
|
+
Xe as calculateColumnPosition,
|
|
1053
|
+
Ne as handleKanbanApiError,
|
|
1054
|
+
je as mergeCardsIntoColumns,
|
|
1055
|
+
ze as normalizePositions,
|
|
1056
|
+
Ae as useDragDropManager,
|
|
1057
|
+
Ie as useKanban,
|
|
1058
|
+
Ue as useKanbanContext,
|
|
1059
|
+
Ye as validateApiResponse
|
|
694
1060
|
};
|