ezux 1.1.11 → 1.1.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/{EzContextMenu-C3eDRS7E.cjs → EzContextMenu-B6HBUjWv.cjs} +1 -1
- package/dist/{EzContextMenu-BsHdOgtL.js → EzContextMenu-BSA_B6Pr.js} +1 -1
- package/dist/{EzEventModal-FP2rs1pp.js → EzEventModal-BUMp_BFi.js} +6 -6
- package/dist/{EzEventModal-DkowH9rh.cjs → EzEventModal-xzHfzi0O.cjs} +1 -1
- package/dist/{EzGroupingPanel-DuKrZuqq.js → EzGroupingPanel-BUsIYDRi.js} +5 -5
- package/dist/EzGroupingPanel-D0HdSomF.cjs +1 -0
- package/dist/{EzSchedulerQuickAdd-s2jtG8vH.js → EzSchedulerQuickAdd-C653LTGh.js} +5 -5
- package/dist/{EzSchedulerQuickAdd-BLF22CDh.cjs → EzSchedulerQuickAdd-UnOWCpJd.cjs} +1 -1
- package/dist/{EzSchedulerToolbar-CaVVmnjt.cjs → EzSchedulerToolbar-C-5OdRY6.cjs} +1 -1
- package/dist/{EzSchedulerToolbar-tz6h80GC.js → EzSchedulerToolbar-CO5jjDQg.js} +15 -15
- package/dist/{EzSignature-CPoQLAyS.cjs → EzSignature-BaNesxwC.cjs} +1 -1
- package/dist/{EzSignature-D7134EQo.js → EzSignature-D4EYwo9W.js} +2 -2
- package/dist/{EzTableEditDialog-3eU6i9cv.js → EzTableEditDialog-Cd948V1C.js} +3 -3
- package/dist/{EzTableEditDialog-ftpeOKI_.cjs → EzTableEditDialog-NiOubaMT.cjs} +1 -1
- package/dist/{EzTableFooter-BiyI1m1O.cjs → EzTableFooter-CWjfGCjL.cjs} +1 -1
- package/dist/{EzTableFooter-DuAaOcLd.js → EzTableFooter-DveD12RC.js} +1 -1
- package/dist/{EzTableToolbar-DmAb94U-.js → EzTableToolbar-Bz8UWv6j.js} +50 -54
- package/dist/EzTableToolbar-DHE7Bb1R.cjs +1 -0
- package/dist/{HighlightText-C0sUEoCH.js → HighlightText-8D6KEyBw.js} +9 -11
- package/dist/HighlightText-LtZmzCle.cjs +1 -0
- package/dist/{NotificationPanel-xjIHKnlE.js → NotificationPanel-D2Y-_ahk.js} +3 -3
- package/dist/NotificationPanel-zLxrtTGf.cjs +1 -0
- package/dist/{TooltipWrapper-Bv7F-Gk4.js → TooltipWrapper-BrRTi5EJ.js} +1 -1
- package/dist/{TooltipWrapper-CgYlx0Jq.cjs → TooltipWrapper-DWts4bAI.cjs} +1 -1
- package/dist/{avatar-BkA_3sri.js → avatar-BeK0E4mn.js} +1 -1
- package/dist/{avatar-CJH7L2Or.cjs → avatar-DZAaTK2f.cjs} +1 -1
- package/dist/bell-DAz8P0BR.js +14 -0
- package/dist/bell-DOX2y38e.cjs +1 -0
- package/dist/{calendar-ChRJyGvt.cjs → calendar-BMZ8ddOf.cjs} +1 -1
- package/dist/{calendar-CCxXqG5a.js → calendar-Dy3rVMW2.js} +4 -4
- package/dist/{checkbox-_Uxyw6xN.cjs → checkbox-B0lGHUyy.cjs} +1 -1
- package/dist/{checkbox-DTLp-Oqj.js → checkbox-boJRxICT.js} +1 -1
- package/dist/circle-x-Cv7bfIC_.js +9 -0
- package/dist/circle-x-DwVXxhXr.cjs +1 -0
- package/dist/{date-time-picker-BPwpIWxg.cjs → date-time-picker-DTxHdPgQ.cjs} +1 -1
- package/dist/{date-time-picker-B9QBboUX.js → date-time-picker-Dj2eftJI.js} +6 -6
- package/dist/ezux.css +1 -1
- package/dist/grip-vertical-CSyDKBul.js +12 -0
- package/dist/grip-vertical-DZNBW1Dn.cjs +1 -0
- package/dist/{index-BmjgUrNF.cjs → index-B3ipEEhH.cjs} +2 -2
- package/dist/index-BPPb7bcs.js +3220 -0
- package/dist/{index-pr_yrvsV.js → index-BQKw_Vho.js} +4026 -1904
- package/dist/{index-B7foCkRR.js → index-C5STgBSy.js} +678 -677
- package/dist/{index-CpEN0z3t.js → index-C6NfgycP.js} +357 -357
- package/dist/index-D4f2ZdrG.cjs +2 -0
- package/dist/index-DUY1SqMo.cjs +1 -0
- package/dist/index-c1Zg--dt.cjs +7 -0
- package/dist/index.cjs +2 -2
- package/dist/index.d.ts +67 -14
- package/dist/index.es.js +136 -135
- package/dist/{input-D1zXv4Kl.cjs → input-BgM_la4k.cjs} +1 -1
- package/dist/{input-DG8ycH6m.js → input-jYQ5VKNR.js} +1 -1
- package/dist/{isBefore-DdLSsf0_.js → isBefore-C3Y_wbk3.js} +1 -1
- package/dist/{isBefore-BAixcVtb.cjs → isBefore-Cp1ttk6q.cjs} +1 -1
- package/dist/kanban.cjs +1 -1
- package/dist/kanban.es.js +4 -4
- package/dist/{label-Ch1wkGGP.js → label-ClOW9UCt.js} +2 -2
- package/dist/{label-DrUloKDN.cjs → label-Dx6oDB-X.cjs} +1 -1
- package/dist/layout.cjs +1 -1
- package/dist/layout.d.ts +29 -1
- package/dist/layout.es.js +3 -3
- package/dist/{popover-4Ng-GmwM.cjs → popover-BJq1CKmi.cjs} +1 -1
- package/dist/{popover-DstiJFa3.js → popover-Cmlb7w3R.js} +1 -1
- package/dist/scheduler.cjs +1 -1
- package/dist/scheduler.es.js +5 -5
- package/dist/{scroll-area-mGPAChYm.js → scroll-area-9fwpVNxT.js} +1 -1
- package/dist/{scroll-area-B_yufXtG.cjs → scroll-area-CwwZSSA4.cjs} +1 -1
- package/dist/select-GxA46anr.cjs +1 -0
- package/dist/select-mDCun_IR.js +35 -0
- package/dist/{settings-HCrwja-A.js → settings-CvyjK75A.js} +14 -14
- package/dist/settings-DKPknrt8.cjs +1 -0
- package/dist/signature.cjs +1 -1
- package/dist/signature.es.js +1 -1
- package/dist/{sortable.esm-DDmDbyCC.cjs → sortable.esm-CsRPuXyD.cjs} +1 -1
- package/dist/{sortable.esm-eBjUK76c.js → sortable.esm-CzMCDPet.js} +1 -1
- package/dist/table.cjs +1 -1
- package/dist/table.d.ts +18 -0
- package/dist/table.es.js +10 -9
- package/dist/theme-vars.css +2 -2
- package/dist/{tooltip-CDLAzCi8.cjs → tooltip-B41iztKT.cjs} +1 -1
- package/dist/{tooltip-C216fkmP.js → tooltip-BCtrEe0z.js} +1 -1
- package/dist/treeview.cjs +1 -2
- package/dist/treeview.es.js +558 -543
- package/dist/{useInitCoreServices-DSudhSFo.cjs → useInitCoreServices-CwXv2p4S.cjs} +1 -1
- package/dist/{useInitCoreServices-BC7QMeLn.js → useInitCoreServices-D1WaWlaI.js} +4 -3
- package/dist/{useService-DBnjCLOu.cjs → useService-8OoezWr8.cjs} +1 -1
- package/dist/{useService-BKWyN7jJ.js → useService-BUi3uAqE.js} +1 -1
- package/dist/{useServiceState-MlrHzngO.cjs → useServiceState-BjpCjUn2.cjs} +1 -1
- package/dist/{useServiceState-DWb3cncq.js → useServiceState-VE-viK8b.js} +1 -1
- package/package.json +21 -20
- package/dist/EzGroupingPanel-Dw4bbefz.cjs +0 -1
- package/dist/EzTableToolbar-qlNVxvsL.cjs +0 -1
- package/dist/HighlightText-BDclEh_K.cjs +0 -1
- package/dist/NotificationPanel-juBrjjOY.cjs +0 -1
- package/dist/index-BKsqtcvu.cjs +0 -2
- package/dist/index-D2HX-sbl.js +0 -3092
- package/dist/index-DEIRrhVY.cjs +0 -1
- package/dist/index-DGhcUfqi.cjs +0 -7
- package/dist/info-BY2cfl1l.cjs +0 -1
- package/dist/info-BuURqzhx.js +0 -14
- package/dist/select-BxcAKVaB.cjs +0 -1
- package/dist/select-BxiFqo8j.js +0 -35
- package/dist/settings-BuS8Pqjb.cjs +0 -1
package/dist/index-D2HX-sbl.js
DELETED
|
@@ -1,3092 +0,0 @@
|
|
|
1
|
-
import { jsx as e, jsxs as d, Fragment as pt } from "react/jsx-runtime";
|
|
2
|
-
import * as ee from "react";
|
|
3
|
-
import we, { useMemo as ce, useRef as Ve, useEffect as xe, useCallback as L, useState as q, memo as Ge, forwardRef as Xe, useImperativeHandle as ft } from "react";
|
|
4
|
-
import { u as Re, a as ne, T as vt, Q as Ct, b as yt } from "./TooltipWrapper-Bv7F-Gk4.js";
|
|
5
|
-
import { c as le, T as et, z as wt, C as Be, N as xt } from "./EzErrorBoundary-D4NBadES.js";
|
|
6
|
-
import { B as $, a as Nt, X as Qe } from "./tooltip-C216fkmP.js";
|
|
7
|
-
import { N as je } from "./NotificationPanel-xjIHKnlE.js";
|
|
8
|
-
import { useStore as ge } from "@tanstack/react-store";
|
|
9
|
-
import { Store as bt } from "@tanstack/store";
|
|
10
|
-
import { l as St, u as be, c as j, b as kt } from "./useInitCoreServices-BC7QMeLn.js";
|
|
11
|
-
import { u as Dt } from "./useServiceState-DWb3cncq.js";
|
|
12
|
-
import { m as It, M as tt, n as Ee, f as Oe, C as At, h as Ue, o as Ft, E as Tt } from "./index-CpEN0z3t.js";
|
|
13
|
-
import { I as pe } from "./input-DG8ycH6m.js";
|
|
14
|
-
import { e as Bt, S as De, a as Ie, b as Ae, c as Fe, d as re } from "./select-BxiFqo8j.js";
|
|
15
|
-
import { P as Et, a as _t, b as Vt, D as zt, c as $t, d as Mt, e as Kt } from "./popover-DstiJFa3.js";
|
|
16
|
-
import { F as Rt, C as Ce, P as Ne } from "./checkbox-DTLp-Oqj.js";
|
|
17
|
-
import { L as oe } from "./label-Ch1wkGGP.js";
|
|
18
|
-
import { S as Lt } from "./scroll-area-mGPAChYm.js";
|
|
19
|
-
import { L as Pt } from "./layers-BA4i1fYX.js";
|
|
20
|
-
import { D as qe } from "./download-panVHmk6.js";
|
|
21
|
-
import { useForm as Qt } from "@tanstack/react-form";
|
|
22
|
-
import { D as _e, P as at } from "./date-time-picker-B9QBboUX.js";
|
|
23
|
-
import { A as ze, a as $e, b as jt } from "./avatar-BkA_3sri.js";
|
|
24
|
-
import { T as nt } from "./calendar-CCxXqG5a.js";
|
|
25
|
-
import { C as st, c as Ot, k as Ut, l as qt, P as Ht, D as Wt, J as Jt } from "./EzContextMenu-BsHdOgtL.js";
|
|
26
|
-
import { u as it, S as Me, v as Yt, h as Zt } from "./sortable.esm-eBjUK76c.js";
|
|
27
|
-
import { C as Gt } from "./isBefore-DdLSsf0_.js";
|
|
28
|
-
import { useVirtualizer as Xt } from "@tanstack/react-virtual";
|
|
29
|
-
import { E as He } from "./ellipsis-CuqNthAj.js";
|
|
30
|
-
import { C as rt } from "./chevron-down-C3s8jU6B.js";
|
|
31
|
-
const ea = [
|
|
32
|
-
[
|
|
33
|
-
"path",
|
|
34
|
-
{
|
|
35
|
-
d: "M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",
|
|
36
|
-
key: "169zse"
|
|
37
|
-
}
|
|
38
|
-
]
|
|
39
|
-
], ta = le("activity", ea);
|
|
40
|
-
const aa = [
|
|
41
|
-
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2", key: "1m3agn" }],
|
|
42
|
-
["circle", { cx: "9", cy: "9", r: "2", key: "af1f0g" }],
|
|
43
|
-
["path", { d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21", key: "1xmnt7" }]
|
|
44
|
-
], na = le("image", aa);
|
|
45
|
-
const sa = [
|
|
46
|
-
["path", { d: "M3 5h.01", key: "18ugdj" }],
|
|
47
|
-
["path", { d: "M3 12h.01", key: "nlz23k" }],
|
|
48
|
-
["path", { d: "M3 19h.01", key: "noohij" }],
|
|
49
|
-
["path", { d: "M8 5h13", key: "1pao27" }],
|
|
50
|
-
["path", { d: "M8 12h13", key: "1za7za" }],
|
|
51
|
-
["path", { d: "M8 19h13", key: "m83p4d" }]
|
|
52
|
-
], ia = le("list", sa);
|
|
53
|
-
const ra = [
|
|
54
|
-
[
|
|
55
|
-
"path",
|
|
56
|
-
{
|
|
57
|
-
d: "M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",
|
|
58
|
-
key: "18887p"
|
|
59
|
-
}
|
|
60
|
-
]
|
|
61
|
-
], oa = le("message-square", ra);
|
|
62
|
-
const la = [
|
|
63
|
-
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
|
|
64
|
-
["path", { d: "M3 9h18", key: "1pudct" }],
|
|
65
|
-
["path", { d: "M9 21V9", key: "1oto5p" }]
|
|
66
|
-
], We = le("panels-top-left", la);
|
|
67
|
-
const da = [
|
|
68
|
-
[
|
|
69
|
-
"path",
|
|
70
|
-
{
|
|
71
|
-
d: "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",
|
|
72
|
-
key: "1a8usu"
|
|
73
|
-
}
|
|
74
|
-
]
|
|
75
|
-
], ca = le("pen", da);
|
|
76
|
-
const ma = [
|
|
77
|
-
["path", { d: "m15 14 5-5-5-5", key: "12vg1m" }],
|
|
78
|
-
["path", { d: "M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13", key: "6uklza" }]
|
|
79
|
-
], ua = le("redo-2", ma);
|
|
80
|
-
const ha = [
|
|
81
|
-
[
|
|
82
|
-
"path",
|
|
83
|
-
{ d: "M21 10.656V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.344", key: "2acyp4" }
|
|
84
|
-
],
|
|
85
|
-
["path", { d: "m9 11 3 3L22 4", key: "1pflzl" }]
|
|
86
|
-
], ga = le("square-check-big", ha);
|
|
87
|
-
const pa = [
|
|
88
|
-
["path", { d: "M9 14 4 9l5-5", key: "102s5s" }],
|
|
89
|
-
["path", { d: "M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11", key: "f3b9sd" }]
|
|
90
|
-
], fa = le("undo-2", pa), ye = () => St(), va = () => /* @__PURE__ */ e("div", { className: "flex flex-col items-center justify-center h-full p-8", children: /* @__PURE__ */ d("div", { className: "flex flex-col items-center gap-4 max-w-md", children: [
|
|
91
|
-
/* @__PURE__ */ e("div", { className: "flex items-center justify-center w-16 h-16 rounded-full bg-destructive/10", children: /* @__PURE__ */ e(et, { className: "w-8 h-8 text-destructive" }) }),
|
|
92
|
-
/* @__PURE__ */ d("div", { className: "flex flex-col items-center gap-2 text-center", children: [
|
|
93
|
-
/* @__PURE__ */ e("h2", { className: "text-lg font-semibold", children: "Kanban Board Error" }),
|
|
94
|
-
/* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: "An error occurred while rendering the Kanban board. Please refresh the page or contact support if the issue persists." })
|
|
95
|
-
] }),
|
|
96
|
-
/* @__PURE__ */ e($, { onClick: () => window.location.reload(), children: "Reload Board" })
|
|
97
|
-
] }) }), Ca = (t, a = "standard") => new bt({
|
|
98
|
-
board: t,
|
|
99
|
-
selectedCards: [],
|
|
100
|
-
selectedColumnId: null,
|
|
101
|
-
view: a,
|
|
102
|
-
searchQuery: "",
|
|
103
|
-
activeFilters: {},
|
|
104
|
-
history: [t],
|
|
105
|
-
historyIndex: 0
|
|
106
|
-
}), ya = (t) => ({
|
|
107
|
-
// Board actions
|
|
108
|
-
setBoard: (a) => {
|
|
109
|
-
t.setState((n) => {
|
|
110
|
-
const i = [...n.history.slice(0, n.historyIndex + 1), a];
|
|
111
|
-
return {
|
|
112
|
-
...n,
|
|
113
|
-
board: a,
|
|
114
|
-
history: i,
|
|
115
|
-
historyIndex: i.length - 1
|
|
116
|
-
};
|
|
117
|
-
});
|
|
118
|
-
},
|
|
119
|
-
// Card actions
|
|
120
|
-
addCard: (a) => {
|
|
121
|
-
t.setState((n) => {
|
|
122
|
-
const i = {
|
|
123
|
-
...n.board,
|
|
124
|
-
cards: [...n.board.cards, a]
|
|
125
|
-
}, o = [...n.history.slice(0, n.historyIndex + 1), i];
|
|
126
|
-
return {
|
|
127
|
-
...n,
|
|
128
|
-
board: i,
|
|
129
|
-
history: o,
|
|
130
|
-
historyIndex: o.length - 1
|
|
131
|
-
};
|
|
132
|
-
});
|
|
133
|
-
},
|
|
134
|
-
updateCard: (a, n) => {
|
|
135
|
-
t.setState((i) => {
|
|
136
|
-
const o = {
|
|
137
|
-
...i.board,
|
|
138
|
-
cards: i.board.cards.map(
|
|
139
|
-
(y) => y.id === a ? { ...y, ...n } : y
|
|
140
|
-
)
|
|
141
|
-
}, u = [...i.history.slice(0, i.historyIndex + 1), o];
|
|
142
|
-
return {
|
|
143
|
-
...i,
|
|
144
|
-
board: o,
|
|
145
|
-
history: u,
|
|
146
|
-
historyIndex: u.length - 1
|
|
147
|
-
};
|
|
148
|
-
});
|
|
149
|
-
},
|
|
150
|
-
deleteCard: (a) => {
|
|
151
|
-
t.setState((n) => {
|
|
152
|
-
const i = {
|
|
153
|
-
...n.board,
|
|
154
|
-
cards: n.board.cards.filter((u) => u.id !== a)
|
|
155
|
-
}, o = [...n.history.slice(0, n.historyIndex + 1), i];
|
|
156
|
-
return {
|
|
157
|
-
...n,
|
|
158
|
-
board: i,
|
|
159
|
-
history: o,
|
|
160
|
-
historyIndex: o.length - 1
|
|
161
|
-
};
|
|
162
|
-
});
|
|
163
|
-
},
|
|
164
|
-
moveCard: (a, n) => {
|
|
165
|
-
t.setState((i) => {
|
|
166
|
-
const o = {
|
|
167
|
-
...i.board,
|
|
168
|
-
cards: i.board.cards.map(
|
|
169
|
-
(y) => y.id === a ? { ...y, columnId: n } : y
|
|
170
|
-
)
|
|
171
|
-
}, u = [...i.history.slice(0, i.historyIndex + 1), o];
|
|
172
|
-
return {
|
|
173
|
-
...i,
|
|
174
|
-
board: o,
|
|
175
|
-
history: u,
|
|
176
|
-
historyIndex: u.length - 1
|
|
177
|
-
};
|
|
178
|
-
});
|
|
179
|
-
},
|
|
180
|
-
// Column actions
|
|
181
|
-
addColumn: (a) => {
|
|
182
|
-
t.setState((n) => {
|
|
183
|
-
const i = {
|
|
184
|
-
...n.board,
|
|
185
|
-
columns: [...n.board.columns, a]
|
|
186
|
-
}, o = [...n.history.slice(0, n.historyIndex + 1), i];
|
|
187
|
-
return {
|
|
188
|
-
...n,
|
|
189
|
-
board: i,
|
|
190
|
-
history: o,
|
|
191
|
-
historyIndex: o.length - 1
|
|
192
|
-
};
|
|
193
|
-
});
|
|
194
|
-
},
|
|
195
|
-
updateColumn: (a, n) => {
|
|
196
|
-
t.setState((i) => {
|
|
197
|
-
const o = {
|
|
198
|
-
...i.board,
|
|
199
|
-
columns: i.board.columns.map(
|
|
200
|
-
(y) => y.id === a ? { ...y, ...n } : y
|
|
201
|
-
)
|
|
202
|
-
}, u = [...i.history.slice(0, i.historyIndex + 1), o];
|
|
203
|
-
return {
|
|
204
|
-
...i,
|
|
205
|
-
board: o,
|
|
206
|
-
history: u,
|
|
207
|
-
historyIndex: u.length - 1
|
|
208
|
-
};
|
|
209
|
-
});
|
|
210
|
-
},
|
|
211
|
-
deleteColumn: (a) => {
|
|
212
|
-
t.setState((n) => {
|
|
213
|
-
const i = {
|
|
214
|
-
...n.board,
|
|
215
|
-
columns: n.board.columns.filter((u) => u.id !== a),
|
|
216
|
-
cards: n.board.cards.filter((u) => u.columnId !== a)
|
|
217
|
-
}, o = [...n.history.slice(0, n.historyIndex + 1), i];
|
|
218
|
-
return {
|
|
219
|
-
...n,
|
|
220
|
-
board: i,
|
|
221
|
-
history: o,
|
|
222
|
-
historyIndex: o.length - 1
|
|
223
|
-
};
|
|
224
|
-
});
|
|
225
|
-
},
|
|
226
|
-
// Selection actions
|
|
227
|
-
setSelectedCards: (a) => {
|
|
228
|
-
t.setState((n) => ({ ...n, selectedCards: a }));
|
|
229
|
-
},
|
|
230
|
-
setSelectedColumnId: (a) => {
|
|
231
|
-
t.setState((n) => ({ ...n, selectedColumnId: a }));
|
|
232
|
-
},
|
|
233
|
-
// View action
|
|
234
|
-
setView: (a) => {
|
|
235
|
-
t.setState((n) => ({ ...n, view: a }));
|
|
236
|
-
},
|
|
237
|
-
// Search and filter actions
|
|
238
|
-
setSearchQuery: (a) => {
|
|
239
|
-
t.setState((n) => ({ ...n, searchQuery: a }));
|
|
240
|
-
},
|
|
241
|
-
setActiveFilters: (a) => {
|
|
242
|
-
t.setState((n) => ({ ...n, activeFilters: a }));
|
|
243
|
-
},
|
|
244
|
-
// History actions (undo/redo)
|
|
245
|
-
undo: () => {
|
|
246
|
-
t.setState((a) => a.historyIndex > 0 ? {
|
|
247
|
-
...a,
|
|
248
|
-
board: a.history[a.historyIndex - 1],
|
|
249
|
-
historyIndex: a.historyIndex - 1
|
|
250
|
-
} : a);
|
|
251
|
-
},
|
|
252
|
-
redo: () => {
|
|
253
|
-
t.setState((a) => a.historyIndex < a.history.length - 1 ? {
|
|
254
|
-
...a,
|
|
255
|
-
board: a.history[a.historyIndex + 1],
|
|
256
|
-
historyIndex: a.historyIndex + 1
|
|
257
|
-
} : a);
|
|
258
|
-
},
|
|
259
|
-
// Utility
|
|
260
|
-
canUndo: () => t.state.historyIndex > 0,
|
|
261
|
-
canRedo: () => t.state.historyIndex < t.state.history.length - 1
|
|
262
|
-
}), wa = (t) => {
|
|
263
|
-
const a = ce(() => Ca(t.board, t.view), [t.board.id, t.view]), n = ce(() => ya(a), [a]), i = ge(a, (C) => C.board), o = ge(a, (C) => C.selectedCards), u = ge(a, (C) => C.selectedColumnId), y = ge(a, (C) => C.view), h = ge(a, (C) => C.searchQuery), f = ge(a, (C) => C.activeFilters), k = Ve(JSON.stringify(t.board)), x = Ve(t.view);
|
|
264
|
-
return xe(() => {
|
|
265
|
-
const C = JSON.stringify(t.board);
|
|
266
|
-
C !== k.current && (k.current = C, n.setBoard(t.board)), t.view && t.view !== x.current && (x.current = t.view, n.setView(t.view));
|
|
267
|
-
}, [t.board, t.view, n]), {
|
|
268
|
-
// State
|
|
269
|
-
/** The current board data. @group State */
|
|
270
|
-
board: i,
|
|
271
|
-
/** Currently selected card IDs. @group State */
|
|
272
|
-
selectedCards: o,
|
|
273
|
-
/** ID of the currently selected column. @group State */
|
|
274
|
-
selectedColumnId: u,
|
|
275
|
-
/** Current view mode. @group State */
|
|
276
|
-
view: y,
|
|
277
|
-
/** Current search query. @group State */
|
|
278
|
-
searchQuery: h,
|
|
279
|
-
/** Currently active filters. @group State */
|
|
280
|
-
activeFilters: f,
|
|
281
|
-
// Actions
|
|
282
|
-
/** Replace the board data. @group Methods */
|
|
283
|
-
setBoard: n.setBoard,
|
|
284
|
-
/** Set selected card IDs. @group Methods */
|
|
285
|
-
setSelectedCards: n.setSelectedCards,
|
|
286
|
-
/** Set the selected column ID. @group Methods */
|
|
287
|
-
setSelectedColumnId: n.setSelectedColumnId,
|
|
288
|
-
/** Change the view mode. @group Methods */
|
|
289
|
-
setView: n.setView,
|
|
290
|
-
/** Set the search query. @group Methods */
|
|
291
|
-
setSearchQuery: n.setSearchQuery,
|
|
292
|
-
/** Set active filters. @group Methods */
|
|
293
|
-
setActiveFilters: n.setActiveFilters,
|
|
294
|
-
// Card actions
|
|
295
|
-
/** Add a card. @group Methods */
|
|
296
|
-
addCard: n.addCard,
|
|
297
|
-
/** Update a card. @group Methods */
|
|
298
|
-
updateCard: n.updateCard,
|
|
299
|
-
/** Delete a card. @group Methods */
|
|
300
|
-
deleteCard: n.deleteCard,
|
|
301
|
-
/** Move a card. @group Methods */
|
|
302
|
-
moveCard: n.moveCard,
|
|
303
|
-
// Column actions
|
|
304
|
-
/** Add a column. @group Methods */
|
|
305
|
-
addColumn: n.addColumn,
|
|
306
|
-
/** Update a column. @group Methods */
|
|
307
|
-
updateColumn: n.updateColumn,
|
|
308
|
-
/** Delete a column. @group Methods */
|
|
309
|
-
deleteColumn: n.deleteColumn,
|
|
310
|
-
// History actions
|
|
311
|
-
/** Undo the last action. @group Methods */
|
|
312
|
-
undo: n.undo,
|
|
313
|
-
/** Redo the previously undone action. @group Methods */
|
|
314
|
-
redo: n.redo,
|
|
315
|
-
/** Whether undo is available. @group State */
|
|
316
|
-
canUndo: n.canUndo(),
|
|
317
|
-
/** Whether redo is available. @group State */
|
|
318
|
-
canRedo: n.canRedo(),
|
|
319
|
-
// Store instance (for advanced usage)
|
|
320
|
-
/** The underlying store instance. @group Internal */
|
|
321
|
-
store: a,
|
|
322
|
-
/** The compiled actions for the store. @group Internal */
|
|
323
|
-
actions: n
|
|
324
|
-
};
|
|
325
|
-
}, xa = (t, a) => {
|
|
326
|
-
const n = be(), i = Re(), o = () => n.get("KanbanService"), u = (s, l, m = 3e3) => {
|
|
327
|
-
const v = n.get("NotificationService");
|
|
328
|
-
v && v.add({ type: s, message: l, duration: m });
|
|
329
|
-
}, y = (s) => {
|
|
330
|
-
i.setQueryData(["board", a.id], s), t.onBoardChange?.(s);
|
|
331
|
-
}, h = ne({
|
|
332
|
-
mutationFn: async (s) => {
|
|
333
|
-
const l = o();
|
|
334
|
-
return l ? await l.createCard(a.id, s) : await t.onCardCreate?.(s), s;
|
|
335
|
-
},
|
|
336
|
-
onMutate: async (s) => {
|
|
337
|
-
await i.cancelQueries({ queryKey: ["board", a.id] });
|
|
338
|
-
const l = i.getQueryData(["board", a.id]), m = {
|
|
339
|
-
...a,
|
|
340
|
-
cards: [...a.cards, s]
|
|
341
|
-
};
|
|
342
|
-
return y(m), { previousBoard: l };
|
|
343
|
-
},
|
|
344
|
-
onError: (s, l, m) => {
|
|
345
|
-
m?.previousBoard && y(m.previousBoard), u("error", "Failed to create card. Please try again.", 5e3);
|
|
346
|
-
},
|
|
347
|
-
onSuccess: (s) => {
|
|
348
|
-
u("success", `Card "${s.title}" created successfully`);
|
|
349
|
-
}
|
|
350
|
-
}), f = L(async (s) => {
|
|
351
|
-
const l = {
|
|
352
|
-
id: `card-${Date.now()}`,
|
|
353
|
-
type: s.type || "standard",
|
|
354
|
-
title: s.title || "New Card",
|
|
355
|
-
description: s.description,
|
|
356
|
-
columnId: s.columnId || a.columns[0]?.id || "",
|
|
357
|
-
position: s.position ?? a.cards.filter((m) => m.columnId === s.columnId).length,
|
|
358
|
-
assignees: s.assignees || [],
|
|
359
|
-
tags: s.tags || [],
|
|
360
|
-
priority: s.priority,
|
|
361
|
-
metadata: s.metadata || {},
|
|
362
|
-
createdBy: "current-user",
|
|
363
|
-
// Should be replced by actual user info if available
|
|
364
|
-
createdAt: /* @__PURE__ */ new Date(),
|
|
365
|
-
updatedBy: "current-user",
|
|
366
|
-
updatedAt: /* @__PURE__ */ new Date(),
|
|
367
|
-
...s
|
|
368
|
-
};
|
|
369
|
-
return h.mutateAsync(l);
|
|
370
|
-
}, [a, h]), k = ne({
|
|
371
|
-
mutationFn: async ({ cardId: s, updates: l }) => {
|
|
372
|
-
const m = o();
|
|
373
|
-
if (m)
|
|
374
|
-
await m.updateCard(s, l);
|
|
375
|
-
else {
|
|
376
|
-
const v = a.cards.find((D) => D.id === s);
|
|
377
|
-
v && await t.onCardUpdate?.({ ...v, ...l }, "edit");
|
|
378
|
-
}
|
|
379
|
-
return { cardId: s, updates: l };
|
|
380
|
-
},
|
|
381
|
-
onMutate: async ({ cardId: s, updates: l }) => {
|
|
382
|
-
await i.cancelQueries({ queryKey: ["board", a.id] });
|
|
383
|
-
const m = i.getQueryData(["board", a.id]), v = a.cards.map(
|
|
384
|
-
(_) => _.id === s ? { ..._, ...l, updatedAt: /* @__PURE__ */ new Date() } : _
|
|
385
|
-
), D = { ...a, cards: v };
|
|
386
|
-
return y(D), { previousBoard: m };
|
|
387
|
-
},
|
|
388
|
-
onError: (s, l, m) => {
|
|
389
|
-
m?.previousBoard && y(m.previousBoard), u("error", "Failed to update card", 5e3);
|
|
390
|
-
},
|
|
391
|
-
onSuccess: () => {
|
|
392
|
-
u("success", "Card updated successfully", 2e3);
|
|
393
|
-
}
|
|
394
|
-
}), x = L(async (s, l) => k.mutateAsync({ cardId: s, updates: l }), [k]), C = ne({
|
|
395
|
-
mutationFn: async (s) => {
|
|
396
|
-
const l = o();
|
|
397
|
-
return l ? await l.deleteCard(s) : await t.onCardDelete?.(s), s;
|
|
398
|
-
},
|
|
399
|
-
onMutate: async (s) => {
|
|
400
|
-
await i.cancelQueries({ queryKey: ["board", a.id] });
|
|
401
|
-
const l = i.getQueryData(["board", a.id]), m = {
|
|
402
|
-
...a,
|
|
403
|
-
cards: a.cards.filter((v) => v.id !== s)
|
|
404
|
-
};
|
|
405
|
-
return y(m), { previousBoard: l, deletedCardTitle: l?.cards.find((v) => v.id === s)?.title };
|
|
406
|
-
},
|
|
407
|
-
onError: (s, l, m) => {
|
|
408
|
-
m?.previousBoard && y(m.previousBoard), u("error", "Failed to delete card", 5e3);
|
|
409
|
-
},
|
|
410
|
-
onSuccess: (s, l, m) => {
|
|
411
|
-
const v = m?.deletedCardTitle || "Card";
|
|
412
|
-
u("success", `Card "${v}" deleted`);
|
|
413
|
-
}
|
|
414
|
-
}), B = L(async (s) => C.mutateAsync(s), [C]), c = ne({
|
|
415
|
-
mutationFn: async (s) => {
|
|
416
|
-
const { cardId: l, targetColumnId: m, targetSwimlaneId: v, targetPosition: D } = s, _ = o();
|
|
417
|
-
if (_)
|
|
418
|
-
await _.moveCard(l, m, v, D);
|
|
419
|
-
else {
|
|
420
|
-
const E = a.cards.find((T) => T.id === l);
|
|
421
|
-
E && await t.onCardUpdate?.({
|
|
422
|
-
...E,
|
|
423
|
-
columnId: m,
|
|
424
|
-
swimlaneId: v
|
|
425
|
-
}, "move");
|
|
426
|
-
}
|
|
427
|
-
},
|
|
428
|
-
onMutate: async ({ cardId: s, targetColumnId: l, targetSwimlaneId: m, targetPosition: v }) => {
|
|
429
|
-
await i.cancelQueries({ queryKey: ["board", a.id] });
|
|
430
|
-
const D = i.getQueryData(["board", a.id]), _ = a.cards.find((b) => b.id === s);
|
|
431
|
-
if (!_) return { previousBoard: D };
|
|
432
|
-
const E = a.cards.filter((b) => b.id !== s), T = E.filter((b) => b.columnId === l).sort((b, A) => (b.position ?? 0) - (A.position ?? 0)), S = v !== void 0 ? Math.min(v, T.length) : T.length, V = [
|
|
433
|
-
...T.slice(0, S),
|
|
434
|
-
{ ..._, columnId: l, swimlaneId: m, updatedAt: /* @__PURE__ */ new Date() },
|
|
435
|
-
...T.slice(S)
|
|
436
|
-
].map((b, A) => ({ ...b, position: A })), U = _.columnId, W = E.filter((b) => b.columnId === U).sort((b, A) => (b.position ?? 0) - (A.position ?? 0)).map((b, A) => ({ ...b, position: A })), z = [...E.filter(
|
|
437
|
-
(b) => b.columnId !== l && b.columnId !== U
|
|
438
|
-
), ...W, ...V], H = { ...a, cards: z };
|
|
439
|
-
return y(H), { previousBoard: D };
|
|
440
|
-
},
|
|
441
|
-
onError: (s, l, m) => {
|
|
442
|
-
m?.previousBoard && y(m.previousBoard), u("error", "Failed to move card", 3e3);
|
|
443
|
-
}
|
|
444
|
-
}), w = L(async (s, l, m, v) => c.mutateAsync({ cardId: s, targetColumnId: l, targetSwimlaneId: m, targetPosition: v }), [c]), N = L(async (s) => {
|
|
445
|
-
const l = a.cards.find((v) => v.id === s);
|
|
446
|
-
if (!l) throw new Error("Card not found");
|
|
447
|
-
const m = {
|
|
448
|
-
...l,
|
|
449
|
-
id: `card-${Date.now()}`,
|
|
450
|
-
title: `${l.title} (Copy)`,
|
|
451
|
-
position: (l.position ?? 0) + 1,
|
|
452
|
-
createdAt: /* @__PURE__ */ new Date(),
|
|
453
|
-
updatedAt: /* @__PURE__ */ new Date()
|
|
454
|
-
};
|
|
455
|
-
return f(m);
|
|
456
|
-
}, [a.cards, f]), I = L(async (s) => x(s, { isArchived: !0 }), [x]), r = L(async (s) => x(s, { isArchived: !1 }), [x]);
|
|
457
|
-
return {
|
|
458
|
-
/** Create a new card. @group Methods */
|
|
459
|
-
createCard: f,
|
|
460
|
-
/** Update an existing card. @group Methods */
|
|
461
|
-
updateCard: x,
|
|
462
|
-
/** Delete a card by ID. @group Methods */
|
|
463
|
-
deleteCard: B,
|
|
464
|
-
/** Move a card to a new column/swimlane. @group Methods */
|
|
465
|
-
moveCard: w,
|
|
466
|
-
/** Duplicate an existing card. @group Methods */
|
|
467
|
-
duplicateCard: N,
|
|
468
|
-
/** Archive a card. @group Methods */
|
|
469
|
-
archiveCard: I,
|
|
470
|
-
/** Restore an archived card. @group Methods */
|
|
471
|
-
restoreCard: r
|
|
472
|
-
};
|
|
473
|
-
}, Na = (t, a) => {
|
|
474
|
-
const n = be(), i = Re(), o = () => n.get("KanbanService"), u = (r, s, l = 3e3) => {
|
|
475
|
-
const m = n.get("NotificationService");
|
|
476
|
-
m && m.add({ type: r, message: s, duration: l });
|
|
477
|
-
}, y = (r) => {
|
|
478
|
-
i.setQueryData(["board", a.id], r), t.onBoardChange?.(r);
|
|
479
|
-
}, h = ne({
|
|
480
|
-
mutationFn: async (r) => {
|
|
481
|
-
const s = o();
|
|
482
|
-
return s ? await s.createColumn(a.id, r) : await t.onColumnCreate?.(r), r;
|
|
483
|
-
},
|
|
484
|
-
onMutate: async (r) => {
|
|
485
|
-
await i.cancelQueries({ queryKey: ["board", a.id] });
|
|
486
|
-
const s = i.getQueryData(["board", a.id]), l = {
|
|
487
|
-
...a,
|
|
488
|
-
columns: [...a.columns, r]
|
|
489
|
-
};
|
|
490
|
-
return y(l), { previousBoard: s };
|
|
491
|
-
},
|
|
492
|
-
onError: (r, s, l) => {
|
|
493
|
-
l?.previousBoard && y(l.previousBoard), u("error", "Failed to create column", 5e3);
|
|
494
|
-
},
|
|
495
|
-
onSuccess: (r) => {
|
|
496
|
-
u("success", `Column "${r.name}" added`);
|
|
497
|
-
}
|
|
498
|
-
}), f = L(async (r) => {
|
|
499
|
-
const s = {
|
|
500
|
-
id: `column-${Date.now()}`,
|
|
501
|
-
name: r.name || "New Column",
|
|
502
|
-
color: r.color,
|
|
503
|
-
icon: r.icon,
|
|
504
|
-
wipLimit: r.wipLimit,
|
|
505
|
-
position: r.position ?? a.columns.length,
|
|
506
|
-
isCollapsed: !1,
|
|
507
|
-
...r
|
|
508
|
-
};
|
|
509
|
-
return h.mutateAsync(s);
|
|
510
|
-
}, [a.columns.length, h]), k = ne({
|
|
511
|
-
mutationFn: async ({ columnId: r, updates: s }) => {
|
|
512
|
-
const l = o();
|
|
513
|
-
if (l)
|
|
514
|
-
await l.updateColumn(r, s);
|
|
515
|
-
else {
|
|
516
|
-
const m = a.columns.find((v) => v.id === r);
|
|
517
|
-
m && await t.onColumnUpdate?.({ ...m, ...s });
|
|
518
|
-
}
|
|
519
|
-
return { columnId: r, updates: s };
|
|
520
|
-
},
|
|
521
|
-
onMutate: async ({ columnId: r, updates: s }) => {
|
|
522
|
-
await i.cancelQueries({ queryKey: ["board", a.id] });
|
|
523
|
-
const l = i.getQueryData(["board", a.id]), m = {
|
|
524
|
-
...a,
|
|
525
|
-
columns: a.columns.map(
|
|
526
|
-
(v) => v.id === r ? { ...v, ...s } : v
|
|
527
|
-
)
|
|
528
|
-
};
|
|
529
|
-
return y(m), { previousBoard: l };
|
|
530
|
-
},
|
|
531
|
-
onError: (r, s, l) => {
|
|
532
|
-
l?.previousBoard && y(l.previousBoard), u("error", "Failed to update column", 5e3);
|
|
533
|
-
}
|
|
534
|
-
}), x = L(async (r, s) => k.mutateAsync({ columnId: r, updates: s }), [k]), C = ne({
|
|
535
|
-
mutationFn: async (r) => {
|
|
536
|
-
const s = o();
|
|
537
|
-
return s ? await s.deleteColumn(r) : await t.onColumnDelete?.(r), r;
|
|
538
|
-
},
|
|
539
|
-
onMutate: async (r) => {
|
|
540
|
-
await i.cancelQueries({ queryKey: ["board", a.id] });
|
|
541
|
-
const s = i.getQueryData(["board", a.id]), l = s?.columns.find((v) => v.id === r), m = {
|
|
542
|
-
...a,
|
|
543
|
-
columns: a.columns.filter((v) => v.id !== r),
|
|
544
|
-
cards: a.cards.filter((v) => v.columnId !== r)
|
|
545
|
-
// Naive delete cascade
|
|
546
|
-
};
|
|
547
|
-
return y(m), { previousBoard: s, deletedColumnName: l?.name };
|
|
548
|
-
},
|
|
549
|
-
onError: (r, s, l) => {
|
|
550
|
-
l?.previousBoard && y(l.previousBoard), u("error", "Failed to delete column", 5e3);
|
|
551
|
-
},
|
|
552
|
-
onSuccess: (r, s, l) => {
|
|
553
|
-
const m = l?.deletedColumnName || "Column";
|
|
554
|
-
u("success", `Column "${m}" deleted`);
|
|
555
|
-
}
|
|
556
|
-
}), B = L(async (r) => C.mutateAsync(r), [C]), c = ne({
|
|
557
|
-
mutationFn: async (r) => {
|
|
558
|
-
const s = o();
|
|
559
|
-
if (s) {
|
|
560
|
-
const l = r.map((m, v) => s.updateColumn(m, { position: v }));
|
|
561
|
-
await Promise.all(l);
|
|
562
|
-
}
|
|
563
|
-
return r;
|
|
564
|
-
},
|
|
565
|
-
onMutate: async (r) => {
|
|
566
|
-
await i.cancelQueries({ queryKey: ["board", a.id] });
|
|
567
|
-
const s = i.getQueryData(["board", a.id]), l = {
|
|
568
|
-
...a,
|
|
569
|
-
columns: r.map((m, v) => {
|
|
570
|
-
const D = a.columns.find((_) => _.id === m);
|
|
571
|
-
if (!D) throw new Error(`Column ${m} not found`);
|
|
572
|
-
return { ...D, position: v };
|
|
573
|
-
})
|
|
574
|
-
};
|
|
575
|
-
return y(l), { previousBoard: s };
|
|
576
|
-
},
|
|
577
|
-
onError: (r, s, l) => {
|
|
578
|
-
l?.previousBoard && y(l.previousBoard), u("error", "Failed to reorder columns", 3e3);
|
|
579
|
-
}
|
|
580
|
-
}), w = L(async (r) => c.mutateAsync(r), [c]), N = L((r) => {
|
|
581
|
-
x(r, { isCollapsed: !0 });
|
|
582
|
-
}, [x]), I = L((r) => {
|
|
583
|
-
x(r, { isCollapsed: !1 });
|
|
584
|
-
}, [x]);
|
|
585
|
-
return {
|
|
586
|
-
/** Create a new column. @group Methods */
|
|
587
|
-
createColumn: f,
|
|
588
|
-
/** Update an existing column. @group Methods */
|
|
589
|
-
updateColumn: x,
|
|
590
|
-
/** Delete a column by ID. @group Methods */
|
|
591
|
-
deleteColumn: B,
|
|
592
|
-
/** Reorder columns by providing new ordered IDs. @group Methods */
|
|
593
|
-
reorderColumns: w,
|
|
594
|
-
/** Collapse a column. @group Methods */
|
|
595
|
-
collapseColumn: N,
|
|
596
|
-
/** Expand a column. @group Methods */
|
|
597
|
-
expandColumn: I
|
|
598
|
-
};
|
|
599
|
-
}, ba = (t, a) => {
|
|
600
|
-
const n = be(), i = Re(), o = () => n.get("KanbanService"), u = (r, s, l = 3e3) => {
|
|
601
|
-
const m = n.get("NotificationService");
|
|
602
|
-
m && m.add({ type: r, message: s, duration: l });
|
|
603
|
-
}, y = (r) => {
|
|
604
|
-
i.setQueryData(["board", a.id], r), t.onBoardChange?.(r);
|
|
605
|
-
}, h = ne({
|
|
606
|
-
mutationFn: async (r) => {
|
|
607
|
-
const s = o();
|
|
608
|
-
return s ? await s.createSwimlane(a.id, r) : await t.onSwimlaneCreate?.(r), r;
|
|
609
|
-
},
|
|
610
|
-
onMutate: async (r) => {
|
|
611
|
-
await i.cancelQueries({ queryKey: ["board", a.id] });
|
|
612
|
-
const s = i.getQueryData(["board", a.id]), l = {
|
|
613
|
-
...a,
|
|
614
|
-
swimlanes: [...a.swimlanes || [], r]
|
|
615
|
-
};
|
|
616
|
-
return y(l), { previousBoard: s };
|
|
617
|
-
},
|
|
618
|
-
onError: (r, s, l) => {
|
|
619
|
-
l?.previousBoard && y(l.previousBoard), u("error", "Failed to create swimlane", 5e3);
|
|
620
|
-
},
|
|
621
|
-
onSuccess: (r) => {
|
|
622
|
-
u("success", `Swimlane "${r.name}" added`);
|
|
623
|
-
}
|
|
624
|
-
}), f = L(async (r) => {
|
|
625
|
-
const s = {
|
|
626
|
-
id: `swimlane-${Date.now()}`,
|
|
627
|
-
name: r.name || "New Swimlane",
|
|
628
|
-
type: r.type || "custom",
|
|
629
|
-
color: r.color,
|
|
630
|
-
position: r.position ?? (a.swimlanes?.length || 0),
|
|
631
|
-
isCollapsed: !1,
|
|
632
|
-
...r
|
|
633
|
-
};
|
|
634
|
-
return h.mutateAsync(s);
|
|
635
|
-
}, [a.swimlanes, h]), k = ne({
|
|
636
|
-
mutationFn: async ({ swimlaneId: r, updates: s }) => {
|
|
637
|
-
const l = o();
|
|
638
|
-
if (l)
|
|
639
|
-
await l.updateSwimlane(r, s);
|
|
640
|
-
else {
|
|
641
|
-
const m = a.swimlanes?.find((v) => v.id === r);
|
|
642
|
-
m && await t.onSwimlaneUpdate?.({ ...m, ...s });
|
|
643
|
-
}
|
|
644
|
-
return { swimlaneId: r, updates: s };
|
|
645
|
-
},
|
|
646
|
-
onMutate: async ({ swimlaneId: r, updates: s }) => {
|
|
647
|
-
await i.cancelQueries({ queryKey: ["board", a.id] });
|
|
648
|
-
const l = i.getQueryData(["board", a.id]), m = {
|
|
649
|
-
...a,
|
|
650
|
-
swimlanes: (a.swimlanes || []).map(
|
|
651
|
-
(v) => v.id === r ? { ...v, ...s } : v
|
|
652
|
-
)
|
|
653
|
-
};
|
|
654
|
-
return y(m), { previousBoard: l };
|
|
655
|
-
},
|
|
656
|
-
onError: (r, s, l) => {
|
|
657
|
-
l?.previousBoard && y(l.previousBoard), u("error", "Failed to update swimlane", 5e3);
|
|
658
|
-
}
|
|
659
|
-
}), x = L(async (r, s) => k.mutateAsync({ swimlaneId: r, updates: s }), [k]), C = ne({
|
|
660
|
-
mutationFn: async (r) => {
|
|
661
|
-
const s = o();
|
|
662
|
-
return s ? await s.deleteSwimlane(r) : await t.onSwimlaneDelete?.(r), r;
|
|
663
|
-
},
|
|
664
|
-
onMutate: async (r) => {
|
|
665
|
-
await i.cancelQueries({ queryKey: ["board", a.id] });
|
|
666
|
-
const s = i.getQueryData(["board", a.id]), l = s?.swimlanes?.find((v) => v.id === r), m = {
|
|
667
|
-
...a,
|
|
668
|
-
swimlanes: (a.swimlanes || []).filter((v) => v.id !== r),
|
|
669
|
-
cards: a.cards.map((v) => v.swimlaneId === r ? { ...v, swimlaneId: void 0 } : v)
|
|
670
|
-
};
|
|
671
|
-
return y(m), { previousBoard: s, deletedSwimlaneName: l?.name };
|
|
672
|
-
},
|
|
673
|
-
onError: (r, s, l) => {
|
|
674
|
-
l?.previousBoard && y(l.previousBoard), u("error", "Failed to delete swimlane", 5e3);
|
|
675
|
-
},
|
|
676
|
-
onSuccess: (r, s, l) => {
|
|
677
|
-
const m = l?.deletedSwimlaneName || "Swimlane";
|
|
678
|
-
u("success", `Swimlane "${m}" deleted`);
|
|
679
|
-
}
|
|
680
|
-
}), B = L(async (r) => C.mutateAsync(r), [C]), c = ne({
|
|
681
|
-
mutationFn: async (r) => {
|
|
682
|
-
const s = o();
|
|
683
|
-
if (s) {
|
|
684
|
-
const l = r.map((m, v) => s.updateSwimlane(m, { position: v }));
|
|
685
|
-
await Promise.all(l);
|
|
686
|
-
}
|
|
687
|
-
return r;
|
|
688
|
-
},
|
|
689
|
-
onMutate: async (r) => {
|
|
690
|
-
await i.cancelQueries({ queryKey: ["board", a.id] });
|
|
691
|
-
const s = i.getQueryData(["board", a.id]), l = {
|
|
692
|
-
...a,
|
|
693
|
-
swimlanes: r.map((m, v) => {
|
|
694
|
-
const D = a.swimlanes?.find((_) => _.id === m);
|
|
695
|
-
return D ? { ...D, position: v } : null;
|
|
696
|
-
}).filter(Boolean)
|
|
697
|
-
};
|
|
698
|
-
return y(l), { previousBoard: s };
|
|
699
|
-
},
|
|
700
|
-
onError: (r, s, l) => {
|
|
701
|
-
l?.previousBoard && y(l.previousBoard), u("error", "Failed to reorder swimlanes", 3e3);
|
|
702
|
-
}
|
|
703
|
-
}), w = L(async (r) => c.mutateAsync(r), [c]), N = L((r) => {
|
|
704
|
-
x(r, { isCollapsed: !0 }), t.onSwimlaneToggle?.({ swimlaneId: r, isCollapsed: !0 });
|
|
705
|
-
}, [x, t.onSwimlaneToggle]), I = L((r) => {
|
|
706
|
-
x(r, { isCollapsed: !1 }), t.onSwimlaneToggle?.({ swimlaneId: r, isCollapsed: !1 });
|
|
707
|
-
}, [x, t.onSwimlaneToggle]);
|
|
708
|
-
return {
|
|
709
|
-
/** Create a new swimlane. @group Methods */
|
|
710
|
-
createSwimlane: f,
|
|
711
|
-
/** Update an existing swimlane. @group Methods */
|
|
712
|
-
updateSwimlane: x,
|
|
713
|
-
/** Delete a swimlane by ID. @group Methods */
|
|
714
|
-
deleteSwimlane: B,
|
|
715
|
-
/** Reorder swimlanes by providing new ordered IDs. @group Methods */
|
|
716
|
-
reorderSwimlanes: w,
|
|
717
|
-
/** Collapse a swimlane. @group Methods */
|
|
718
|
-
collapseSwimlane: N,
|
|
719
|
-
/** Expand a swimlane. @group Methods */
|
|
720
|
-
expandSwimlane: I
|
|
721
|
-
};
|
|
722
|
-
}, Sa = (t) => {
|
|
723
|
-
const [a, n] = q(""), [i, o] = q({});
|
|
724
|
-
return {
|
|
725
|
-
/** List of cards after applying search and filters. @group State */
|
|
726
|
-
filteredCards: ce(() => t.cards.filter((h) => {
|
|
727
|
-
if (a) {
|
|
728
|
-
const f = a.toLowerCase();
|
|
729
|
-
if (!(h.title.toLowerCase().includes(f) || h.description?.toLowerCase().includes(f) || h.tags.some((x) => x.name.toLowerCase().includes(f)))) return !1;
|
|
730
|
-
}
|
|
731
|
-
return !(i.tags && i.tags.length > 0 && !h.tags.some((k) => i.tags?.includes(k.id)) || i.assignees && i.assignees.length > 0 && !h.assignees.some((k) => i.assignees?.includes(k.id)) || i.priority && i.priority.length > 0 && h.priority && !i.priority.includes(h.priority) || i.columns && i.columns.length > 0 && !i.columns.includes(h.columnId));
|
|
732
|
-
}), [t.cards, a, i]),
|
|
733
|
-
/** Current search query string. @group State */
|
|
734
|
-
searchQuery: a,
|
|
735
|
-
/** Handler to update the search query. @group Methods */
|
|
736
|
-
setSearchQuery: n,
|
|
737
|
-
/** Current active filter configuration. @group State */
|
|
738
|
-
activeFilters: i,
|
|
739
|
-
/** Handler to update active filters. @group Methods */
|
|
740
|
-
setActiveFilters: o,
|
|
741
|
-
/** Clear all active filters and search query. @group Methods */
|
|
742
|
-
clearFilters: () => {
|
|
743
|
-
n(""), o({});
|
|
744
|
-
}
|
|
745
|
-
};
|
|
746
|
-
}, ka = (t, a, n = !1, i) => {
|
|
747
|
-
const o = be(), [u, y] = q(null), [h, f] = q(null), [k, x] = q(null), C = L((N) => {
|
|
748
|
-
if (i?.onCardDragStart) {
|
|
749
|
-
const I = { card: N, columnId: N.columnId, cancel: !1 };
|
|
750
|
-
if (i.onCardDragStart(I), I.cancel) return;
|
|
751
|
-
}
|
|
752
|
-
y(N);
|
|
753
|
-
}, [i?.onCardDragStart]), B = L((N, I) => {
|
|
754
|
-
u && h !== N && (h && i?.onCardDragLeave && i.onCardDragLeave({ card: u, targetColumnId: h }), i?.onCardDragEnter && i.onCardDragEnter({ card: u, targetColumnId: N })), f(N), I && x(I);
|
|
755
|
-
}, [u, i, h]), c = L(() => {
|
|
756
|
-
u && i?.onCardDragStop && i.onCardDragStop({ card: u, columnId: u.columnId }), y(null), f(null), x(null);
|
|
757
|
-
}, [u, i?.onCardDragStop]), w = L((N, I, r) => {
|
|
758
|
-
if (!u) return;
|
|
759
|
-
const s = t.columns.find((l) => l.id === N);
|
|
760
|
-
if (s?.wipLimit && t.cards.filter((m) => m.columnId === N && !m.isArchived).length >= s.wipLimit && (u.columnId !== N || u.swimlaneId !== I)) {
|
|
761
|
-
const m = o.get("NotificationService");
|
|
762
|
-
if (m && m.add({
|
|
763
|
-
type: "warning",
|
|
764
|
-
message: `WIP limit reached for "${s.name}" (${s.wipLimit} cards)`,
|
|
765
|
-
duration: 4e3
|
|
766
|
-
}), n) {
|
|
767
|
-
m?.add({
|
|
768
|
-
type: "error",
|
|
769
|
-
message: `Cannot move card: "${s.name}" is full (Strict WIP)`,
|
|
770
|
-
duration: 4e3
|
|
771
|
-
}), y(null), f(null), x(null);
|
|
772
|
-
return;
|
|
773
|
-
}
|
|
774
|
-
}
|
|
775
|
-
a(u.id, N, I, r), i?.onCardDragStop && i.onCardDragStop({ card: u, columnId: N }), y(null), f(null), x(null);
|
|
776
|
-
}, [u, t, a, i?.onCardDragStop]);
|
|
777
|
-
return {
|
|
778
|
-
/** The card currently being dragged. @group State */
|
|
779
|
-
draggedCard: u,
|
|
780
|
-
/** ID of the column being dragged over. @group State */
|
|
781
|
-
dragOverColumn: h,
|
|
782
|
-
/** ID of the swimlane being dragged over. @group State */
|
|
783
|
-
dragOverSwimlane: k,
|
|
784
|
-
/** Handler for drag start. @group Events */
|
|
785
|
-
handleDragStart: C,
|
|
786
|
-
/** Handler for drag over. @group Events */
|
|
787
|
-
handleDragOver: B,
|
|
788
|
-
/** Handler for drag end (cancel/finish). @group Events */
|
|
789
|
-
handleDragEnd: c,
|
|
790
|
-
/** Handler for drop (commit move). @group Events */
|
|
791
|
-
handleDrop: w
|
|
792
|
-
};
|
|
793
|
-
}, Da = (t, a = {}) => {
|
|
794
|
-
const i = Dt("I18nService")?.dir || "ltr", o = t.dir === "auto" || !t.dir ? i : t.dir, u = {
|
|
795
|
-
showSpinner: () => {
|
|
796
|
-
},
|
|
797
|
-
hideSpinner: () => {
|
|
798
|
-
}
|
|
799
|
-
}, y = null, {
|
|
800
|
-
board: h,
|
|
801
|
-
setBoard: f,
|
|
802
|
-
selectedCards: k,
|
|
803
|
-
setSelectedCards: x,
|
|
804
|
-
selectedColumnId: C,
|
|
805
|
-
setSelectedColumnId: B,
|
|
806
|
-
view: c,
|
|
807
|
-
setView: w,
|
|
808
|
-
undo: N,
|
|
809
|
-
redo: I,
|
|
810
|
-
canUndo: r,
|
|
811
|
-
canRedo: s
|
|
812
|
-
} = wa(t), [l, m] = q(null), {
|
|
813
|
-
createCard: v,
|
|
814
|
-
updateCard: D,
|
|
815
|
-
deleteCard: _,
|
|
816
|
-
moveCard: E,
|
|
817
|
-
duplicateCard: T,
|
|
818
|
-
archiveCard: S,
|
|
819
|
-
restoreCard: V
|
|
820
|
-
} = xa(t, h), {
|
|
821
|
-
createColumn: U,
|
|
822
|
-
updateColumn: W,
|
|
823
|
-
deleteColumn: Z,
|
|
824
|
-
reorderColumns: z,
|
|
825
|
-
collapseColumn: H,
|
|
826
|
-
expandColumn: b
|
|
827
|
-
} = Na(t, h), {
|
|
828
|
-
createSwimlane: A,
|
|
829
|
-
updateSwimlane: P,
|
|
830
|
-
deleteSwimlane: J,
|
|
831
|
-
reorderSwimlanes: te,
|
|
832
|
-
collapseSwimlane: Q,
|
|
833
|
-
expandSwimlane: O
|
|
834
|
-
} = ba(t, h), {
|
|
835
|
-
draggedCard: G,
|
|
836
|
-
dragOverColumn: ie,
|
|
837
|
-
handleDragStart: Y,
|
|
838
|
-
handleDragOver: ae,
|
|
839
|
-
handleDragEnd: Se,
|
|
840
|
-
handleDrop: ke
|
|
841
|
-
} = ka(h, E, t.wipStrict, t), {
|
|
842
|
-
filteredCards: se,
|
|
843
|
-
searchQuery: me,
|
|
844
|
-
setSearchQuery: ue,
|
|
845
|
-
activeFilters: p,
|
|
846
|
-
setActiveFilters: g,
|
|
847
|
-
clearFilters: F
|
|
848
|
-
} = Sa(h), { selectedIndex: R, setSelectedIndex: X } = It({
|
|
849
|
-
totalItems: se.length,
|
|
850
|
-
columns: 1,
|
|
851
|
-
// Simplified for now, though Kanban is a grid-ish
|
|
852
|
-
enabled: !t.readOnly,
|
|
853
|
-
onSelect: (K) => {
|
|
854
|
-
const M = se[K];
|
|
855
|
-
M && (m(M.id), (document.getElementById(M.id) || document.querySelector(`[data-card-id="${M.id}"]`))?.scrollIntoView({ behavior: "smooth", block: "nearest" }));
|
|
856
|
-
},
|
|
857
|
-
onAction: (K) => {
|
|
858
|
-
const M = se[K];
|
|
859
|
-
M && a.onCardClick && a.onCardClick(M);
|
|
860
|
-
}
|
|
861
|
-
}), de = ce(() => ({
|
|
862
|
-
// Card operations
|
|
863
|
-
addCard: v,
|
|
864
|
-
updateCard: D,
|
|
865
|
-
deleteCard: _,
|
|
866
|
-
moveCard: E,
|
|
867
|
-
duplicateCard: T,
|
|
868
|
-
archiveCard: S,
|
|
869
|
-
restoreCard: V,
|
|
870
|
-
getCard: (K) => h.cards.find((M) => M.id === K),
|
|
871
|
-
getCards: () => h.cards,
|
|
872
|
-
getCardsInColumn: (K) => h.cards.filter((M) => M.columnId === K),
|
|
873
|
-
getOrderedCards: (K) => h.cards.filter((M) => M.columnId === K).sort((M, he) => (M.position ?? 0) - (he.position ?? 0)),
|
|
874
|
-
// Column operations
|
|
875
|
-
addColumn: U,
|
|
876
|
-
updateColumn: W,
|
|
877
|
-
deleteColumn: Z,
|
|
878
|
-
reorderColumns: z,
|
|
879
|
-
collapseColumn: H,
|
|
880
|
-
expandColumn: b,
|
|
881
|
-
getColumn: (K) => h.columns.find((M) => M.id === K),
|
|
882
|
-
getColumns: () => h.columns,
|
|
883
|
-
// Swimlane operations
|
|
884
|
-
addSwimlane: A,
|
|
885
|
-
updateSwimlane: P,
|
|
886
|
-
deleteSwimlane: J,
|
|
887
|
-
reorderSwimlanes: te,
|
|
888
|
-
collapseSwimlane: Q,
|
|
889
|
-
expandSwimlane: O,
|
|
890
|
-
getSwimlane: (K) => h.swimlanes?.find((M) => M.id === K),
|
|
891
|
-
getSwimlanes: () => h.swimlanes || [],
|
|
892
|
-
// Selection operations
|
|
893
|
-
selectCard: (K) => x([K]),
|
|
894
|
-
selectCards: x,
|
|
895
|
-
deselectCard: (K) => {
|
|
896
|
-
const M = k.filter((he) => he !== K);
|
|
897
|
-
x(M);
|
|
898
|
-
},
|
|
899
|
-
deselectAllCards: () => x([]),
|
|
900
|
-
getSelectedCards: () => h.cards.filter((K) => k.includes(K.id)),
|
|
901
|
-
// UI Operations (Enterprise)
|
|
902
|
-
focusCard: (K) => {
|
|
903
|
-
const M = document.getElementById(K) || document.querySelector(`[data-card-id="${K}"]`);
|
|
904
|
-
M instanceof HTMLElement && (M.focus(), M.scrollIntoView({ behavior: "smooth", block: "center" }));
|
|
905
|
-
},
|
|
906
|
-
highlightCard: (K, M = 2e3) => {
|
|
907
|
-
m(K), setTimeout(() => m(null), M);
|
|
908
|
-
},
|
|
909
|
-
// View operations
|
|
910
|
-
setView: w,
|
|
911
|
-
getView: () => c,
|
|
912
|
-
scrollToColumn: (K, M) => {
|
|
913
|
-
(document.getElementById(`column-${K}`) || document.querySelector(`[data-column-id="${K}"]`))?.scrollIntoView(M || { behavior: "smooth", block: "center", inline: "center" });
|
|
914
|
-
},
|
|
915
|
-
scrollToCard: (K, M) => {
|
|
916
|
-
(document.getElementById(K) || document.querySelector(`[data-card-id="${K}"]`))?.scrollIntoView(M || { behavior: "smooth", block: "center" });
|
|
917
|
-
},
|
|
918
|
-
// Filter & search operations
|
|
919
|
-
setSearchQuery: ue,
|
|
920
|
-
getSearchQuery: () => me,
|
|
921
|
-
setActiveFilters: g,
|
|
922
|
-
getActiveFilters: () => p,
|
|
923
|
-
clearFilters: F,
|
|
924
|
-
getFilteredCards: () => se,
|
|
925
|
-
// Board operations
|
|
926
|
-
getBoard: () => h,
|
|
927
|
-
setBoard: f,
|
|
928
|
-
refresh: async () => {
|
|
929
|
-
},
|
|
930
|
-
reset: () => f(t.board),
|
|
931
|
-
// Utility methods
|
|
932
|
-
showSpinner: u.showSpinner,
|
|
933
|
-
hideSpinner: u.hideSpinner,
|
|
934
|
-
forceUpdate: () => {
|
|
935
|
-
},
|
|
936
|
-
getStatistics: () => ({ totalCards: h.cards.length, totalColumns: h.columns.length }),
|
|
937
|
-
validate: () => ({ isValid: !0, errors: [] }),
|
|
938
|
-
...a
|
|
939
|
-
}), [
|
|
940
|
-
h,
|
|
941
|
-
v,
|
|
942
|
-
D,
|
|
943
|
-
_,
|
|
944
|
-
E,
|
|
945
|
-
T,
|
|
946
|
-
S,
|
|
947
|
-
V,
|
|
948
|
-
U,
|
|
949
|
-
W,
|
|
950
|
-
Z,
|
|
951
|
-
z,
|
|
952
|
-
H,
|
|
953
|
-
b,
|
|
954
|
-
A,
|
|
955
|
-
P,
|
|
956
|
-
J,
|
|
957
|
-
te,
|
|
958
|
-
Q,
|
|
959
|
-
O,
|
|
960
|
-
k,
|
|
961
|
-
x,
|
|
962
|
-
C,
|
|
963
|
-
B,
|
|
964
|
-
me,
|
|
965
|
-
ue,
|
|
966
|
-
p,
|
|
967
|
-
g,
|
|
968
|
-
F,
|
|
969
|
-
se,
|
|
970
|
-
f,
|
|
971
|
-
t.board,
|
|
972
|
-
u,
|
|
973
|
-
a,
|
|
974
|
-
c,
|
|
975
|
-
t.wipStrict,
|
|
976
|
-
t
|
|
977
|
-
]);
|
|
978
|
-
return ce(() => ({
|
|
979
|
-
state: {
|
|
980
|
-
board: h,
|
|
981
|
-
selectedCards: k,
|
|
982
|
-
highlightedCardId: l,
|
|
983
|
-
selectedColumnId: C,
|
|
984
|
-
view: c,
|
|
985
|
-
draggedCard: G,
|
|
986
|
-
dragOverColumn: ie,
|
|
987
|
-
filteredCards: se,
|
|
988
|
-
searchQuery: me,
|
|
989
|
-
activeFilters: p,
|
|
990
|
-
selectedIndex: R,
|
|
991
|
-
canUndo: r,
|
|
992
|
-
canRedo: s
|
|
993
|
-
},
|
|
994
|
-
actions: {
|
|
995
|
-
setBoard: f,
|
|
996
|
-
setSelectedCards: x,
|
|
997
|
-
setSelectedColumnId: B,
|
|
998
|
-
setView: w,
|
|
999
|
-
createCard: v,
|
|
1000
|
-
updateCard: D,
|
|
1001
|
-
deleteCard: _,
|
|
1002
|
-
moveCard: E,
|
|
1003
|
-
duplicateCard: T,
|
|
1004
|
-
archiveCard: S,
|
|
1005
|
-
restoreCard: V,
|
|
1006
|
-
createColumn: U,
|
|
1007
|
-
updateColumn: W,
|
|
1008
|
-
deleteColumn: Z,
|
|
1009
|
-
reorderColumns: z,
|
|
1010
|
-
collapseColumn: H,
|
|
1011
|
-
expandColumn: b,
|
|
1012
|
-
createSwimlane: A,
|
|
1013
|
-
updateSwimlane: P,
|
|
1014
|
-
deleteSwimlane: J,
|
|
1015
|
-
reorderSwimlanes: te,
|
|
1016
|
-
collapseSwimlane: Q,
|
|
1017
|
-
expandSwimlane: O,
|
|
1018
|
-
handleDragStart: Y,
|
|
1019
|
-
handleDragOver: ae,
|
|
1020
|
-
handleDragEnd: Se,
|
|
1021
|
-
handleDrop: ke,
|
|
1022
|
-
setSearchQuery: ue,
|
|
1023
|
-
setActiveFilters: g,
|
|
1024
|
-
clearFilters: F,
|
|
1025
|
-
setSelectedIndex: X,
|
|
1026
|
-
undo: N,
|
|
1027
|
-
redo: I
|
|
1028
|
-
},
|
|
1029
|
-
services: {
|
|
1030
|
-
serviceRegistry: y
|
|
1031
|
-
},
|
|
1032
|
-
imperativeAPI: de,
|
|
1033
|
-
dir: o,
|
|
1034
|
-
baseApi: u
|
|
1035
|
-
}), [
|
|
1036
|
-
u,
|
|
1037
|
-
de,
|
|
1038
|
-
h,
|
|
1039
|
-
f,
|
|
1040
|
-
k,
|
|
1041
|
-
x,
|
|
1042
|
-
l,
|
|
1043
|
-
C,
|
|
1044
|
-
B,
|
|
1045
|
-
c,
|
|
1046
|
-
w,
|
|
1047
|
-
o,
|
|
1048
|
-
v,
|
|
1049
|
-
D,
|
|
1050
|
-
_,
|
|
1051
|
-
E,
|
|
1052
|
-
T,
|
|
1053
|
-
S,
|
|
1054
|
-
V,
|
|
1055
|
-
U,
|
|
1056
|
-
W,
|
|
1057
|
-
Z,
|
|
1058
|
-
z,
|
|
1059
|
-
H,
|
|
1060
|
-
b,
|
|
1061
|
-
A,
|
|
1062
|
-
P,
|
|
1063
|
-
J,
|
|
1064
|
-
te,
|
|
1065
|
-
Q,
|
|
1066
|
-
O,
|
|
1067
|
-
G,
|
|
1068
|
-
ie,
|
|
1069
|
-
Y,
|
|
1070
|
-
ae,
|
|
1071
|
-
Se,
|
|
1072
|
-
ke,
|
|
1073
|
-
se,
|
|
1074
|
-
me,
|
|
1075
|
-
ue,
|
|
1076
|
-
p,
|
|
1077
|
-
g,
|
|
1078
|
-
F,
|
|
1079
|
-
y,
|
|
1080
|
-
R,
|
|
1081
|
-
X,
|
|
1082
|
-
N,
|
|
1083
|
-
I,
|
|
1084
|
-
r,
|
|
1085
|
-
s
|
|
1086
|
-
]);
|
|
1087
|
-
};
|
|
1088
|
-
function Ia(t, a = 300) {
|
|
1089
|
-
const [n, i] = q(t);
|
|
1090
|
-
return xe(() => {
|
|
1091
|
-
const o = setTimeout(() => {
|
|
1092
|
-
i(t);
|
|
1093
|
-
}, a);
|
|
1094
|
-
return () => {
|
|
1095
|
-
clearTimeout(o);
|
|
1096
|
-
};
|
|
1097
|
-
}, [t, a]), n;
|
|
1098
|
-
}
|
|
1099
|
-
const Aa = Nt(
|
|
1100
|
-
"inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
1101
|
-
{
|
|
1102
|
-
variants: {
|
|
1103
|
-
variant: {
|
|
1104
|
-
default: "border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",
|
|
1105
|
-
secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
1106
|
-
destructive: "border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",
|
|
1107
|
-
outline: "text-foreground"
|
|
1108
|
-
}
|
|
1109
|
-
},
|
|
1110
|
-
defaultVariants: {
|
|
1111
|
-
variant: "default"
|
|
1112
|
-
}
|
|
1113
|
-
}
|
|
1114
|
-
);
|
|
1115
|
-
function ot({ className: t, variant: a, ...n }) {
|
|
1116
|
-
return /* @__PURE__ */ e("div", { className: j(Aa({ variant: a }), t), ...n });
|
|
1117
|
-
}
|
|
1118
|
-
const Fa = ({
|
|
1119
|
-
board: t,
|
|
1120
|
-
activeFilters: a,
|
|
1121
|
-
onFiltersChange: n,
|
|
1122
|
-
onClearFilters: i
|
|
1123
|
-
}) => {
|
|
1124
|
-
const u = Array.from(new Set(t.cards.flatMap((c) => c.tags).map((c) => JSON.stringify(c)))).map((c) => JSON.parse(c)).filter((c, w, N) => w === N.findIndex((I) => I.id === c.id)), h = Array.from(new Set(t.cards.flatMap((c) => c.assignees).map((c) => JSON.stringify(c)))).map((c) => JSON.parse(c)).filter((c, w, N) => w === N.findIndex((I) => I.id === c.id)), f = ["low", "medium", "high", "critical"], k = (c) => {
|
|
1125
|
-
const w = a.priority || [], N = w.includes(c) ? w.filter((I) => I !== c) : [...w, c];
|
|
1126
|
-
n({ ...a, priority: N.length ? N : void 0 });
|
|
1127
|
-
}, x = (c) => {
|
|
1128
|
-
const w = a.tags || [], N = w.includes(c) ? w.filter((I) => I !== c) : [...w, c];
|
|
1129
|
-
n({ ...a, tags: N.length ? N : void 0 });
|
|
1130
|
-
}, C = (c) => {
|
|
1131
|
-
const w = a.assignees || [], N = w.includes(c) ? w.filter((I) => I !== c) : [...w, c];
|
|
1132
|
-
n({ ...a, assignees: N.length ? N : void 0 });
|
|
1133
|
-
}, B = (a.priority?.length || 0) + (a.tags?.length || 0) + (a.assignees?.length || 0);
|
|
1134
|
-
return /* @__PURE__ */ d(Et, { children: [
|
|
1135
|
-
/* @__PURE__ */ e(_t, { asChild: !0, children: /* @__PURE__ */ d($, { variant: "outline", size: "sm", className: "relative", children: [
|
|
1136
|
-
/* @__PURE__ */ e(Rt, { className: "h-4 w-4 mr-2" }),
|
|
1137
|
-
"Filters",
|
|
1138
|
-
B > 0 && /* @__PURE__ */ e(ot, { variant: "secondary", className: "ml-2 h-5 min-w-[20px] px-1 text-[10px] flex items-center justify-center", children: B })
|
|
1139
|
-
] }) }),
|
|
1140
|
-
/* @__PURE__ */ d(Vt, { className: "w-80 p-4", align: "start", children: [
|
|
1141
|
-
/* @__PURE__ */ d("div", { className: "flex items-center justify-between mb-4", children: [
|
|
1142
|
-
/* @__PURE__ */ e("h4", { className: "font-medium leading-none", children: "Filters" }),
|
|
1143
|
-
B > 0 && /* @__PURE__ */ e($, { variant: "ghost", size: "sm", className: "h-auto p-0 text-xs text-muted-foreground", onClick: i, children: "Clear all" })
|
|
1144
|
-
] }),
|
|
1145
|
-
/* @__PURE__ */ e(Lt, { className: "h-[300px] pr-4", children: /* @__PURE__ */ d("div", { className: "space-y-6", children: [
|
|
1146
|
-
/* @__PURE__ */ d("div", { className: "space-y-3", children: [
|
|
1147
|
-
/* @__PURE__ */ e("h5", { className: "text-sm font-medium text-muted-foreground", children: "Priority" }),
|
|
1148
|
-
/* @__PURE__ */ e("div", { className: "space-y-2", children: f.map((c) => /* @__PURE__ */ d("div", { className: "flex items-center space-x-2", children: [
|
|
1149
|
-
/* @__PURE__ */ e(
|
|
1150
|
-
Ce,
|
|
1151
|
-
{
|
|
1152
|
-
id: `priority-${c}`,
|
|
1153
|
-
checked: a.priority?.includes(c),
|
|
1154
|
-
onCheckedChange: () => k(c)
|
|
1155
|
-
}
|
|
1156
|
-
),
|
|
1157
|
-
/* @__PURE__ */ e(oe, { htmlFor: `priority-${c}`, className: "capitalize text-sm font-normal cursor-pointer", children: c })
|
|
1158
|
-
] }, c)) })
|
|
1159
|
-
] }),
|
|
1160
|
-
h.length > 0 && /* @__PURE__ */ d("div", { className: "space-y-3", children: [
|
|
1161
|
-
/* @__PURE__ */ e("h5", { className: "text-sm font-medium text-muted-foreground", children: "Assignees" }),
|
|
1162
|
-
/* @__PURE__ */ e("div", { className: "space-y-2", children: h.map((c) => /* @__PURE__ */ d("div", { className: "flex items-center space-x-2", children: [
|
|
1163
|
-
/* @__PURE__ */ e(
|
|
1164
|
-
Ce,
|
|
1165
|
-
{
|
|
1166
|
-
id: `assignee-${c.id}`,
|
|
1167
|
-
checked: a.assignees?.includes(c.id),
|
|
1168
|
-
onCheckedChange: () => C(c.id)
|
|
1169
|
-
}
|
|
1170
|
-
),
|
|
1171
|
-
/* @__PURE__ */ d(oe, { htmlFor: `assignee-${c.id}`, className: "text-sm font-normal cursor-pointer flex items-center gap-2", children: [
|
|
1172
|
-
c.avatarUrl && /* @__PURE__ */ e("img", { src: c.avatarUrl, alt: "", className: "w-4 h-4 rounded-full" }),
|
|
1173
|
-
c.name
|
|
1174
|
-
] })
|
|
1175
|
-
] }, c.id)) })
|
|
1176
|
-
] }),
|
|
1177
|
-
u.length > 0 && /* @__PURE__ */ d("div", { className: "space-y-3", children: [
|
|
1178
|
-
/* @__PURE__ */ e("h5", { className: "text-sm font-medium text-muted-foreground", children: "Tags" }),
|
|
1179
|
-
/* @__PURE__ */ e("div", { className: "space-y-2", children: u.map((c) => /* @__PURE__ */ d("div", { className: "flex items-center space-x-2", children: [
|
|
1180
|
-
/* @__PURE__ */ e(
|
|
1181
|
-
Ce,
|
|
1182
|
-
{
|
|
1183
|
-
id: `tag-${c.id}`,
|
|
1184
|
-
checked: a.tags?.includes(c.id),
|
|
1185
|
-
onCheckedChange: () => x(c.id)
|
|
1186
|
-
}
|
|
1187
|
-
),
|
|
1188
|
-
/* @__PURE__ */ d(oe, { htmlFor: `tag-${c.id}`, className: "text-sm font-normal cursor-pointer flex items-center gap-2", children: [
|
|
1189
|
-
/* @__PURE__ */ e("div", { className: "w-2 h-2 rounded-full", style: { backgroundColor: c.color } }),
|
|
1190
|
-
c.name
|
|
1191
|
-
] })
|
|
1192
|
-
] }, c.id)) })
|
|
1193
|
-
] })
|
|
1194
|
-
] }) })
|
|
1195
|
-
] })
|
|
1196
|
-
] });
|
|
1197
|
-
}, Ta = ({
|
|
1198
|
-
searchQuery: t,
|
|
1199
|
-
onSearchChange: a,
|
|
1200
|
-
onAddCardClick: n,
|
|
1201
|
-
onAddColumn: i,
|
|
1202
|
-
board: o,
|
|
1203
|
-
className: u,
|
|
1204
|
-
view: y = "standard",
|
|
1205
|
-
onViewChange: h,
|
|
1206
|
-
onUndo: f,
|
|
1207
|
-
onRedo: k,
|
|
1208
|
-
canUndo: x,
|
|
1209
|
-
canRedo: C,
|
|
1210
|
-
activeFilters: B,
|
|
1211
|
-
onFiltersChange: c
|
|
1212
|
-
}) => {
|
|
1213
|
-
const w = be(), [N, I] = q(t), { t: r } = ye(), s = Ia(N, 300);
|
|
1214
|
-
xe(() => {
|
|
1215
|
-
a(s);
|
|
1216
|
-
}, [s, a]), xe(() => {
|
|
1217
|
-
I(t);
|
|
1218
|
-
}, [t]);
|
|
1219
|
-
const l = () => {
|
|
1220
|
-
n?.();
|
|
1221
|
-
}, m = (v) => {
|
|
1222
|
-
if (o)
|
|
1223
|
-
try {
|
|
1224
|
-
const D = w.get("ExportService");
|
|
1225
|
-
if (v === "csv") {
|
|
1226
|
-
const E = o.cards.map((T) => ({
|
|
1227
|
-
id: T.id,
|
|
1228
|
-
title: T.title,
|
|
1229
|
-
description: T.description || "",
|
|
1230
|
-
column: o.columns.find((S) => S.id === T.columnId)?.name || "",
|
|
1231
|
-
priority: T.priority || "",
|
|
1232
|
-
assignees: T.assignees?.map((S) => S.name).join("; ") || "",
|
|
1233
|
-
tags: T.tags?.map((S) => S.name).join("; ") || "",
|
|
1234
|
-
dueDate: T.dueDate ? new Date(T.dueDate).toISOString().split("T")[0] : "",
|
|
1235
|
-
isArchived: T.isArchived ? "Yes" : "No"
|
|
1236
|
-
}));
|
|
1237
|
-
if (D)
|
|
1238
|
-
D.exportToCSV(E, [
|
|
1239
|
-
{ header: "ID", accessorKey: "id" },
|
|
1240
|
-
{ header: "Title", accessorKey: "title" },
|
|
1241
|
-
{ header: "Description", accessorKey: "description" },
|
|
1242
|
-
{ header: "Column", accessorKey: "column" },
|
|
1243
|
-
{ header: "Priority", accessorKey: "priority" },
|
|
1244
|
-
{ header: "Assignees", accessorKey: "assignees" },
|
|
1245
|
-
{ header: "Tags", accessorKey: "tags" },
|
|
1246
|
-
{ header: "Due Date", accessorKey: "dueDate" },
|
|
1247
|
-
{ header: "Archived", accessorKey: "isArchived" }
|
|
1248
|
-
], { fileName: `kanban-board-${o.id}` });
|
|
1249
|
-
else {
|
|
1250
|
-
const T = Object.keys(E[0] || {}), S = [
|
|
1251
|
-
T.join(","),
|
|
1252
|
-
...E.map((Z) => T.map((z) => `"${Z[z]}"`).join(","))
|
|
1253
|
-
].join(`
|
|
1254
|
-
`), V = new Blob([S], { type: "text/csv" }), U = URL.createObjectURL(V), W = document.createElement("a");
|
|
1255
|
-
W.href = U, W.download = `kanban-board-${o.id}.csv`, W.click(), URL.revokeObjectURL(U);
|
|
1256
|
-
}
|
|
1257
|
-
} else {
|
|
1258
|
-
const E = JSON.stringify(o, null, 2);
|
|
1259
|
-
if (D && D.download)
|
|
1260
|
-
D.download(E, `kanban-board-${o.id}.json`);
|
|
1261
|
-
else {
|
|
1262
|
-
const T = new Blob([E], { type: "application/json" }), S = URL.createObjectURL(T), V = document.createElement("a");
|
|
1263
|
-
V.href = S, V.download = `kanban-board-${o.id}.json`, V.click(), URL.revokeObjectURL(S);
|
|
1264
|
-
}
|
|
1265
|
-
}
|
|
1266
|
-
const _ = w.get("NotificationService");
|
|
1267
|
-
_ && _.add({
|
|
1268
|
-
type: "success",
|
|
1269
|
-
message: `Board exported as ${v.toUpperCase()}`,
|
|
1270
|
-
duration: 3e3
|
|
1271
|
-
});
|
|
1272
|
-
} catch (D) {
|
|
1273
|
-
const _ = w.get("NotificationService");
|
|
1274
|
-
_ && _.add({
|
|
1275
|
-
type: "error",
|
|
1276
|
-
message: `Failed to export board: ${D instanceof Error ? D.message : "Unknown error"}`,
|
|
1277
|
-
duration: 4e3
|
|
1278
|
-
});
|
|
1279
|
-
}
|
|
1280
|
-
};
|
|
1281
|
-
return /* @__PURE__ */ e(pt, { children: /* @__PURE__ */ d("div", { className: `flex items-center gap-4 p-4 border-b ${u || ""}`, children: [
|
|
1282
|
-
/* @__PURE__ */ d("div", { className: "flex gap-1 mr-2", children: [
|
|
1283
|
-
/* @__PURE__ */ e(
|
|
1284
|
-
$,
|
|
1285
|
-
{
|
|
1286
|
-
variant: "ghost",
|
|
1287
|
-
size: "icon",
|
|
1288
|
-
onClick: f,
|
|
1289
|
-
disabled: !x,
|
|
1290
|
-
title: "Undo (Ctrl+Z)",
|
|
1291
|
-
children: /* @__PURE__ */ e(fa, { className: "h-4 w-4" })
|
|
1292
|
-
}
|
|
1293
|
-
),
|
|
1294
|
-
/* @__PURE__ */ e(
|
|
1295
|
-
$,
|
|
1296
|
-
{
|
|
1297
|
-
variant: "ghost",
|
|
1298
|
-
size: "icon",
|
|
1299
|
-
onClick: k,
|
|
1300
|
-
disabled: !C,
|
|
1301
|
-
title: "Redo (Ctrl+Shift+Z)",
|
|
1302
|
-
children: /* @__PURE__ */ e(ua, { className: "h-4 w-4" })
|
|
1303
|
-
}
|
|
1304
|
-
)
|
|
1305
|
-
] }),
|
|
1306
|
-
/* @__PURE__ */ d("div", { className: "relative flex-1 max-w-sm", children: [
|
|
1307
|
-
/* @__PURE__ */ e(Bt, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground" }),
|
|
1308
|
-
/* @__PURE__ */ e(
|
|
1309
|
-
pe,
|
|
1310
|
-
{
|
|
1311
|
-
placeholder: r("search_placeholder"),
|
|
1312
|
-
value: N,
|
|
1313
|
-
onChange: (v) => I(v.target.value),
|
|
1314
|
-
className: "pl-9"
|
|
1315
|
-
}
|
|
1316
|
-
)
|
|
1317
|
-
] }),
|
|
1318
|
-
/* @__PURE__ */ e("div", { className: "w-[180px]", children: /* @__PURE__ */ d(De, { value: y, onValueChange: (v) => h?.(v), children: [
|
|
1319
|
-
/* @__PURE__ */ e(Ie, { children: /* @__PURE__ */ e(Ae, { placeholder: "Select view" }) }),
|
|
1320
|
-
/* @__PURE__ */ d(Fe, { children: [
|
|
1321
|
-
/* @__PURE__ */ e(re, { value: "standard", children: /* @__PURE__ */ d("div", { className: "flex items-center", children: [
|
|
1322
|
-
/* @__PURE__ */ e(We, { className: "h-4 w-4 mr-2" }),
|
|
1323
|
-
r("view_standard")
|
|
1324
|
-
] }) }),
|
|
1325
|
-
/* @__PURE__ */ e(re, { value: "swimlane", children: /* @__PURE__ */ d("div", { className: "flex items-center", children: [
|
|
1326
|
-
/* @__PURE__ */ e(Pt, { className: "h-4 w-4 mr-2" }),
|
|
1327
|
-
r("view_swimlane")
|
|
1328
|
-
] }) }),
|
|
1329
|
-
/* @__PURE__ */ e(re, { value: "timeline", children: /* @__PURE__ */ d("div", { className: "flex items-center", children: [
|
|
1330
|
-
/* @__PURE__ */ e(We, { className: "h-4 w-4 mr-2" }),
|
|
1331
|
-
" ",
|
|
1332
|
-
r("view_timeline")
|
|
1333
|
-
] }) })
|
|
1334
|
-
] })
|
|
1335
|
-
] }) }),
|
|
1336
|
-
o && /* @__PURE__ */ e(
|
|
1337
|
-
Fa,
|
|
1338
|
-
{
|
|
1339
|
-
board: o,
|
|
1340
|
-
activeFilters: B || {},
|
|
1341
|
-
onFiltersChange: (v) => c?.(v),
|
|
1342
|
-
onClearFilters: () => c?.({})
|
|
1343
|
-
}
|
|
1344
|
-
),
|
|
1345
|
-
o && /* @__PURE__ */ d("div", { className: "flex gap-1", children: [
|
|
1346
|
-
/* @__PURE__ */ d(
|
|
1347
|
-
$,
|
|
1348
|
-
{
|
|
1349
|
-
variant: "outline",
|
|
1350
|
-
size: "sm",
|
|
1351
|
-
onClick: () => m("csv"),
|
|
1352
|
-
title: "Export as CSV",
|
|
1353
|
-
children: [
|
|
1354
|
-
/* @__PURE__ */ e(qe, { className: "h-4 w-4 mr-2" }),
|
|
1355
|
-
"CSV"
|
|
1356
|
-
]
|
|
1357
|
-
}
|
|
1358
|
-
),
|
|
1359
|
-
/* @__PURE__ */ d(
|
|
1360
|
-
$,
|
|
1361
|
-
{
|
|
1362
|
-
variant: "outline",
|
|
1363
|
-
size: "sm",
|
|
1364
|
-
onClick: () => m("json"),
|
|
1365
|
-
title: "Export as JSON",
|
|
1366
|
-
children: [
|
|
1367
|
-
/* @__PURE__ */ e(qe, { className: "h-4 w-4 mr-2" }),
|
|
1368
|
-
"JSON"
|
|
1369
|
-
]
|
|
1370
|
-
}
|
|
1371
|
-
)
|
|
1372
|
-
] }),
|
|
1373
|
-
/* @__PURE__ */ d("div", { className: "ml-auto flex gap-2", children: [
|
|
1374
|
-
/* @__PURE__ */ d($, { variant: "outline", size: "sm", onClick: i, children: [
|
|
1375
|
-
/* @__PURE__ */ e(Ne, { className: "h-4 w-4 mr-2" }),
|
|
1376
|
-
r("add_column")
|
|
1377
|
-
] }),
|
|
1378
|
-
/* @__PURE__ */ d($, { size: "sm", onClick: l, children: [
|
|
1379
|
-
/* @__PURE__ */ e(Ne, { className: "h-4 w-4 mr-2" }),
|
|
1380
|
-
r("add_card")
|
|
1381
|
-
] })
|
|
1382
|
-
] })
|
|
1383
|
-
] }) });
|
|
1384
|
-
}, Te = ee.forwardRef(
|
|
1385
|
-
({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
1386
|
-
"textarea",
|
|
1387
|
-
{
|
|
1388
|
-
className: j(
|
|
1389
|
-
"flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
1390
|
-
t
|
|
1391
|
-
),
|
|
1392
|
-
ref: n,
|
|
1393
|
-
...a
|
|
1394
|
-
}
|
|
1395
|
-
)
|
|
1396
|
-
);
|
|
1397
|
-
Te.displayName = "Textarea";
|
|
1398
|
-
const Le = ee.createContext(void 0), lt = ee.forwardRef(({ className: t, defaultValue: a, value: n, onValueChange: i, children: o, ...u }, y) => {
|
|
1399
|
-
const [h, f] = ee.useState(a || ""), k = n !== void 0, x = k ? n : h, C = ee.useCallback(
|
|
1400
|
-
(B) => {
|
|
1401
|
-
k || f(B), i?.(B);
|
|
1402
|
-
},
|
|
1403
|
-
[k, i]
|
|
1404
|
-
);
|
|
1405
|
-
return /* @__PURE__ */ e(Le.Provider, { value: { value: x, onValueChange: C }, children: /* @__PURE__ */ e("div", { ref: y, className: j(t), ...u, children: o }) });
|
|
1406
|
-
});
|
|
1407
|
-
lt.displayName = "Tabs";
|
|
1408
|
-
const dt = ee.forwardRef(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
1409
|
-
"div",
|
|
1410
|
-
{
|
|
1411
|
-
ref: n,
|
|
1412
|
-
className: j(
|
|
1413
|
-
"inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",
|
|
1414
|
-
t
|
|
1415
|
-
),
|
|
1416
|
-
...a
|
|
1417
|
-
}
|
|
1418
|
-
));
|
|
1419
|
-
dt.displayName = "TabsList";
|
|
1420
|
-
const fe = ee.forwardRef(({ className: t, value: a, onClick: n, ...i }, o) => {
|
|
1421
|
-
const u = ee.useContext(Le);
|
|
1422
|
-
if (!u) throw new Error("TabsTrigger must be used within Tabs");
|
|
1423
|
-
const y = u.value === a;
|
|
1424
|
-
return /* @__PURE__ */ e(
|
|
1425
|
-
"button",
|
|
1426
|
-
{
|
|
1427
|
-
ref: o,
|
|
1428
|
-
type: "button",
|
|
1429
|
-
className: j(
|
|
1430
|
-
"inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
|
|
1431
|
-
y && "bg-background text-foreground shadow-sm",
|
|
1432
|
-
t
|
|
1433
|
-
),
|
|
1434
|
-
onClick: (h) => {
|
|
1435
|
-
u.onValueChange(a), n?.(h);
|
|
1436
|
-
},
|
|
1437
|
-
...i
|
|
1438
|
-
}
|
|
1439
|
-
);
|
|
1440
|
-
});
|
|
1441
|
-
fe.displayName = "TabsTrigger";
|
|
1442
|
-
const ve = ee.forwardRef(({ className: t, value: a, children: n, ...i }, o) => {
|
|
1443
|
-
const u = ee.useContext(Le);
|
|
1444
|
-
if (!u) throw new Error("TabsContent must be used within Tabs");
|
|
1445
|
-
return u.value !== a ? null : /* @__PURE__ */ e(
|
|
1446
|
-
"div",
|
|
1447
|
-
{
|
|
1448
|
-
ref: o,
|
|
1449
|
-
className: j(
|
|
1450
|
-
"mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
1451
|
-
t
|
|
1452
|
-
),
|
|
1453
|
-
...i,
|
|
1454
|
-
children: n
|
|
1455
|
-
}
|
|
1456
|
-
);
|
|
1457
|
-
});
|
|
1458
|
-
ve.displayName = "TabsContent";
|
|
1459
|
-
const Ba = ({
|
|
1460
|
-
isOpen: t,
|
|
1461
|
-
onClose: a,
|
|
1462
|
-
onSave: n,
|
|
1463
|
-
onDelete: i,
|
|
1464
|
-
card: o,
|
|
1465
|
-
columns: u = [],
|
|
1466
|
-
columnId: y,
|
|
1467
|
-
customFields: h = [],
|
|
1468
|
-
currentUser: f = { id: "current-user", name: "Current User" }
|
|
1469
|
-
}) => {
|
|
1470
|
-
const { t: k } = ye(), x = () => typeof crypto < "u" && crypto.randomUUID ? crypto.randomUUID() : `id-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`, C = Qt({
|
|
1471
|
-
defaultValues: {
|
|
1472
|
-
title: o?.title || "",
|
|
1473
|
-
description: o?.description || "",
|
|
1474
|
-
columnId: o?.columnId || y || u[0]?.id || "",
|
|
1475
|
-
priority: o?.priority || "medium",
|
|
1476
|
-
startDate: o?.startDate ? new Date(o.startDate) : void 0,
|
|
1477
|
-
dueDate: o?.dueDate ? new Date(o.dueDate) : void 0,
|
|
1478
|
-
checklists: o?.checklists || [],
|
|
1479
|
-
attachments: o?.attachments || [],
|
|
1480
|
-
comments: o?.comments || [],
|
|
1481
|
-
coverImage: o?.coverImage || "",
|
|
1482
|
-
customFieldValues: o?.customFieldValues || {},
|
|
1483
|
-
subtasks: o?.subtasks || [],
|
|
1484
|
-
timeTracking: o?.timeTracking || { estimated: 0, actual: 0 },
|
|
1485
|
-
activity: o?.activity || [],
|
|
1486
|
-
assignees: o?.assignees || [],
|
|
1487
|
-
tags: o?.tags || [],
|
|
1488
|
-
...o
|
|
1489
|
-
// Merge any other properties
|
|
1490
|
-
},
|
|
1491
|
-
onSubmit: async ({ value: p }) => {
|
|
1492
|
-
n(p), a();
|
|
1493
|
-
}
|
|
1494
|
-
});
|
|
1495
|
-
xe(() => {
|
|
1496
|
-
}, [t, o]);
|
|
1497
|
-
const B = () => {
|
|
1498
|
-
o?.id && i && i(o.id);
|
|
1499
|
-
}, [c, w] = q({}), N = () => {
|
|
1500
|
-
const p = {
|
|
1501
|
-
id: x(),
|
|
1502
|
-
title: "Checklist",
|
|
1503
|
-
items: []
|
|
1504
|
-
};
|
|
1505
|
-
C.pushFieldValue("checklists", p);
|
|
1506
|
-
}, I = (p, g) => {
|
|
1507
|
-
w((F) => ({ ...F, [p]: g }));
|
|
1508
|
-
}, r = (p) => {
|
|
1509
|
-
const g = c[p]?.trim();
|
|
1510
|
-
if (!g) return;
|
|
1511
|
-
const R = (C.getFieldValue("checklists") || []).map((X) => X.id === p ? {
|
|
1512
|
-
...X,
|
|
1513
|
-
items: [...X.items, { id: x(), text: g, isChecked: !1 }]
|
|
1514
|
-
} : X);
|
|
1515
|
-
C.setFieldValue("checklists", R), w((X) => ({ ...X, [p]: "" }));
|
|
1516
|
-
}, s = (p, g) => {
|
|
1517
|
-
const R = (C.getFieldValue("checklists") || []).map((X) => X.id === p ? {
|
|
1518
|
-
...X,
|
|
1519
|
-
items: X.items.map(
|
|
1520
|
-
(de) => de.id === g ? { ...de, isChecked: !de.isChecked } : de
|
|
1521
|
-
)
|
|
1522
|
-
} : X);
|
|
1523
|
-
C.setFieldValue("checklists", R);
|
|
1524
|
-
}, [l, m] = q(""), [v, D] = q(null), [_, E] = q(""), [T, S] = q(null), V = () => {
|
|
1525
|
-
if (!l.trim()) return;
|
|
1526
|
-
const p = {
|
|
1527
|
-
id: x(),
|
|
1528
|
-
text: l,
|
|
1529
|
-
authorId: f.id,
|
|
1530
|
-
authorName: f.name,
|
|
1531
|
-
createdAt: /* @__PURE__ */ new Date()
|
|
1532
|
-
};
|
|
1533
|
-
C.pushFieldValue("comments", p), m("");
|
|
1534
|
-
const g = {
|
|
1535
|
-
id: x(),
|
|
1536
|
-
type: "comment",
|
|
1537
|
-
text: `commented "${l.slice(0, 20)}${l.length > 20 ? "..." : ""}"`,
|
|
1538
|
-
userId: f.id,
|
|
1539
|
-
userName: f.name,
|
|
1540
|
-
createdAt: /* @__PURE__ */ new Date()
|
|
1541
|
-
};
|
|
1542
|
-
C.pushFieldValue("activity", g);
|
|
1543
|
-
}, U = (p) => {
|
|
1544
|
-
D(p.id), E(p.text);
|
|
1545
|
-
}, W = () => {
|
|
1546
|
-
if (v && _.trim()) {
|
|
1547
|
-
const g = (C.getFieldValue("comments") || []).map((F) => F.id === v ? { ...F, text: _ } : F);
|
|
1548
|
-
C.setFieldValue("comments", g), D(null), E("");
|
|
1549
|
-
}
|
|
1550
|
-
}, Z = () => {
|
|
1551
|
-
D(null), E("");
|
|
1552
|
-
}, z = (p) => {
|
|
1553
|
-
S(p);
|
|
1554
|
-
}, H = () => {
|
|
1555
|
-
S(null);
|
|
1556
|
-
}, b = (p) => {
|
|
1557
|
-
const g = C.getFieldValue("comments") || [];
|
|
1558
|
-
C.setFieldValue("comments", g.filter((R) => R.id !== p)), S(null);
|
|
1559
|
-
const F = {
|
|
1560
|
-
id: x(),
|
|
1561
|
-
type: "delete",
|
|
1562
|
-
// Using generic delete type
|
|
1563
|
-
text: "deleted a comment",
|
|
1564
|
-
userId: f.id,
|
|
1565
|
-
userName: f.name,
|
|
1566
|
-
createdAt: /* @__PURE__ */ new Date()
|
|
1567
|
-
};
|
|
1568
|
-
C.pushFieldValue("activity", F);
|
|
1569
|
-
}, [A, P] = q(""), J = () => {
|
|
1570
|
-
if (!A.trim()) return;
|
|
1571
|
-
const p = {
|
|
1572
|
-
id: x(),
|
|
1573
|
-
title: A,
|
|
1574
|
-
isCompleted: !1
|
|
1575
|
-
};
|
|
1576
|
-
C.pushFieldValue("subtasks", p), P("");
|
|
1577
|
-
}, te = (p) => {
|
|
1578
|
-
const F = (C.getFieldValue("subtasks") || []).map(
|
|
1579
|
-
(R) => R.id === p ? { ...R, isCompleted: !R.isCompleted } : R
|
|
1580
|
-
);
|
|
1581
|
-
C.setFieldValue("subtasks", F);
|
|
1582
|
-
}, Q = (p) => {
|
|
1583
|
-
const g = C.getFieldValue("subtasks") || [];
|
|
1584
|
-
C.setFieldValue("subtasks", g.filter((F) => F.id !== p));
|
|
1585
|
-
}, O = we.useRef(null), [G, ie] = q(!1), [Y, ae] = q(null), Se = async (p) => {
|
|
1586
|
-
const g = p.target.files?.[0];
|
|
1587
|
-
if (!g) return;
|
|
1588
|
-
ie(!0), ae(null), await new Promise((X) => setTimeout(X, 1500));
|
|
1589
|
-
const F = {
|
|
1590
|
-
id: x(),
|
|
1591
|
-
name: g.name,
|
|
1592
|
-
url: URL.createObjectURL(g),
|
|
1593
|
-
type: g.type.startsWith("image/") ? "image" : "file",
|
|
1594
|
-
size: g.size,
|
|
1595
|
-
uploadedAt: /* @__PURE__ */ new Date()
|
|
1596
|
-
};
|
|
1597
|
-
C.pushFieldValue("attachments", F), ie(!1), O.current && (O.current.value = "");
|
|
1598
|
-
const R = {
|
|
1599
|
-
id: x(),
|
|
1600
|
-
type: "attachment",
|
|
1601
|
-
text: `attached ${g.name}`,
|
|
1602
|
-
userId: f.id,
|
|
1603
|
-
userName: f.name,
|
|
1604
|
-
createdAt: /* @__PURE__ */ new Date()
|
|
1605
|
-
};
|
|
1606
|
-
C.pushFieldValue("activity", R);
|
|
1607
|
-
}, ke = (p) => {
|
|
1608
|
-
const g = C.getFieldValue("attachments") || [];
|
|
1609
|
-
C.setFieldValue("attachments", g.filter((R) => R.id !== p));
|
|
1610
|
-
const F = {
|
|
1611
|
-
id: x(),
|
|
1612
|
-
type: "delete",
|
|
1613
|
-
text: "removed an attachment",
|
|
1614
|
-
userId: f.id,
|
|
1615
|
-
userName: f.name,
|
|
1616
|
-
createdAt: /* @__PURE__ */ new Date()
|
|
1617
|
-
};
|
|
1618
|
-
C.pushFieldValue("activity", F);
|
|
1619
|
-
}, se = !!o?.id, me = (p) => {
|
|
1620
|
-
p.preventDefault(), p.stopPropagation(), C.handleSubmit();
|
|
1621
|
-
}, ue = /* @__PURE__ */ d("div", { className: "space-y-6", children: [
|
|
1622
|
-
/* @__PURE__ */ e("div", { className: "flex items-start justify-between gap-4", children: /* @__PURE__ */ d("div", { className: "flex-1 space-y-4", children: [
|
|
1623
|
-
/* @__PURE__ */ e(
|
|
1624
|
-
C.Field,
|
|
1625
|
-
{
|
|
1626
|
-
name: "title",
|
|
1627
|
-
children: (p) => /* @__PURE__ */ d("div", { className: "space-y-2", children: [
|
|
1628
|
-
/* @__PURE__ */ e(oe, { htmlFor: "title", className: "text-right", children: k("common.title") }),
|
|
1629
|
-
/* @__PURE__ */ e(
|
|
1630
|
-
pe,
|
|
1631
|
-
{
|
|
1632
|
-
id: "title",
|
|
1633
|
-
value: p.state.value,
|
|
1634
|
-
onChange: (g) => p.handleChange(g.target.value),
|
|
1635
|
-
placeholder: k("kanban.cardTitlePlaceholder"),
|
|
1636
|
-
className: "text-lg font-semibold"
|
|
1637
|
-
}
|
|
1638
|
-
)
|
|
1639
|
-
] })
|
|
1640
|
-
}
|
|
1641
|
-
),
|
|
1642
|
-
/* @__PURE__ */ d("div", { className: "flex gap-4 items-center", children: [
|
|
1643
|
-
/* @__PURE__ */ e("div", { className: "w-[200px]", children: /* @__PURE__ */ e(
|
|
1644
|
-
C.Field,
|
|
1645
|
-
{
|
|
1646
|
-
name: "columnId",
|
|
1647
|
-
children: (p) => /* @__PURE__ */ d(De, { value: p.state.value, onValueChange: (g) => p.handleChange(g), children: [
|
|
1648
|
-
/* @__PURE__ */ e(Ie, { children: /* @__PURE__ */ e(Ae, { placeholder: "Status" }) }),
|
|
1649
|
-
/* @__PURE__ */ e(Fe, { children: u.map((g) => /* @__PURE__ */ e(re, { value: g.id, children: g.name }, g.id)) })
|
|
1650
|
-
] })
|
|
1651
|
-
}
|
|
1652
|
-
) }),
|
|
1653
|
-
se && /* @__PURE__ */ d("span", { className: "text-sm text-muted-foreground font-mono", children: [
|
|
1654
|
-
"#",
|
|
1655
|
-
o?.id?.slice(0, 8)
|
|
1656
|
-
] })
|
|
1657
|
-
] })
|
|
1658
|
-
] }) }),
|
|
1659
|
-
/* @__PURE__ */ d("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-4", children: [
|
|
1660
|
-
/* @__PURE__ */ e(
|
|
1661
|
-
C.Field,
|
|
1662
|
-
{
|
|
1663
|
-
name: "priority",
|
|
1664
|
-
children: (p) => /* @__PURE__ */ d("div", { className: "space-y-2", children: [
|
|
1665
|
-
/* @__PURE__ */ e(oe, { children: "Priority" }),
|
|
1666
|
-
/* @__PURE__ */ d(De, { value: p.state.value, onValueChange: (g) => p.handleChange(g), children: [
|
|
1667
|
-
/* @__PURE__ */ e(Ie, { children: /* @__PURE__ */ e(Ae, { placeholder: "Priority" }) }),
|
|
1668
|
-
/* @__PURE__ */ d(Fe, { children: [
|
|
1669
|
-
/* @__PURE__ */ e(re, { value: "low", children: "Low" }),
|
|
1670
|
-
/* @__PURE__ */ e(re, { value: "medium", children: "Medium" }),
|
|
1671
|
-
/* @__PURE__ */ e(re, { value: "high", children: "High" }),
|
|
1672
|
-
/* @__PURE__ */ e(re, { value: "critical", children: "Critical" })
|
|
1673
|
-
] })
|
|
1674
|
-
] })
|
|
1675
|
-
] })
|
|
1676
|
-
}
|
|
1677
|
-
),
|
|
1678
|
-
/* @__PURE__ */ e(
|
|
1679
|
-
C.Field,
|
|
1680
|
-
{
|
|
1681
|
-
name: "startDate",
|
|
1682
|
-
children: (p) => /* @__PURE__ */ d("div", { className: "space-y-2", children: [
|
|
1683
|
-
/* @__PURE__ */ e(oe, { children: "Start Date" }),
|
|
1684
|
-
/* @__PURE__ */ e(
|
|
1685
|
-
_e,
|
|
1686
|
-
{
|
|
1687
|
-
date: p.state.value,
|
|
1688
|
-
setDate: (g) => p.handleChange(g),
|
|
1689
|
-
mode: "date"
|
|
1690
|
-
}
|
|
1691
|
-
)
|
|
1692
|
-
] })
|
|
1693
|
-
}
|
|
1694
|
-
),
|
|
1695
|
-
/* @__PURE__ */ e(
|
|
1696
|
-
C.Field,
|
|
1697
|
-
{
|
|
1698
|
-
name: "dueDate",
|
|
1699
|
-
children: (p) => /* @__PURE__ */ d("div", { className: "space-y-2", children: [
|
|
1700
|
-
/* @__PURE__ */ e(oe, { children: "Due Date" }),
|
|
1701
|
-
/* @__PURE__ */ e(
|
|
1702
|
-
_e,
|
|
1703
|
-
{
|
|
1704
|
-
date: p.state.value,
|
|
1705
|
-
setDate: (g) => p.handleChange(g),
|
|
1706
|
-
mode: "date"
|
|
1707
|
-
}
|
|
1708
|
-
)
|
|
1709
|
-
] })
|
|
1710
|
-
}
|
|
1711
|
-
)
|
|
1712
|
-
] }),
|
|
1713
|
-
/* @__PURE__ */ e(
|
|
1714
|
-
C.Field,
|
|
1715
|
-
{
|
|
1716
|
-
name: "description",
|
|
1717
|
-
children: (p) => /* @__PURE__ */ d("div", { className: "space-y-2", children: [
|
|
1718
|
-
/* @__PURE__ */ e(oe, { children: "Description" }),
|
|
1719
|
-
/* @__PURE__ */ e(
|
|
1720
|
-
Te,
|
|
1721
|
-
{
|
|
1722
|
-
value: p.state.value || "",
|
|
1723
|
-
onChange: (g) => p.handleChange(g.target.value),
|
|
1724
|
-
className: "min-h-[150px]"
|
|
1725
|
-
}
|
|
1726
|
-
)
|
|
1727
|
-
] })
|
|
1728
|
-
}
|
|
1729
|
-
),
|
|
1730
|
-
h.length > 0 && /* @__PURE__ */ e("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4 border-t pt-4", children: h.map((p) => /* @__PURE__ */ e(
|
|
1731
|
-
C.Field,
|
|
1732
|
-
{
|
|
1733
|
-
name: `customFieldValues.${p.id}`,
|
|
1734
|
-
children: (g) => /* @__PURE__ */ d("div", { className: "space-y-2", children: [
|
|
1735
|
-
/* @__PURE__ */ e(oe, { children: p.name }),
|
|
1736
|
-
p.type === "text" && /* @__PURE__ */ e(
|
|
1737
|
-
pe,
|
|
1738
|
-
{
|
|
1739
|
-
value: g.state.value || "",
|
|
1740
|
-
onChange: (F) => g.handleChange(F.target.value)
|
|
1741
|
-
}
|
|
1742
|
-
),
|
|
1743
|
-
p.type === "number" && /* @__PURE__ */ e(
|
|
1744
|
-
pe,
|
|
1745
|
-
{
|
|
1746
|
-
type: "number",
|
|
1747
|
-
value: g.state.value || "",
|
|
1748
|
-
onChange: (F) => g.handleChange(Number(F.target.value))
|
|
1749
|
-
}
|
|
1750
|
-
),
|
|
1751
|
-
p.type === "date" && /* @__PURE__ */ e(
|
|
1752
|
-
_e,
|
|
1753
|
-
{
|
|
1754
|
-
date: g.state.value,
|
|
1755
|
-
setDate: (F) => g.handleChange(F),
|
|
1756
|
-
mode: "date"
|
|
1757
|
-
}
|
|
1758
|
-
),
|
|
1759
|
-
p.type === "select" && /* @__PURE__ */ d(De, { value: g.state.value || "", onValueChange: (F) => g.handleChange(F), children: [
|
|
1760
|
-
/* @__PURE__ */ e(Ie, { children: /* @__PURE__ */ e(Ae, { placeholder: "Select..." }) }),
|
|
1761
|
-
/* @__PURE__ */ e(Fe, { children: p.options?.map((F) => /* @__PURE__ */ e(re, { value: F, children: F }, F)) })
|
|
1762
|
-
] }),
|
|
1763
|
-
p.type === "checkbox" && /* @__PURE__ */ d("div", { className: "flex items-center space-x-2", children: [
|
|
1764
|
-
/* @__PURE__ */ e(
|
|
1765
|
-
Ce,
|
|
1766
|
-
{
|
|
1767
|
-
checked: !!g.state.value,
|
|
1768
|
-
onCheckedChange: (F) => g.handleChange(!!F)
|
|
1769
|
-
}
|
|
1770
|
-
),
|
|
1771
|
-
/* @__PURE__ */ e("span", { className: "text-sm font-medium", children: p.name })
|
|
1772
|
-
] })
|
|
1773
|
-
] })
|
|
1774
|
-
},
|
|
1775
|
-
p.id
|
|
1776
|
-
)) }),
|
|
1777
|
-
/* @__PURE__ */ d(lt, { defaultValue: "subtasks", className: "w-full", children: [
|
|
1778
|
-
/* @__PURE__ */ d(dt, { className: "grid w-full grid-cols-5", children: [
|
|
1779
|
-
/* @__PURE__ */ e(fe, { value: "subtasks", children: "Subtasks" }),
|
|
1780
|
-
/* @__PURE__ */ e(fe, { value: "checklists", children: "Checklists" }),
|
|
1781
|
-
/* @__PURE__ */ e(fe, { value: "attachments", children: "Attachments" }),
|
|
1782
|
-
/* @__PURE__ */ e(fe, { value: "comments", children: "Comments" }),
|
|
1783
|
-
/* @__PURE__ */ e(fe, { value: "activity", children: "Activity" })
|
|
1784
|
-
] }),
|
|
1785
|
-
/* @__PURE__ */ d(ve, { value: "subtasks", className: "space-y-4 pt-4", children: [
|
|
1786
|
-
/* @__PURE__ */ e(
|
|
1787
|
-
C.Field,
|
|
1788
|
-
{
|
|
1789
|
-
name: "subtasks",
|
|
1790
|
-
children: (p) => /* @__PURE__ */ d("div", { className: "space-y-2", children: [
|
|
1791
|
-
p.state.value?.map((g) => /* @__PURE__ */ d("div", { className: "flex items-center gap-2 border p-3 rounded-md", children: [
|
|
1792
|
-
/* @__PURE__ */ e(
|
|
1793
|
-
Ce,
|
|
1794
|
-
{
|
|
1795
|
-
checked: g.isCompleted,
|
|
1796
|
-
onCheckedChange: () => te(g.id)
|
|
1797
|
-
}
|
|
1798
|
-
),
|
|
1799
|
-
/* @__PURE__ */ e("span", { className: g.isCompleted ? "line-through text-muted-foreground flex-1" : "flex-1", children: g.title }),
|
|
1800
|
-
/* @__PURE__ */ e($, { variant: "ghost", size: "icon", onClick: () => Q(g.id), children: /* @__PURE__ */ e(Qe, { className: "w-4 h-4" }) })
|
|
1801
|
-
] }, g.id)),
|
|
1802
|
-
(!p.state.value || p.state.value.length === 0) && /* @__PURE__ */ e("div", { className: "text-center py-8 text-muted-foreground border border-dashed rounded-lg", children: "No subtasks yet." })
|
|
1803
|
-
] })
|
|
1804
|
-
}
|
|
1805
|
-
),
|
|
1806
|
-
/* @__PURE__ */ d("div", { className: "flex gap-2", children: [
|
|
1807
|
-
/* @__PURE__ */ e(
|
|
1808
|
-
pe,
|
|
1809
|
-
{
|
|
1810
|
-
value: A,
|
|
1811
|
-
onChange: (p) => P(p.target.value),
|
|
1812
|
-
placeholder: "Add a subtask...",
|
|
1813
|
-
onKeyDown: (p) => p.key === "Enter" && J()
|
|
1814
|
-
}
|
|
1815
|
-
),
|
|
1816
|
-
/* @__PURE__ */ e($, { onClick: J, disabled: !A.trim(), children: "Add" })
|
|
1817
|
-
] })
|
|
1818
|
-
] }),
|
|
1819
|
-
/* @__PURE__ */ d(ve, { value: "checklists", className: "space-y-4 pt-4", children: [
|
|
1820
|
-
/* @__PURE__ */ d("div", { className: "flex justify-between items-center", children: [
|
|
1821
|
-
/* @__PURE__ */ e("h3", { className: "font-medium", children: "Checklists" }),
|
|
1822
|
-
/* @__PURE__ */ d($, { size: "sm", onClick: N, variant: "outline", children: [
|
|
1823
|
-
/* @__PURE__ */ e(Ne, { className: "w-4 h-4 mr-2" }),
|
|
1824
|
-
" Add Checklist"
|
|
1825
|
-
] })
|
|
1826
|
-
] }),
|
|
1827
|
-
/* @__PURE__ */ e(
|
|
1828
|
-
C.Field,
|
|
1829
|
-
{
|
|
1830
|
-
name: "checklists",
|
|
1831
|
-
children: (p) => /* @__PURE__ */ d("div", { className: "space-y-4", children: [
|
|
1832
|
-
p.state.value?.map((g) => {
|
|
1833
|
-
const F = g.items.length > 0 ? Math.round(g.items.filter((R) => R.isChecked).length / g.items.length * 100) : 0;
|
|
1834
|
-
return /* @__PURE__ */ d("div", { className: "border rounded-md p-4 space-y-3", children: [
|
|
1835
|
-
/* @__PURE__ */ d("div", { className: "flex justify-between items-center", children: [
|
|
1836
|
-
/* @__PURE__ */ e("div", { className: "font-medium", children: g.title }),
|
|
1837
|
-
/* @__PURE__ */ d("div", { className: "text-xs text-muted-foreground", children: [
|
|
1838
|
-
F,
|
|
1839
|
-
"%"
|
|
1840
|
-
] })
|
|
1841
|
-
] }),
|
|
1842
|
-
/* @__PURE__ */ e("div", { className: "h-2 w-full bg-muted rounded-full overflow-hidden", children: /* @__PURE__ */ e("div", { className: "h-full bg-primary transition-all", style: { width: `${F}%` } }) }),
|
|
1843
|
-
/* @__PURE__ */ e("div", { className: "space-y-2", children: g.items.map((R) => /* @__PURE__ */ d("div", { className: "flex items-center gap-2", children: [
|
|
1844
|
-
/* @__PURE__ */ e(
|
|
1845
|
-
Ce,
|
|
1846
|
-
{
|
|
1847
|
-
checked: R.isChecked,
|
|
1848
|
-
onCheckedChange: () => s(g.id, R.id)
|
|
1849
|
-
}
|
|
1850
|
-
),
|
|
1851
|
-
/* @__PURE__ */ e("span", { className: R.isChecked ? "line-through text-muted-foreground" : "", children: R.text })
|
|
1852
|
-
] }, R.id)) }),
|
|
1853
|
-
/* @__PURE__ */ d("div", { className: "pt-2 flex gap-2", children: [
|
|
1854
|
-
/* @__PURE__ */ e(
|
|
1855
|
-
pe,
|
|
1856
|
-
{
|
|
1857
|
-
placeholder: "Add an item...",
|
|
1858
|
-
className: "h-8 text-sm",
|
|
1859
|
-
value: c[g.id] || "",
|
|
1860
|
-
onChange: (R) => I(g.id, R.target.value),
|
|
1861
|
-
onKeyDown: (R) => R.key === "Enter" && r(g.id)
|
|
1862
|
-
}
|
|
1863
|
-
),
|
|
1864
|
-
/* @__PURE__ */ e($, { size: "sm", onClick: () => r(g.id), disabled: !c[g.id]?.trim(), children: "Add" })
|
|
1865
|
-
] })
|
|
1866
|
-
] }, g.id);
|
|
1867
|
-
}),
|
|
1868
|
-
(!p.state.value || p.state.value.length === 0) && /* @__PURE__ */ e("div", { className: "text-center py-8 text-muted-foreground border border-dashed rounded-lg", children: "No checklists yet." })
|
|
1869
|
-
] })
|
|
1870
|
-
}
|
|
1871
|
-
)
|
|
1872
|
-
] }),
|
|
1873
|
-
/* @__PURE__ */ d(ve, { value: "attachments", className: "space-y-4 pt-4", children: [
|
|
1874
|
-
/* @__PURE__ */ d("div", { className: "flex justify-between items-center", children: [
|
|
1875
|
-
/* @__PURE__ */ e("h3", { className: "font-medium", children: "Attachments" }),
|
|
1876
|
-
/* @__PURE__ */ e(
|
|
1877
|
-
"input",
|
|
1878
|
-
{
|
|
1879
|
-
type: "file",
|
|
1880
|
-
className: "hidden",
|
|
1881
|
-
ref: O,
|
|
1882
|
-
onChange: Se
|
|
1883
|
-
}
|
|
1884
|
-
),
|
|
1885
|
-
/* @__PURE__ */ d("div", { className: "flex items-center gap-2", children: [
|
|
1886
|
-
Y && /* @__PURE__ */ e("span", { className: "text-xs text-red-500", children: Y }),
|
|
1887
|
-
/* @__PURE__ */ d($, { size: "sm", variant: "outline", onClick: () => O.current?.click(), disabled: G, children: [
|
|
1888
|
-
G ? /* @__PURE__ */ e(wt, { className: "w-4 h-4 mr-2 animate-spin" }) : /* @__PURE__ */ e(at, { className: "w-4 h-4 mr-2" }),
|
|
1889
|
-
G ? "Uploading..." : "Upload"
|
|
1890
|
-
] })
|
|
1891
|
-
] })
|
|
1892
|
-
] }),
|
|
1893
|
-
/* @__PURE__ */ e(
|
|
1894
|
-
C.Field,
|
|
1895
|
-
{
|
|
1896
|
-
name: "attachments",
|
|
1897
|
-
children: (p) => /* @__PURE__ */ d("div", { className: "grid grid-cols-2 gap-2", children: [
|
|
1898
|
-
p.state.value?.map((g) => /* @__PURE__ */ d("div", { className: "border p-2 rounded flex items-center gap-2", children: [
|
|
1899
|
-
/* @__PURE__ */ e("div", { className: "w-10 h-10 bg-muted flex items-center justify-center rounded", children: /* @__PURE__ */ e(na, { className: "w-5 h-5 text-muted-foreground" }) }),
|
|
1900
|
-
/* @__PURE__ */ d("div", { className: "overflow-hidden", children: [
|
|
1901
|
-
/* @__PURE__ */ e("div", { className: "truncate font-medium text-sm", children: g.name }),
|
|
1902
|
-
/* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground", children: g.type })
|
|
1903
|
-
] }),
|
|
1904
|
-
/* @__PURE__ */ e($, { variant: "ghost", size: "icon", className: "ml-auto", onClick: () => ke(g.id), children: /* @__PURE__ */ e(Qe, { className: "w-4 h-4 text-muted-foreground" }) })
|
|
1905
|
-
] }, g.id)),
|
|
1906
|
-
(!p.state.value || p.state.value.length === 0) && !G && /* @__PURE__ */ e("div", { className: "text-center py-8 text-muted-foreground border border-dashed rounded-lg", children: "No attachments yet." })
|
|
1907
|
-
] })
|
|
1908
|
-
}
|
|
1909
|
-
)
|
|
1910
|
-
] }),
|
|
1911
|
-
/* @__PURE__ */ d(ve, { value: "comments", className: "space-y-4 pt-4", children: [
|
|
1912
|
-
/* @__PURE__ */ e(
|
|
1913
|
-
C.Field,
|
|
1914
|
-
{
|
|
1915
|
-
name: "comments",
|
|
1916
|
-
children: (p) => /* @__PURE__ */ d("div", { className: "space-y-4", children: [
|
|
1917
|
-
p.state.value?.map((g) => /* @__PURE__ */ d("div", { className: "flex gap-3", children: [
|
|
1918
|
-
/* @__PURE__ */ e(ze, { className: "w-8 h-8", children: /* @__PURE__ */ e($e, { children: g.authorName[0] }) }),
|
|
1919
|
-
/* @__PURE__ */ d("div", { className: "space-y-1 w-full", children: [
|
|
1920
|
-
/* @__PURE__ */ d("div", { className: "flex items-center gap-2", children: [
|
|
1921
|
-
/* @__PURE__ */ e("span", { className: "font-semibold text-sm", children: g.authorName }),
|
|
1922
|
-
/* @__PURE__ */ e("span", { className: "text-xs text-muted-foreground", children: new Date(g.createdAt).toLocaleString() })
|
|
1923
|
-
] }),
|
|
1924
|
-
v === g.id ? /* @__PURE__ */ d("div", { className: "flex flex-col gap-2", children: [
|
|
1925
|
-
/* @__PURE__ */ e(
|
|
1926
|
-
Te,
|
|
1927
|
-
{
|
|
1928
|
-
value: _,
|
|
1929
|
-
onChange: (F) => E(F.target.value),
|
|
1930
|
-
onKeyDown: (F) => {
|
|
1931
|
-
F.key === "Enter" && (F.metaKey || F.ctrlKey) ? W() : F.key === "Escape" && Z();
|
|
1932
|
-
},
|
|
1933
|
-
autoFocus: !0
|
|
1934
|
-
}
|
|
1935
|
-
),
|
|
1936
|
-
/* @__PURE__ */ d("div", { className: "flex gap-2 justify-end", children: [
|
|
1937
|
-
/* @__PURE__ */ e($, { size: "sm", variant: "ghost", onClick: Z, children: "Cancel" }),
|
|
1938
|
-
/* @__PURE__ */ e($, { size: "sm", onClick: W, children: "Save" })
|
|
1939
|
-
] })
|
|
1940
|
-
] }) : /* @__PURE__ */ e("div", { className: "text-sm bg-muted/50 p-2 rounded-md", children: g.text }),
|
|
1941
|
-
T === g.id && /* @__PURE__ */ d("div", { className: "flex items-center gap-2 p-2 bg-red-50 text-red-800 rounded-md text-sm mt-2", children: [
|
|
1942
|
-
/* @__PURE__ */ e(et, { className: "w-4 h-4" }),
|
|
1943
|
-
/* @__PURE__ */ e("span", { className: "flex-1", children: "Delete this comment?" }),
|
|
1944
|
-
/* @__PURE__ */ e($, { size: "sm", variant: "ghost", className: "h-6 px-2 hover:bg-red-100 text-red-800", onClick: H, children: "No" }),
|
|
1945
|
-
/* @__PURE__ */ e($, { size: "sm", variant: "destructive", className: "h-6 px-2", onClick: () => b(g.id), children: "Yes" })
|
|
1946
|
-
] })
|
|
1947
|
-
] }),
|
|
1948
|
-
/* @__PURE__ */ d("div", { className: "flex flex-col gap-1", children: [
|
|
1949
|
-
/* @__PURE__ */ e($, { variant: "ghost", size: "icon", className: "h-6 w-6", onClick: () => U(g), disabled: !!T, children: /* @__PURE__ */ e(ca, { className: "w-3 h-3 text-muted-foreground" }) }),
|
|
1950
|
-
/* @__PURE__ */ e($, { variant: "ghost", size: "icon", className: "h-6 w-6", onClick: () => z(g.id), disabled: !!T, children: /* @__PURE__ */ e(nt, { className: "w-3 h-3 text-muted-foreground" }) })
|
|
1951
|
-
] })
|
|
1952
|
-
] }, g.id)),
|
|
1953
|
-
(!p.state.value || p.state.value.length === 0) && /* @__PURE__ */ e("div", { className: "text-center py-8 text-muted-foreground", children: "No comments yet." })
|
|
1954
|
-
] })
|
|
1955
|
-
}
|
|
1956
|
-
),
|
|
1957
|
-
/* @__PURE__ */ e("div", { className: "pt-4 border-t sticky bottom-0 bg-background", children: /* @__PURE__ */ d("div", { className: "flex gap-2", children: [
|
|
1958
|
-
/* @__PURE__ */ e(ze, { className: "w-8 h-8", children: /* @__PURE__ */ e($e, { children: f?.name?.[0] || "U" }) }),
|
|
1959
|
-
/* @__PURE__ */ d("div", { className: "flex-1 space-y-2", children: [
|
|
1960
|
-
/* @__PURE__ */ e(
|
|
1961
|
-
Te,
|
|
1962
|
-
{
|
|
1963
|
-
value: l,
|
|
1964
|
-
onChange: (p) => m(p.target.value),
|
|
1965
|
-
placeholder: "Write a comment...",
|
|
1966
|
-
rows: 2
|
|
1967
|
-
}
|
|
1968
|
-
),
|
|
1969
|
-
/* @__PURE__ */ e("div", { className: "flex justify-end", children: /* @__PURE__ */ e($, { size: "sm", onClick: V, disabled: !l.trim(), children: "Send" }) })
|
|
1970
|
-
] })
|
|
1971
|
-
] }) })
|
|
1972
|
-
] }),
|
|
1973
|
-
/* @__PURE__ */ e(ve, { value: "activity", className: "space-y-4 pt-4", children: /* @__PURE__ */ e(
|
|
1974
|
-
C.Field,
|
|
1975
|
-
{
|
|
1976
|
-
name: "activity",
|
|
1977
|
-
children: (p) => /* @__PURE__ */ d("div", { className: "space-y-4", children: [
|
|
1978
|
-
p.state.value?.map((g) => /* @__PURE__ */ d("div", { className: "flex gap-3 text-sm", children: [
|
|
1979
|
-
/* @__PURE__ */ e("div", { className: "mt-1", children: /* @__PURE__ */ e(ta, { className: "w-4 h-4 text-muted-foreground" }) }),
|
|
1980
|
-
/* @__PURE__ */ d("div", { children: [
|
|
1981
|
-
/* @__PURE__ */ e("span", { className: "font-semibold", children: g.userName }),
|
|
1982
|
-
" ",
|
|
1983
|
-
/* @__PURE__ */ e("span", { className: "text-muted-foreground", children: g.text }),
|
|
1984
|
-
/* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground mt-1", children: new Date(g.createdAt).toLocaleString() })
|
|
1985
|
-
] })
|
|
1986
|
-
] }, g.id)),
|
|
1987
|
-
(!p.state.value || p.state.value.length === 0) && /* @__PURE__ */ e("div", { className: "text-center py-8 text-muted-foreground", children: "No activity yet." })
|
|
1988
|
-
] })
|
|
1989
|
-
}
|
|
1990
|
-
) })
|
|
1991
|
-
] })
|
|
1992
|
-
] });
|
|
1993
|
-
return /* @__PURE__ */ d(
|
|
1994
|
-
tt,
|
|
1995
|
-
{
|
|
1996
|
-
isOpen: t,
|
|
1997
|
-
onClose: a,
|
|
1998
|
-
title: se ? "Edit Card" : "New Card",
|
|
1999
|
-
className: "sm:max-w-[800px] h-[85vh] flex flex-col",
|
|
2000
|
-
children: [
|
|
2001
|
-
/* @__PURE__ */ e("div", { className: "flex-1 overflow-y-auto pr-2", children: ue }),
|
|
2002
|
-
/* @__PURE__ */ d("div", { className: "flex justify-between pt-4 border-t mt-4", children: [
|
|
2003
|
-
se && /* @__PURE__ */ e($, { variant: "destructive", onClick: B, children: "Delete Card" }),
|
|
2004
|
-
/* @__PURE__ */ d("div", { className: "flex gap-2 ml-auto", children: [
|
|
2005
|
-
/* @__PURE__ */ e($, { variant: "outline", onClick: a, children: "Cancel" }),
|
|
2006
|
-
/* @__PURE__ */ e($, { onClick: (p) => me(p), children: "Save" })
|
|
2007
|
-
] })
|
|
2008
|
-
] })
|
|
2009
|
-
]
|
|
2010
|
-
}
|
|
2011
|
-
);
|
|
2012
|
-
}, Pe = ee.forwardRef(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
2013
|
-
"div",
|
|
2014
|
-
{
|
|
2015
|
-
ref: n,
|
|
2016
|
-
className: j(
|
|
2017
|
-
"rounded-xl border bg-card text-card-foreground shadow",
|
|
2018
|
-
t
|
|
2019
|
-
),
|
|
2020
|
-
...a
|
|
2021
|
-
}
|
|
2022
|
-
));
|
|
2023
|
-
Pe.displayName = "Card";
|
|
2024
|
-
const ct = ee.forwardRef(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
2025
|
-
"div",
|
|
2026
|
-
{
|
|
2027
|
-
ref: n,
|
|
2028
|
-
className: j("flex flex-col space-y-1.5 p-6", t),
|
|
2029
|
-
...a
|
|
2030
|
-
}
|
|
2031
|
-
));
|
|
2032
|
-
ct.displayName = "CardHeader";
|
|
2033
|
-
const Ea = ee.forwardRef(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
2034
|
-
"div",
|
|
2035
|
-
{
|
|
2036
|
-
ref: n,
|
|
2037
|
-
className: j("font-semibold leading-none tracking-tight", t),
|
|
2038
|
-
...a
|
|
2039
|
-
}
|
|
2040
|
-
));
|
|
2041
|
-
Ea.displayName = "CardTitle";
|
|
2042
|
-
const _a = ee.forwardRef(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
2043
|
-
"div",
|
|
2044
|
-
{
|
|
2045
|
-
ref: n,
|
|
2046
|
-
className: j("text-sm text-muted-foreground", t),
|
|
2047
|
-
...a
|
|
2048
|
-
}
|
|
2049
|
-
));
|
|
2050
|
-
_a.displayName = "CardDescription";
|
|
2051
|
-
const Ke = ee.forwardRef(({ className: t, ...a }, n) => /* @__PURE__ */ e("div", { ref: n, className: j("p-6 pt-0", t), ...a }));
|
|
2052
|
-
Ke.displayName = "CardContent";
|
|
2053
|
-
const Va = ee.forwardRef(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
2054
|
-
"div",
|
|
2055
|
-
{
|
|
2056
|
-
ref: n,
|
|
2057
|
-
className: j("flex items-center p-6 pt-0", t),
|
|
2058
|
-
...a
|
|
2059
|
-
}
|
|
2060
|
-
));
|
|
2061
|
-
Va.displayName = "CardFooter";
|
|
2062
|
-
const Je = {
|
|
2063
|
-
Active: "success",
|
|
2064
|
-
Verified: "success",
|
|
2065
|
-
Completed: "info",
|
|
2066
|
-
"In Progress": "info",
|
|
2067
|
-
Pending: "warning",
|
|
2068
|
-
Inactive: "error",
|
|
2069
|
-
Unverified: "error",
|
|
2070
|
-
"On Leave": "error",
|
|
2071
|
-
Archived: "neutral",
|
|
2072
|
-
Default: "neutral"
|
|
2073
|
-
}, mt = Ge(({
|
|
2074
|
-
status: t,
|
|
2075
|
-
className: a,
|
|
2076
|
-
showDot: n = !0,
|
|
2077
|
-
variant: i = "solid"
|
|
2078
|
-
}) => {
|
|
2079
|
-
const o = Je[t] || Je.Default, u = i === "outline" || t === "Archived";
|
|
2080
|
-
return /* @__PURE__ */ d(
|
|
2081
|
-
"div",
|
|
2082
|
-
{
|
|
2083
|
-
className: j(
|
|
2084
|
-
"inline-flex items-center justify-center gap-1.5 px-3 py-1 rounded-full text-[11px] font-bold border tracking-wide transition-all duration-300 shadow-sm whitespace-nowrap",
|
|
2085
|
-
a
|
|
2086
|
-
),
|
|
2087
|
-
style: {
|
|
2088
|
-
backgroundColor: u ? "transparent" : `var(--ez-status-${o}-bg)`,
|
|
2089
|
-
color: u ? o === "neutral" ? `var(--ez-status-${o}-text)` : `var(--ez-status-${o}-bg)` : `var(--ez-status-${o}-text)`,
|
|
2090
|
-
borderColor: `var(--ez-status-${o}-border)`,
|
|
2091
|
-
minWidth: "120px"
|
|
2092
|
-
},
|
|
2093
|
-
children: [
|
|
2094
|
-
n && /* @__PURE__ */ e(
|
|
2095
|
-
"span",
|
|
2096
|
-
{
|
|
2097
|
-
className: "w-1.5 h-1.5 rounded-full shadow-[0_0_8px_rgba(0,0,0,0.1)] flex-shrink-0",
|
|
2098
|
-
style: { backgroundColor: `var(--ez-status-${o}-dot)` }
|
|
2099
|
-
}
|
|
2100
|
-
),
|
|
2101
|
-
t
|
|
2102
|
-
]
|
|
2103
|
-
}
|
|
2104
|
-
);
|
|
2105
|
-
});
|
|
2106
|
-
mt.displayName = "StatusBadge";
|
|
2107
|
-
const Ye = {
|
|
2108
|
-
formatDate: (t, a = "PP") => {
|
|
2109
|
-
if (!t) return "";
|
|
2110
|
-
const n = new Date(t);
|
|
2111
|
-
return Ee(n) ? Oe(n, a) : "";
|
|
2112
|
-
},
|
|
2113
|
-
formatDateTime: (t, a = "PP p") => {
|
|
2114
|
-
if (!t) return "";
|
|
2115
|
-
const n = new Date(t);
|
|
2116
|
-
return Ee(n) ? Oe(n, a) : "";
|
|
2117
|
-
},
|
|
2118
|
-
isValidDate: (t) => {
|
|
2119
|
-
const a = new Date(t);
|
|
2120
|
-
return Ee(a);
|
|
2121
|
-
}
|
|
2122
|
-
}, ut = ({
|
|
2123
|
-
card: t,
|
|
2124
|
-
onClick: a,
|
|
2125
|
-
onDoubleClick: n,
|
|
2126
|
-
isDragging: i,
|
|
2127
|
-
isHighlighted: o,
|
|
2128
|
-
enableTooltip: u,
|
|
2129
|
-
tooltipTemplate: y,
|
|
2130
|
-
customFields: h,
|
|
2131
|
-
slots: f,
|
|
2132
|
-
slotProps: k,
|
|
2133
|
-
className: x,
|
|
2134
|
-
dir: C
|
|
2135
|
-
}) => {
|
|
2136
|
-
const B = C === "rtl", {
|
|
2137
|
-
attributes: c,
|
|
2138
|
-
listeners: w,
|
|
2139
|
-
setNodeRef: N,
|
|
2140
|
-
transform: I,
|
|
2141
|
-
transition: r,
|
|
2142
|
-
isDragging: s
|
|
2143
|
-
} = it({
|
|
2144
|
-
id: t.id,
|
|
2145
|
-
data: { type: "card", card: t }
|
|
2146
|
-
}), l = i || s, m = {
|
|
2147
|
-
transform: st.Translate.toString(I),
|
|
2148
|
-
transition: r
|
|
2149
|
-
}, v = {
|
|
2150
|
-
low: "Pending",
|
|
2151
|
-
medium: "In Progress",
|
|
2152
|
-
high: "Active",
|
|
2153
|
-
critical: "Inactive"
|
|
2154
|
-
// Using red color for critical
|
|
2155
|
-
}, D = t.checklists?.reduce((z, H) => z + H.items.length, 0) || 0, _ = t.checklists?.reduce((z, H) => z + H.items.filter((b) => b.isChecked).length, 0) || 0, E = t.subtasks?.length || 0, T = t.subtasks?.filter((z) => z.isCompleted).length || 0, S = /* @__PURE__ */ d("div", { className: "p-0 space-y-2", children: [
|
|
2156
|
-
t.coverImage && /* @__PURE__ */ e("div", { className: "h-32 w-full overflow-hidden rounded-t-lg", children: /* @__PURE__ */ e("img", { src: t.coverImage, alt: "Cover", className: "w-full h-full object-cover" }) }),
|
|
2157
|
-
/* @__PURE__ */ d("div", { className: j("p-3 space-y-2", t.coverImage ? "pt-1" : ""), children: [
|
|
2158
|
-
/* @__PURE__ */ d("div", { className: "flex items-start justify-between gap-2", children: [
|
|
2159
|
-
/* @__PURE__ */ e("h4", { className: "font-medium text-sm line-clamp-2 flex-1", children: t.title }),
|
|
2160
|
-
t.priority && /* @__PURE__ */ e(
|
|
2161
|
-
mt,
|
|
2162
|
-
{
|
|
2163
|
-
status: v[t.priority] || "Pending",
|
|
2164
|
-
className: "shrink-0"
|
|
2165
|
-
}
|
|
2166
|
-
)
|
|
2167
|
-
] }),
|
|
2168
|
-
t.description && /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground line-clamp-2", children: t.description }),
|
|
2169
|
-
t.tags && t.tags.length > 0 && /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-1", children: t.tags.map((z) => /* @__PURE__ */ e(
|
|
2170
|
-
ot,
|
|
2171
|
-
{
|
|
2172
|
-
variant: "secondary",
|
|
2173
|
-
className: "text-xs px-2 py-0",
|
|
2174
|
-
style: {
|
|
2175
|
-
backgroundColor: z.color,
|
|
2176
|
-
color: "#fff"
|
|
2177
|
-
},
|
|
2178
|
-
children: z.name
|
|
2179
|
-
},
|
|
2180
|
-
z.id
|
|
2181
|
-
)) }),
|
|
2182
|
-
(D > 0 || t.attachments && t.attachments.length > 0 || t.comments && t.comments.length > 0 || E > 0 || t.timeTracking) && /* @__PURE__ */ d("div", { className: "flex items-center gap-3 text-muted-foreground pt-1 flex-wrap", children: [
|
|
2183
|
-
t.attachments && t.attachments.length > 0 && /* @__PURE__ */ d("div", { className: "flex items-center gap-1 text-xs", children: [
|
|
2184
|
-
/* @__PURE__ */ e(at, { className: "w-3 h-3" }),
|
|
2185
|
-
/* @__PURE__ */ e("span", { children: t.attachments.length })
|
|
2186
|
-
] }),
|
|
2187
|
-
t.comments && t.comments.length > 0 && /* @__PURE__ */ d("div", { className: "flex items-center gap-1 text-xs", children: [
|
|
2188
|
-
/* @__PURE__ */ e(oa, { className: "w-3 h-3" }),
|
|
2189
|
-
/* @__PURE__ */ e("span", { children: t.comments.length })
|
|
2190
|
-
] }),
|
|
2191
|
-
D > 0 && /* @__PURE__ */ d("div", { className: "flex items-center gap-1 text-xs", children: [
|
|
2192
|
-
/* @__PURE__ */ e(ga, { className: "w-3 h-3" }),
|
|
2193
|
-
/* @__PURE__ */ d("span", { children: [
|
|
2194
|
-
_,
|
|
2195
|
-
"/",
|
|
2196
|
-
D
|
|
2197
|
-
] })
|
|
2198
|
-
] }),
|
|
2199
|
-
E > 0 && /* @__PURE__ */ d("div", { className: "flex items-center gap-1 text-xs", children: [
|
|
2200
|
-
/* @__PURE__ */ e(ia, { className: "w-3 h-3" }),
|
|
2201
|
-
/* @__PURE__ */ d("span", { children: [
|
|
2202
|
-
T,
|
|
2203
|
-
"/",
|
|
2204
|
-
E
|
|
2205
|
-
] })
|
|
2206
|
-
] }),
|
|
2207
|
-
t.timeTracking && (t.timeTracking.estimated > 0 || t.timeTracking.actual > 0) && /* @__PURE__ */ d("div", { className: "flex items-center gap-1 text-xs", title: `Estimated: ${t.timeTracking.estimated}h, Actual: ${t.timeTracking.actual}h`, children: [
|
|
2208
|
-
/* @__PURE__ */ e(At, { className: "w-3 h-3" }),
|
|
2209
|
-
/* @__PURE__ */ d("span", { children: [
|
|
2210
|
-
t.timeTracking.actual,
|
|
2211
|
-
"h / ",
|
|
2212
|
-
t.timeTracking.estimated,
|
|
2213
|
-
"h"
|
|
2214
|
-
] })
|
|
2215
|
-
] })
|
|
2216
|
-
] }),
|
|
2217
|
-
/* @__PURE__ */ d("div", { className: "flex items-center justify-between pt-1", children: [
|
|
2218
|
-
t.assignees && t.assignees.length > 0 && /* @__PURE__ */ d("div", { className: "flex -space-x-2", children: [
|
|
2219
|
-
t.assignees.slice(0, 3).map((z) => /* @__PURE__ */ e(ze, { className: "w-6 h-6 border-2 border-background", children: z.avatarUrl ? /* @__PURE__ */ e(jt, { src: z.avatarUrl, alt: z.name }) : /* @__PURE__ */ e($e, { className: "text-xs", children: z.name.substring(0, 2).toUpperCase() }) }, z.id)),
|
|
2220
|
-
t.assignees.length > 3 && /* @__PURE__ */ e("div", { className: "w-6 h-6 rounded-full bg-muted border-2 border-background flex items-center justify-center", children: /* @__PURE__ */ d("span", { className: "text-xs", children: [
|
|
2221
|
-
"+",
|
|
2222
|
-
t.assignees.length - 3
|
|
2223
|
-
] }) })
|
|
2224
|
-
] }),
|
|
2225
|
-
t.dueDate && /* @__PURE__ */ d("div", { className: j("flex items-center gap-1 text-xs text-muted-foreground", B ? "mr-auto" : "ml-auto"), children: [
|
|
2226
|
-
/* @__PURE__ */ e(Gt, { className: "w-3 h-3" }),
|
|
2227
|
-
/* @__PURE__ */ e("span", { children: Ye.formatDate(t.dueDate) })
|
|
2228
|
-
] })
|
|
2229
|
-
] })
|
|
2230
|
-
] }),
|
|
2231
|
-
h && h.length > 0 && t.customFieldValues && /* @__PURE__ */ e("div", { className: "px-3 pb-3 gap-1 flex flex-wrap", children: h.map((z) => {
|
|
2232
|
-
const H = t.customFieldValues?.[z.id];
|
|
2233
|
-
return H == null || H === "" ? null : /* @__PURE__ */ d("div", { className: "text-xs bg-muted px-1.5 py-0.5 rounded flex items-center gap-1 max-w-full truncate", children: [
|
|
2234
|
-
/* @__PURE__ */ d("span", { className: "text-muted-foreground opacity-70", children: [
|
|
2235
|
-
z.name,
|
|
2236
|
-
":"
|
|
2237
|
-
] }),
|
|
2238
|
-
/* @__PURE__ */ e("span", { className: "font-medium truncate", children: z.type === "date" ? Ye.formatDate(H) : String(H) })
|
|
2239
|
-
] }, z.id);
|
|
2240
|
-
}) })
|
|
2241
|
-
] }), V = f?.cardContent, U = V ? /* @__PURE__ */ e(V, { card: t, ...k?.cardContent }) : S, W = /* @__PURE__ */ e(
|
|
2242
|
-
Pe,
|
|
2243
|
-
{
|
|
2244
|
-
ref: N,
|
|
2245
|
-
style: m,
|
|
2246
|
-
...c,
|
|
2247
|
-
...w,
|
|
2248
|
-
onClick: () => a?.(t),
|
|
2249
|
-
onDoubleClick: () => n?.(t),
|
|
2250
|
-
id: t.id,
|
|
2251
|
-
"data-card-id": t.id,
|
|
2252
|
-
className: j(
|
|
2253
|
-
"cursor-pointer transition-all hover:shadow-md overflow-hidden",
|
|
2254
|
-
l && "opacity-50 ring-2 ring-primary/50",
|
|
2255
|
-
o && "ring-2 ring-primary bg-primary/5 transition-colors duration-300",
|
|
2256
|
-
// Highlight style
|
|
2257
|
-
x
|
|
2258
|
-
),
|
|
2259
|
-
children: U
|
|
2260
|
-
}
|
|
2261
|
-
), Z = f?.card;
|
|
2262
|
-
return Z ? /* @__PURE__ */ e(Z, { card: t, defaultContent: W, ...k?.card }) : /* @__PURE__ */ e(vt, { enabled: u, content: y ? y(t) : null, children: W });
|
|
2263
|
-
};
|
|
2264
|
-
ut.displayName = "KanbanCard";
|
|
2265
|
-
const ht = Ge(ut), za = ({
|
|
2266
|
-
cards: t,
|
|
2267
|
-
estimateSize: a = 120,
|
|
2268
|
-
overscan: n = 5
|
|
2269
|
-
}) => {
|
|
2270
|
-
const i = Ve(null), o = Xt({
|
|
2271
|
-
count: t.length,
|
|
2272
|
-
getScrollElement: () => i.current,
|
|
2273
|
-
estimateSize: () => a,
|
|
2274
|
-
overscan: n
|
|
2275
|
-
});
|
|
2276
|
-
return {
|
|
2277
|
-
parentRef: i,
|
|
2278
|
-
virtualizer: o,
|
|
2279
|
-
virtualItems: o.getVirtualItems(),
|
|
2280
|
-
totalSize: o.getTotalSize()
|
|
2281
|
-
};
|
|
2282
|
-
}, $a = ({
|
|
2283
|
-
column: t,
|
|
2284
|
-
cards: a,
|
|
2285
|
-
onCardClick: n,
|
|
2286
|
-
onCardDoubleClick: i,
|
|
2287
|
-
onCardDragStart: o,
|
|
2288
|
-
onAddCard: u,
|
|
2289
|
-
onToggleCollapse: y,
|
|
2290
|
-
onDeleteColumn: h,
|
|
2291
|
-
onUpdateColumn: f,
|
|
2292
|
-
// Added
|
|
2293
|
-
onColumnClick: k,
|
|
2294
|
-
// Added
|
|
2295
|
-
selectedColumnId: x,
|
|
2296
|
-
// Added
|
|
2297
|
-
draggedCardId: C,
|
|
2298
|
-
highlightedCardId: B,
|
|
2299
|
-
// Added
|
|
2300
|
-
isDropTarget: c,
|
|
2301
|
-
customFields: w,
|
|
2302
|
-
className: N,
|
|
2303
|
-
dir: I,
|
|
2304
|
-
slots: r,
|
|
2305
|
-
slotProps: s
|
|
2306
|
-
}) => {
|
|
2307
|
-
const l = I === "rtl", { t: m } = ye(), [v, D] = we.useState(!1), _ = r?.card || ht, [E, T] = we.useState(t.name), S = we.useRef(null);
|
|
2308
|
-
we.useEffect(() => {
|
|
2309
|
-
v && S.current && (S.current.focus(), S.current.select());
|
|
2310
|
-
}, [v]);
|
|
2311
|
-
const V = () => {
|
|
2312
|
-
E.trim() && E !== t.name ? f?.(t.id, { name: E }) : T(t.name), D(!1);
|
|
2313
|
-
}, U = (Q) => {
|
|
2314
|
-
Q.key === "Enter" ? V() : Q.key === "Escape" && (T(t.name), D(!1));
|
|
2315
|
-
}, W = t.wipLimit && a.length > t.wipLimit, Z = t.wipLimit && a.length === t.wipLimit, {
|
|
2316
|
-
setNodeRef: z,
|
|
2317
|
-
attributes: H,
|
|
2318
|
-
listeners: b,
|
|
2319
|
-
transform: A,
|
|
2320
|
-
transition: P,
|
|
2321
|
-
isDragging: J
|
|
2322
|
-
} = it({
|
|
2323
|
-
id: t.id,
|
|
2324
|
-
data: { type: "column", column: t }
|
|
2325
|
-
}), te = {
|
|
2326
|
-
transform: st.Translate.toString(A),
|
|
2327
|
-
transition: P
|
|
2328
|
-
};
|
|
2329
|
-
return /* @__PURE__ */ d(
|
|
2330
|
-
Pe,
|
|
2331
|
-
{
|
|
2332
|
-
ref: z,
|
|
2333
|
-
style: te,
|
|
2334
|
-
className: j(
|
|
2335
|
-
"flex flex-col w-80 shrink-0 transition-all duration-200",
|
|
2336
|
-
x === t.id ? "ring-2 ring-primary border-primary" : "",
|
|
2337
|
-
J ? "opacity-50" : "",
|
|
2338
|
-
c ? "ring-2 ring-primary/70 border-primary/50 bg-primary/5" : "",
|
|
2339
|
-
N
|
|
2340
|
-
),
|
|
2341
|
-
onClick: () => k?.(t.id),
|
|
2342
|
-
children: [
|
|
2343
|
-
/* @__PURE__ */ d(ct, { className: "pb-3", onDoubleClick: () => D(!0), children: [
|
|
2344
|
-
/* @__PURE__ */ d("div", { className: "flex items-center justify-between", children: [
|
|
2345
|
-
/* @__PURE__ */ d("div", { className: "flex items-center gap-2 flex-1", children: [
|
|
2346
|
-
/* @__PURE__ */ e("div", { ...H, ...b, className: "cursor-grab active:cursor-grabbing p-1 hover:bg-muted rounded text-muted-foreground/50 hover:text-primary transition-colors", children: /* @__PURE__ */ e(He, { className: "h-4 w-4" }) }),
|
|
2347
|
-
/* @__PURE__ */ e(
|
|
2348
|
-
$,
|
|
2349
|
-
{
|
|
2350
|
-
variant: "ghost",
|
|
2351
|
-
size: "sm",
|
|
2352
|
-
className: "h-6 w-6 p-0",
|
|
2353
|
-
onClick: () => y?.(t.id),
|
|
2354
|
-
children: t.isCollapsed ? l ? /* @__PURE__ */ e(Be, { className: "h-4 w-4 rotate-180" }) : /* @__PURE__ */ e(Be, { className: "h-4 w-4" }) : /* @__PURE__ */ e(rt, { className: "h-4 w-4" })
|
|
2355
|
-
}
|
|
2356
|
-
),
|
|
2357
|
-
/* @__PURE__ */ d("div", { className: "flex items-center gap-2 flex-1 min-w-0", children: [
|
|
2358
|
-
v ? /* @__PURE__ */ e(
|
|
2359
|
-
"input",
|
|
2360
|
-
{
|
|
2361
|
-
ref: S,
|
|
2362
|
-
value: E,
|
|
2363
|
-
onChange: (Q) => T(Q.target.value),
|
|
2364
|
-
onBlur: V,
|
|
2365
|
-
onKeyDown: U,
|
|
2366
|
-
className: "h-6 w-full text-sm font-semibold border rounded px-1 bg-background",
|
|
2367
|
-
onClick: (Q) => Q.stopPropagation()
|
|
2368
|
-
}
|
|
2369
|
-
) : /* @__PURE__ */ e("h3", { className: "font-semibold text-sm truncate", title: t.name, children: t.name }),
|
|
2370
|
-
/* @__PURE__ */ d("span", { className: "text-xs text-muted-foreground", children: [
|
|
2371
|
-
a.length,
|
|
2372
|
-
" ",
|
|
2373
|
-
m("items")
|
|
2374
|
-
] })
|
|
2375
|
-
] })
|
|
2376
|
-
] }),
|
|
2377
|
-
/* @__PURE__ */ d("div", { className: "flex items-center gap-1", children: [
|
|
2378
|
-
/* @__PURE__ */ d(zt, { children: [
|
|
2379
|
-
/* @__PURE__ */ e($t, { asChild: !0, children: /* @__PURE__ */ e($, { variant: "ghost", size: "sm", className: "h-6 w-6 p-0", children: /* @__PURE__ */ e(He, { className: "h-4 w-4" }) }) }),
|
|
2380
|
-
/* @__PURE__ */ e(Mt, { align: "end", children: /* @__PURE__ */ d(Kt, { className: "text-red-600 focus:text-red-600 focus:bg-red-50", onClick: () => h?.(t.id), children: [
|
|
2381
|
-
/* @__PURE__ */ e(nt, { className: "h-4 w-4 me-2" }),
|
|
2382
|
-
m("delete_column") || "Delete Column"
|
|
2383
|
-
] }) })
|
|
2384
|
-
] }),
|
|
2385
|
-
/* @__PURE__ */ e(
|
|
2386
|
-
$,
|
|
2387
|
-
{
|
|
2388
|
-
variant: "ghost",
|
|
2389
|
-
size: "sm",
|
|
2390
|
-
className: "h-6 w-6 p-0",
|
|
2391
|
-
onClick: () => u?.(t.id),
|
|
2392
|
-
children: /* @__PURE__ */ e(Ne, { className: "h-4 w-4" })
|
|
2393
|
-
}
|
|
2394
|
-
)
|
|
2395
|
-
] })
|
|
2396
|
-
] }),
|
|
2397
|
-
t.wipLimit && /* @__PURE__ */ e("div", { className: "mt-2", children: /* @__PURE__ */ e("div", { className: "h-1 w-full bg-muted rounded-full overflow-hidden", children: /* @__PURE__ */ e(
|
|
2398
|
-
"div",
|
|
2399
|
-
{
|
|
2400
|
-
className: j(
|
|
2401
|
-
"h-full transition-all",
|
|
2402
|
-
W ? "bg-red-500" : Z ? "bg-yellow-500" : "bg-green-500"
|
|
2403
|
-
),
|
|
2404
|
-
style: { width: `${Math.min(a.length / t.wipLimit * 100, 100)}%` }
|
|
2405
|
-
}
|
|
2406
|
-
) }) })
|
|
2407
|
-
] }),
|
|
2408
|
-
!t.isCollapsed && (() => {
|
|
2409
|
-
const Q = a.sort((O, G) => O.position - G.position);
|
|
2410
|
-
if (Q.length > 50) {
|
|
2411
|
-
const { parentRef: O, virtualItems: G, totalSize: ie } = za({
|
|
2412
|
-
cards: Q,
|
|
2413
|
-
estimateSize: 120,
|
|
2414
|
-
overscan: 5
|
|
2415
|
-
});
|
|
2416
|
-
return /* @__PURE__ */ d(
|
|
2417
|
-
Ke,
|
|
2418
|
-
{
|
|
2419
|
-
ref: O,
|
|
2420
|
-
className: "flex-1 overflow-y-auto max-h-[calc(100vh-200px)]",
|
|
2421
|
-
children: [
|
|
2422
|
-
/* @__PURE__ */ e("div", { style: { height: `${ie}px`, position: "relative" }, children: G.map((Y) => {
|
|
2423
|
-
const ae = Q[Y.index];
|
|
2424
|
-
return /* @__PURE__ */ e(
|
|
2425
|
-
"div",
|
|
2426
|
-
{
|
|
2427
|
-
style: {
|
|
2428
|
-
position: "absolute",
|
|
2429
|
-
top: 0,
|
|
2430
|
-
left: 0,
|
|
2431
|
-
width: "100%",
|
|
2432
|
-
transform: `translateY(${Y.start}px)`,
|
|
2433
|
-
paddingBottom: "8px"
|
|
2434
|
-
},
|
|
2435
|
-
children: /* @__PURE__ */ e(
|
|
2436
|
-
"div",
|
|
2437
|
-
{
|
|
2438
|
-
style: {
|
|
2439
|
-
position: "absolute",
|
|
2440
|
-
top: 0,
|
|
2441
|
-
left: 0,
|
|
2442
|
-
width: "100%",
|
|
2443
|
-
transform: `translateY(${Y.start}px)`,
|
|
2444
|
-
paddingBottom: "8px"
|
|
2445
|
-
},
|
|
2446
|
-
children: /* @__PURE__ */ e(
|
|
2447
|
-
_,
|
|
2448
|
-
{
|
|
2449
|
-
card: ae,
|
|
2450
|
-
onClick: n,
|
|
2451
|
-
onDoubleClick: i,
|
|
2452
|
-
onDragStart: o,
|
|
2453
|
-
isDragging: C === ae.id,
|
|
2454
|
-
isHighlighted: B === ae.id,
|
|
2455
|
-
customFields: w,
|
|
2456
|
-
dir: I,
|
|
2457
|
-
...s?.card
|
|
2458
|
-
}
|
|
2459
|
-
)
|
|
2460
|
-
},
|
|
2461
|
-
ae.id
|
|
2462
|
-
)
|
|
2463
|
-
},
|
|
2464
|
-
ae.id
|
|
2465
|
-
);
|
|
2466
|
-
}) }),
|
|
2467
|
-
Q.length === 0 && /* @__PURE__ */ e("div", { className: "text-center py-8 text-sm text-muted-foreground", children: m("no_cards") })
|
|
2468
|
-
]
|
|
2469
|
-
}
|
|
2470
|
-
);
|
|
2471
|
-
}
|
|
2472
|
-
return /* @__PURE__ */ d(Ke, { className: "flex-1 overflow-y-auto max-h-[calc(100vh-200px)] space-y-2", children: [
|
|
2473
|
-
/* @__PURE__ */ e(
|
|
2474
|
-
Me,
|
|
2475
|
-
{
|
|
2476
|
-
items: a.map((O) => O.id),
|
|
2477
|
-
strategy: Yt,
|
|
2478
|
-
children: Q.map((O) => /* @__PURE__ */ e(
|
|
2479
|
-
_,
|
|
2480
|
-
{
|
|
2481
|
-
card: O,
|
|
2482
|
-
onClick: n,
|
|
2483
|
-
onDoubleClick: i,
|
|
2484
|
-
onDragStart: o,
|
|
2485
|
-
isDragging: C === O.id,
|
|
2486
|
-
isHighlighted: B === O.id,
|
|
2487
|
-
customFields: w,
|
|
2488
|
-
dir: I,
|
|
2489
|
-
...s?.card
|
|
2490
|
-
},
|
|
2491
|
-
O.id
|
|
2492
|
-
))
|
|
2493
|
-
}
|
|
2494
|
-
),
|
|
2495
|
-
a.length === 0 && /* @__PURE__ */ e("div", { className: j(
|
|
2496
|
-
"flex h-32 items-center justify-center rounded-lg border border-dashed text-sm transition-all duration-150",
|
|
2497
|
-
c ? "border-primary/60 bg-primary/5 text-primary/70" : "text-muted-foreground"
|
|
2498
|
-
), children: c ? "✦ Drop here" : m("no_cards") })
|
|
2499
|
-
] });
|
|
2500
|
-
})()
|
|
2501
|
-
]
|
|
2502
|
-
}
|
|
2503
|
-
);
|
|
2504
|
-
}, Ma = ({
|
|
2505
|
-
swimlaneId: t,
|
|
2506
|
-
columnId: a,
|
|
2507
|
-
children: n,
|
|
2508
|
-
className: i
|
|
2509
|
-
}) => {
|
|
2510
|
-
const { isOver: o, setNodeRef: u } = Ot({
|
|
2511
|
-
id: `swimlane-cell-${t}-${a}`,
|
|
2512
|
-
data: {
|
|
2513
|
-
type: "swimlane-cell",
|
|
2514
|
-
swimlaneId: t,
|
|
2515
|
-
columnId: a
|
|
2516
|
-
}
|
|
2517
|
-
});
|
|
2518
|
-
return /* @__PURE__ */ e(
|
|
2519
|
-
"div",
|
|
2520
|
-
{
|
|
2521
|
-
ref: u,
|
|
2522
|
-
className: j(i, o && "bg-primary/5 transition-colors"),
|
|
2523
|
-
children: n
|
|
2524
|
-
}
|
|
2525
|
-
);
|
|
2526
|
-
}, Ze = ({
|
|
2527
|
-
swimlane: t,
|
|
2528
|
-
columns: a,
|
|
2529
|
-
cards: n,
|
|
2530
|
-
onCardClick: i,
|
|
2531
|
-
onCardDoubleClick: o,
|
|
2532
|
-
onCardDragStart: u,
|
|
2533
|
-
onCardDragEnd: y,
|
|
2534
|
-
onToggleCollapse: h,
|
|
2535
|
-
draggedCardId: f,
|
|
2536
|
-
highlightedCardId: k,
|
|
2537
|
-
// Added
|
|
2538
|
-
customFields: x,
|
|
2539
|
-
className: C,
|
|
2540
|
-
dir: B,
|
|
2541
|
-
slots: c,
|
|
2542
|
-
slotProps: w
|
|
2543
|
-
}) => {
|
|
2544
|
-
const N = B === "rtl", { t: I } = ye(), r = c?.card || ht;
|
|
2545
|
-
return /* @__PURE__ */ d("div", { className: j("flex flex-col border rounded-lg bg-card text-card-foreground shadow-sm mb-4", C), children: [
|
|
2546
|
-
/* @__PURE__ */ d("div", { className: "flex items-center gap-2 p-3 border-b bg-muted/30", children: [
|
|
2547
|
-
/* @__PURE__ */ e(
|
|
2548
|
-
$,
|
|
2549
|
-
{
|
|
2550
|
-
variant: "ghost",
|
|
2551
|
-
size: "sm",
|
|
2552
|
-
className: "h-6 w-6 p-0",
|
|
2553
|
-
onClick: () => h?.(t.id),
|
|
2554
|
-
children: t.isCollapsed ? N ? /* @__PURE__ */ e(Be, { className: "h-4 w-4 rotate-180" }) : /* @__PURE__ */ e(Be, { className: "h-4 w-4" }) : /* @__PURE__ */ e(rt, { className: "h-4 w-4" })
|
|
2555
|
-
}
|
|
2556
|
-
),
|
|
2557
|
-
/* @__PURE__ */ e("h3", { className: "font-semibold text-sm", children: t.name }),
|
|
2558
|
-
/* @__PURE__ */ d("span", { className: "text-xs text-muted-foreground", children: [
|
|
2559
|
-
"(",
|
|
2560
|
-
n.length,
|
|
2561
|
-
" ",
|
|
2562
|
-
I("items"),
|
|
2563
|
-
")"
|
|
2564
|
-
] })
|
|
2565
|
-
] }),
|
|
2566
|
-
!t.isCollapsed && /* @__PURE__ */ e("div", { className: j("flex divide-x", N && "divide-x-reverse"), children: a.map((s) => {
|
|
2567
|
-
const l = n.filter((m) => m.columnId === s.id);
|
|
2568
|
-
return /* @__PURE__ */ e(
|
|
2569
|
-
Ma,
|
|
2570
|
-
{
|
|
2571
|
-
swimlaneId: t.id,
|
|
2572
|
-
columnId: s.id,
|
|
2573
|
-
className: "flex-1 min-w-[280px] p-2 min-h-[100px]",
|
|
2574
|
-
children: /* @__PURE__ */ e("div", { className: "space-y-2", children: l.map((m) => /* @__PURE__ */ e(
|
|
2575
|
-
r,
|
|
2576
|
-
{
|
|
2577
|
-
card: m,
|
|
2578
|
-
onClick: i,
|
|
2579
|
-
onDoubleClick: o,
|
|
2580
|
-
onDragStart: u,
|
|
2581
|
-
onDragEnd: y,
|
|
2582
|
-
isDragging: f === m.id,
|
|
2583
|
-
isHighlighted: k === m.id,
|
|
2584
|
-
customFields: x,
|
|
2585
|
-
dir: B,
|
|
2586
|
-
...w?.card
|
|
2587
|
-
},
|
|
2588
|
-
m.id
|
|
2589
|
-
)) })
|
|
2590
|
-
},
|
|
2591
|
-
s.id
|
|
2592
|
-
);
|
|
2593
|
-
}) })
|
|
2594
|
-
] });
|
|
2595
|
-
}, Ka = (t, a) => a.find((i) => i.id === t.columnId)?.color || "hsl(var(--primary))", Ra = ({
|
|
2596
|
-
cards: t,
|
|
2597
|
-
columns: a,
|
|
2598
|
-
swimlanes: n,
|
|
2599
|
-
onCardUpdate: i,
|
|
2600
|
-
onCardClick: o,
|
|
2601
|
-
onCardCreate: u,
|
|
2602
|
-
className: y,
|
|
2603
|
-
dir: h
|
|
2604
|
-
}) => {
|
|
2605
|
-
const f = ce(() => {
|
|
2606
|
-
let c = [];
|
|
2607
|
-
return n && n.length > 0 ? (c = n.sort((w, N) => w.position - N.position).map((w) => ({
|
|
2608
|
-
id: w.id,
|
|
2609
|
-
name: w.name,
|
|
2610
|
-
color: w.color
|
|
2611
|
-
})), t.some((w) => !w.swimlaneId) && c.push({
|
|
2612
|
-
id: "uncategorized",
|
|
2613
|
-
name: "Uncategorized",
|
|
2614
|
-
color: "hsl(var(--muted-foreground))"
|
|
2615
|
-
}), c) : a.sort((w, N) => w.position - N.position).map((w) => ({
|
|
2616
|
-
id: w.id,
|
|
2617
|
-
name: w.name,
|
|
2618
|
-
color: w.color
|
|
2619
|
-
}));
|
|
2620
|
-
}, [n, a, t]), k = ce(() => t.map((c) => {
|
|
2621
|
-
const w = n && n.length > 0 ? c.swimlaneId || "uncategorized" : c.columnId || "uncategorized", N = c.startDate ? new Date(c.startDate) : c.dueDate ? Ue(new Date(c.dueDate)) : Ue(/* @__PURE__ */ new Date()), I = c.dueDate ? new Date(c.dueDate) : Ft(N, 1), r = a.find((s) => s.id === c.columnId);
|
|
2622
|
-
return {
|
|
2623
|
-
id: c.id,
|
|
2624
|
-
title: c.title,
|
|
2625
|
-
start: N,
|
|
2626
|
-
end: I,
|
|
2627
|
-
resourceId: w || "uncategorized",
|
|
2628
|
-
description: c.description,
|
|
2629
|
-
color: Ka(c, a),
|
|
2630
|
-
status: r?.name,
|
|
2631
|
-
// Store original card for easy access
|
|
2632
|
-
originalCard: c
|
|
2633
|
-
};
|
|
2634
|
-
}), [t, n, a]), x = L((c) => {
|
|
2635
|
-
const w = c.originalCard;
|
|
2636
|
-
if (!w) return;
|
|
2637
|
-
const N = {
|
|
2638
|
-
...w,
|
|
2639
|
-
startDate: c.start,
|
|
2640
|
-
dueDate: c.end,
|
|
2641
|
-
// If we dragged to a different resource (swimlane/column), update that too
|
|
2642
|
-
...n && n.length > 0 ? { swimlaneId: c.resourceId } : { columnId: c.resourceId || w.columnId || a[0]?.id || "" }
|
|
2643
|
-
};
|
|
2644
|
-
i?.(N, "move");
|
|
2645
|
-
}, [i, n, a]), C = L((c) => {
|
|
2646
|
-
const w = n && n.length > 0, N = {
|
|
2647
|
-
title: c.title || "New Card",
|
|
2648
|
-
startDate: c.start,
|
|
2649
|
-
dueDate: c.end,
|
|
2650
|
-
columnId: !w && c.resourceId ? c.resourceId : a[0]?.id || "",
|
|
2651
|
-
swimlaneId: w && c.resourceId ? c.resourceId : void 0,
|
|
2652
|
-
description: c.description || "",
|
|
2653
|
-
priority: "medium"
|
|
2654
|
-
};
|
|
2655
|
-
u?.(N);
|
|
2656
|
-
}, [n, a, u]), B = L((c) => {
|
|
2657
|
-
const w = c.originalCard;
|
|
2658
|
-
w && o?.(w);
|
|
2659
|
-
}, [o]);
|
|
2660
|
-
return /* @__PURE__ */ e("div", { className: y, style: { height: "100%", minHeight: "600px" }, children: /* @__PURE__ */ e(
|
|
2661
|
-
Tt,
|
|
2662
|
-
{
|
|
2663
|
-
events: k,
|
|
2664
|
-
resources: f,
|
|
2665
|
-
selectedDate: /* @__PURE__ */ new Date(),
|
|
2666
|
-
view: "TimelineMonth",
|
|
2667
|
-
views: ["TimelineWeek", "TimelineMonth"],
|
|
2668
|
-
onEventChange: x,
|
|
2669
|
-
onEventCreate: C,
|
|
2670
|
-
onEventClick: B,
|
|
2671
|
-
showHeaderBar: !0,
|
|
2672
|
-
showResourceHeaders: !0,
|
|
2673
|
-
dir: h
|
|
2674
|
-
}
|
|
2675
|
-
) });
|
|
2676
|
-
}, La = ({
|
|
2677
|
-
board: t,
|
|
2678
|
-
onCardClick: a,
|
|
2679
|
-
onCardDoubleClick: n,
|
|
2680
|
-
onCardDragStart: i,
|
|
2681
|
-
onCardDragEnd: o,
|
|
2682
|
-
onCardDrop: u,
|
|
2683
|
-
onAddCard: y,
|
|
2684
|
-
onToggleColumnCollapse: h,
|
|
2685
|
-
onToggleSwimlaneCollapse: f,
|
|
2686
|
-
onAddColumn: k,
|
|
2687
|
-
onDeleteColumn: x,
|
|
2688
|
-
onUpdateColumn: C,
|
|
2689
|
-
onColumnClick: B,
|
|
2690
|
-
onCreateCard: c,
|
|
2691
|
-
selectedColumnId: w,
|
|
2692
|
-
draggedCardId: N,
|
|
2693
|
-
filteredCards: I,
|
|
2694
|
-
slots: r,
|
|
2695
|
-
slotProps: s,
|
|
2696
|
-
className: l,
|
|
2697
|
-
view: m = "standard",
|
|
2698
|
-
dir: v
|
|
2699
|
-
}) => {
|
|
2700
|
-
const D = I || t.cards, { t: _ } = ye(), [E, T] = q(null), [S, V] = q(null);
|
|
2701
|
-
if (m === "timeline")
|
|
2702
|
-
return /* @__PURE__ */ e(
|
|
2703
|
-
Ra,
|
|
2704
|
-
{
|
|
2705
|
-
cards: D,
|
|
2706
|
-
columns: t.columns,
|
|
2707
|
-
swimlanes: t.swimlanes,
|
|
2708
|
-
onCardUpdate: u ? async (b, A) => {
|
|
2709
|
-
A === "move" && u(b.columnId, b.swimlaneId);
|
|
2710
|
-
} : void 0,
|
|
2711
|
-
onCardClick: a,
|
|
2712
|
-
onCardCreate: c,
|
|
2713
|
-
className: l,
|
|
2714
|
-
dir: v
|
|
2715
|
-
}
|
|
2716
|
-
);
|
|
2717
|
-
const U = () => !t.swimlanes || t.swimlanes.length === 0 ? null : /* @__PURE__ */ e("div", { className: j("flex flex-col p-4 overflow-y-auto h-full", l), children: /* @__PURE__ */ d(Me, { items: D.map((b) => b.id), children: [
|
|
2718
|
-
t.swimlanes.sort((b, A) => b.position - A.position).map((b) => {
|
|
2719
|
-
const A = D.filter((P) => P.swimlaneId === b.id);
|
|
2720
|
-
return /* @__PURE__ */ e(
|
|
2721
|
-
Ze,
|
|
2722
|
-
{
|
|
2723
|
-
swimlane: b,
|
|
2724
|
-
columns: t.columns.sort((P, J) => P.position - J.position),
|
|
2725
|
-
cards: A,
|
|
2726
|
-
onCardClick: a,
|
|
2727
|
-
onCardDoubleClick: n,
|
|
2728
|
-
onCardDragStart: i,
|
|
2729
|
-
onCardDragEnd: o,
|
|
2730
|
-
onDrop: u,
|
|
2731
|
-
onToggleCollapse: f,
|
|
2732
|
-
draggedCardId: N,
|
|
2733
|
-
customFields: t.customFields,
|
|
2734
|
-
slots: r,
|
|
2735
|
-
slotProps: s,
|
|
2736
|
-
dir: v
|
|
2737
|
-
},
|
|
2738
|
-
b.id
|
|
2739
|
-
);
|
|
2740
|
-
}),
|
|
2741
|
-
D.some((b) => !b.swimlaneId) && /* @__PURE__ */ e(
|
|
2742
|
-
Ze,
|
|
2743
|
-
{
|
|
2744
|
-
swimlane: {
|
|
2745
|
-
id: "uncategorized",
|
|
2746
|
-
name: _("uncategorized"),
|
|
2747
|
-
type: "custom",
|
|
2748
|
-
position: 9999,
|
|
2749
|
-
isCollapsed: !1
|
|
2750
|
-
},
|
|
2751
|
-
columns: t.columns.sort((b, A) => b.position - A.position),
|
|
2752
|
-
cards: D.filter((b) => !b.swimlaneId),
|
|
2753
|
-
onCardClick: a,
|
|
2754
|
-
onCardDoubleClick: n,
|
|
2755
|
-
onCardDragStart: i,
|
|
2756
|
-
onCardDragEnd: o,
|
|
2757
|
-
onDrop: u,
|
|
2758
|
-
onToggleCollapse: () => {
|
|
2759
|
-
},
|
|
2760
|
-
draggedCardId: N,
|
|
2761
|
-
customFields: t.customFields,
|
|
2762
|
-
slots: r,
|
|
2763
|
-
slotProps: s,
|
|
2764
|
-
dir: v
|
|
2765
|
-
}
|
|
2766
|
-
)
|
|
2767
|
-
] }) }), W = Ut(
|
|
2768
|
-
qt(Ht, {
|
|
2769
|
-
activationConstraint: { distance: 5 }
|
|
2770
|
-
})
|
|
2771
|
-
);
|
|
2772
|
-
return /* @__PURE__ */ d(
|
|
2773
|
-
Wt,
|
|
2774
|
-
{
|
|
2775
|
-
sensors: W,
|
|
2776
|
-
onDragStart: (b) => {
|
|
2777
|
-
const { active: A } = b;
|
|
2778
|
-
A.data.current?.type === "card" && (T(A.data.current.card), i?.(A.data.current.card));
|
|
2779
|
-
},
|
|
2780
|
-
onDragOver: (b) => {
|
|
2781
|
-
const { over: A } = b;
|
|
2782
|
-
if (!A) {
|
|
2783
|
-
V(null);
|
|
2784
|
-
return;
|
|
2785
|
-
}
|
|
2786
|
-
A.data.current?.type === "column" ? V(A.data.current.column.id) : A.data.current?.type === "card" ? V(A.data.current.card.columnId) : A.data.current?.type === "swimlane-cell" ? V(A.data.current.columnId) : V(null);
|
|
2787
|
-
},
|
|
2788
|
-
onDragEnd: (b) => {
|
|
2789
|
-
const { active: A, over: P } = b;
|
|
2790
|
-
if (T(null), V(null), !P) {
|
|
2791
|
-
o?.();
|
|
2792
|
-
return;
|
|
2793
|
-
}
|
|
2794
|
-
if (A.data.current?.type === "card") {
|
|
2795
|
-
let J, te, Q;
|
|
2796
|
-
if (P.data.current?.type === "column")
|
|
2797
|
-
J = P.data.current.column.id, te = void 0;
|
|
2798
|
-
else if (P.data.current?.type === "swimlane-cell")
|
|
2799
|
-
J = P.data.current.columnId, Q = P.data.current.swimlaneId;
|
|
2800
|
-
else if (P.data.current?.type === "card") {
|
|
2801
|
-
const O = P.data.current.card;
|
|
2802
|
-
J = O.columnId, Q = O.swimlaneId;
|
|
2803
|
-
let G = t.cards.filter((Y) => Y.columnId === J);
|
|
2804
|
-
Q && (G = G.filter((Y) => Y.swimlaneId === Q)), G.sort((Y, ae) => (Y.position ?? 0) - (ae.position ?? 0));
|
|
2805
|
-
const ie = G.findIndex((Y) => Y.id === O.id);
|
|
2806
|
-
te = ie >= 0 ? ie : void 0;
|
|
2807
|
-
}
|
|
2808
|
-
J ? u?.(J, Q, te) : o?.();
|
|
2809
|
-
} else A.data.current?.type === "column" && P.data.current?.type, o?.();
|
|
2810
|
-
},
|
|
2811
|
-
children: [
|
|
2812
|
-
m === "swimlane" ? U() : /* @__PURE__ */ d("div", { className: j("flex gap-4 overflow-x-auto p-4", l), children: [
|
|
2813
|
-
/* @__PURE__ */ e(
|
|
2814
|
-
Me,
|
|
2815
|
-
{
|
|
2816
|
-
items: t.columns.map((b) => b.id),
|
|
2817
|
-
strategy: Zt,
|
|
2818
|
-
children: t.columns.sort((b, A) => b.position - A.position).map((b) => {
|
|
2819
|
-
const A = D.filter((P) => P.columnId === b.id);
|
|
2820
|
-
return /* @__PURE__ */ e(
|
|
2821
|
-
$a,
|
|
2822
|
-
{
|
|
2823
|
-
column: b,
|
|
2824
|
-
cards: A,
|
|
2825
|
-
onCardClick: a,
|
|
2826
|
-
onCardDoubleClick: n,
|
|
2827
|
-
onCardDragStart: i,
|
|
2828
|
-
onCardDragEnd: o,
|
|
2829
|
-
onDrop: u,
|
|
2830
|
-
onAddCard: y,
|
|
2831
|
-
onToggleCollapse: h,
|
|
2832
|
-
onDeleteColumn: x,
|
|
2833
|
-
onUpdateColumn: C,
|
|
2834
|
-
onColumnClick: B,
|
|
2835
|
-
selectedColumnId: w,
|
|
2836
|
-
draggedCardId: N,
|
|
2837
|
-
isDropTarget: S === b.id,
|
|
2838
|
-
customFields: t.customFields,
|
|
2839
|
-
slots: r,
|
|
2840
|
-
slotProps: s,
|
|
2841
|
-
dir: v
|
|
2842
|
-
},
|
|
2843
|
-
b.id
|
|
2844
|
-
);
|
|
2845
|
-
})
|
|
2846
|
-
}
|
|
2847
|
-
),
|
|
2848
|
-
k && /* @__PURE__ */ e("div", { className: "w-80 shrink-0", children: /* @__PURE__ */ d(
|
|
2849
|
-
$,
|
|
2850
|
-
{
|
|
2851
|
-
variant: "outline",
|
|
2852
|
-
className: "w-full h-12 border-dashed",
|
|
2853
|
-
onClick: k,
|
|
2854
|
-
children: [
|
|
2855
|
-
/* @__PURE__ */ e(Ne, { className: "me-2 h-4 w-4" }),
|
|
2856
|
-
_("add_column") || "Add Column"
|
|
2857
|
-
]
|
|
2858
|
-
}
|
|
2859
|
-
) })
|
|
2860
|
-
] }),
|
|
2861
|
-
/* @__PURE__ */ e(Jt, { dropAnimation: { duration: 200, easing: "ease" }, children: E ? /* @__PURE__ */ e("div", { className: "rotate-2 opacity-90 shadow-2xl ring-2 ring-primary/60 rounded-lg pointer-events-none w-72", children: /* @__PURE__ */ d("div", { className: "bg-card border border-border rounded-lg p-3 space-y-1", children: [
|
|
2862
|
-
/* @__PURE__ */ e("p", { className: "font-medium text-sm", children: E.title }),
|
|
2863
|
-
E.description && /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground line-clamp-2", children: E.description })
|
|
2864
|
-
] }) }) : null })
|
|
2865
|
-
]
|
|
2866
|
-
}
|
|
2867
|
-
);
|
|
2868
|
-
}, Pa = ({
|
|
2869
|
-
isOpen: t,
|
|
2870
|
-
onClose: a,
|
|
2871
|
-
onConfirm: n,
|
|
2872
|
-
title: i,
|
|
2873
|
-
message: o,
|
|
2874
|
-
description: u
|
|
2875
|
-
}) => {
|
|
2876
|
-
const { t: y } = ye(), h = () => {
|
|
2877
|
-
n(), a();
|
|
2878
|
-
};
|
|
2879
|
-
return /* @__PURE__ */ e(
|
|
2880
|
-
tt,
|
|
2881
|
-
{
|
|
2882
|
-
isOpen: t,
|
|
2883
|
-
onClose: a,
|
|
2884
|
-
title: i || y("confirm_delete") || "Confirm Delete",
|
|
2885
|
-
size: "sm",
|
|
2886
|
-
footer: /* @__PURE__ */ d("div", { className: "flex justify-end gap-2", children: [
|
|
2887
|
-
/* @__PURE__ */ e($, { variant: "ghost", onClick: a, children: y("cancel") || "Cancel" }),
|
|
2888
|
-
/* @__PURE__ */ e($, { variant: "destructive", onClick: h, children: y("delete") || "Delete" })
|
|
2889
|
-
] }),
|
|
2890
|
-
children: /* @__PURE__ */ d("div", { className: "py-2", children: [
|
|
2891
|
-
/* @__PURE__ */ e("p", { children: o || y("confirm_delete_message") || "Are you sure you want to delete this item?" }),
|
|
2892
|
-
(u || y("action_cannot_be_undone")) && /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground mt-2", children: u || y("action_cannot_be_undone") || "This action cannot be undone." })
|
|
2893
|
-
] })
|
|
2894
|
-
}
|
|
2895
|
-
);
|
|
2896
|
-
}, Qa = new Ct(), ja = Xe((t, a) => {
|
|
2897
|
-
const { className: n, readOnly: i, ...o } = t;
|
|
2898
|
-
return kt(), /* @__PURE__ */ e(yt, { client: Qa, children: /* @__PURE__ */ e(xt, { fallback: /* @__PURE__ */ e(va, {}), children: /* @__PURE__ */ e(gt, { ref: a, className: n, readOnly: i, ...o }) }) });
|
|
2899
|
-
});
|
|
2900
|
-
ja.displayName = "EzKanban";
|
|
2901
|
-
const gt = Xe((t, a) => {
|
|
2902
|
-
const { className: n, readOnly: i, onCardClick: o, onCardDoubleClick: u } = t, y = Da(t, a), { state: h, actions: f, dir: k, imperativeAPI: x } = y, [C, B] = q(!1), [c, w] = q(void 0), [N, I] = q(!1), [r, s] = q(null);
|
|
2903
|
-
ft(a, () => x, [x]);
|
|
2904
|
-
const l = (S) => {
|
|
2905
|
-
const V = S || h.selectedColumnId || h.board.columns[0]?.id;
|
|
2906
|
-
w({
|
|
2907
|
-
columnId: V,
|
|
2908
|
-
title: "",
|
|
2909
|
-
description: "",
|
|
2910
|
-
priority: "medium"
|
|
2911
|
-
}), B(!0);
|
|
2912
|
-
}, m = async (S) => {
|
|
2913
|
-
S.id ? await f.updateCard(S.id, S) : await f.createCard(S), B(!1);
|
|
2914
|
-
}, v = (S) => {
|
|
2915
|
-
t.confirmOnDelete !== !1 ? (s(S), I(!0), B(!1)) : (f.deleteCard(S), B(!1));
|
|
2916
|
-
}, D = async () => {
|
|
2917
|
-
r && (await f.deleteCard(r), I(!1), s(null));
|
|
2918
|
-
}, _ = (S) => {
|
|
2919
|
-
i || (w(S), B(!0)), o?.(S);
|
|
2920
|
-
}, E = (S) => {
|
|
2921
|
-
const V = h.board.columns.find((U) => U.id === S);
|
|
2922
|
-
V && (V.isCollapsed ? f.expandColumn(S) : f.collapseColumn(S));
|
|
2923
|
-
}, T = (S) => {
|
|
2924
|
-
const V = h.board.swimlanes?.find((U) => U.id === S);
|
|
2925
|
-
V && (V.isCollapsed ? f.expandSwimlane(S) : f.collapseSwimlane(S));
|
|
2926
|
-
};
|
|
2927
|
-
return /* @__PURE__ */ d("div", { className: j("flex flex-col h-full bg-background", n), dir: k, children: [
|
|
2928
|
-
/* @__PURE__ */ e(je, {}),
|
|
2929
|
-
/* @__PURE__ */ e(je, {}),
|
|
2930
|
-
!i && (t.slots?.toolbar ? /* @__PURE__ */ e(
|
|
2931
|
-
t.slots.toolbar,
|
|
2932
|
-
{
|
|
2933
|
-
searchQuery: h.searchQuery,
|
|
2934
|
-
onSearchChange: f.setSearchQuery,
|
|
2935
|
-
onAddCardClick: () => l(),
|
|
2936
|
-
onAddColumn: () => {
|
|
2937
|
-
f.createColumn({
|
|
2938
|
-
name: "New Column",
|
|
2939
|
-
position: h.board.columns.length
|
|
2940
|
-
}).then((S) => {
|
|
2941
|
-
f.setSelectedColumnId(S.id);
|
|
2942
|
-
});
|
|
2943
|
-
},
|
|
2944
|
-
activeFilters: h.activeFilters,
|
|
2945
|
-
onFiltersChange: f.setActiveFilters,
|
|
2946
|
-
view: h.view,
|
|
2947
|
-
onViewChange: f.setView,
|
|
2948
|
-
onUndo: f.undo,
|
|
2949
|
-
onRedo: f.redo,
|
|
2950
|
-
canUndo: h.canUndo,
|
|
2951
|
-
canRedo: h.canRedo,
|
|
2952
|
-
...t.slotProps?.toolbar || {}
|
|
2953
|
-
}
|
|
2954
|
-
) : /* @__PURE__ */ e(
|
|
2955
|
-
Ta,
|
|
2956
|
-
{
|
|
2957
|
-
searchQuery: h.searchQuery,
|
|
2958
|
-
onSearchChange: f.setSearchQuery,
|
|
2959
|
-
onAddCardClick: () => l(),
|
|
2960
|
-
onAddColumn: () => {
|
|
2961
|
-
f.createColumn({
|
|
2962
|
-
name: "New Column",
|
|
2963
|
-
position: h.board.columns.length
|
|
2964
|
-
}).then((S) => {
|
|
2965
|
-
f.setSelectedColumnId(S.id);
|
|
2966
|
-
});
|
|
2967
|
-
},
|
|
2968
|
-
activeFilters: h.activeFilters,
|
|
2969
|
-
onFiltersChange: f.setActiveFilters,
|
|
2970
|
-
view: h.view,
|
|
2971
|
-
onViewChange: f.setView,
|
|
2972
|
-
onUndo: f.undo,
|
|
2973
|
-
onRedo: f.redo,
|
|
2974
|
-
canUndo: h.canUndo,
|
|
2975
|
-
canRedo: h.canRedo
|
|
2976
|
-
}
|
|
2977
|
-
)),
|
|
2978
|
-
/* @__PURE__ */ e("div", { className: "flex-1 overflow-hidden h-full", children: t.slots?.board ? /* @__PURE__ */ e(
|
|
2979
|
-
t.slots.board,
|
|
2980
|
-
{
|
|
2981
|
-
board: h.board,
|
|
2982
|
-
onCardClick: _,
|
|
2983
|
-
onCardDoubleClick: u,
|
|
2984
|
-
onCardDragStart: f.handleDragStart,
|
|
2985
|
-
onCardDragEnd: f.handleDragEnd,
|
|
2986
|
-
onCardDrop: f.handleDrop,
|
|
2987
|
-
onAddCard: l,
|
|
2988
|
-
onToggleColumnCollapse: E,
|
|
2989
|
-
onToggleSwimlaneCollapse: T,
|
|
2990
|
-
onDeleteColumn: f.deleteColumn,
|
|
2991
|
-
onUpdateColumn: f.updateColumn,
|
|
2992
|
-
onColumnClick: f.setSelectedColumnId,
|
|
2993
|
-
onCreateCard: m,
|
|
2994
|
-
selectedColumnId: h.selectedColumnId,
|
|
2995
|
-
draggedCardId: h.draggedCard?.id,
|
|
2996
|
-
filteredCards: h.filteredCards,
|
|
2997
|
-
slots: t.slots,
|
|
2998
|
-
slotProps: t.slotProps,
|
|
2999
|
-
view: h.view,
|
|
3000
|
-
dir: k,
|
|
3001
|
-
className: "flex-1 h-full",
|
|
3002
|
-
...t.slotProps?.board || {}
|
|
3003
|
-
}
|
|
3004
|
-
) : /* @__PURE__ */ e(
|
|
3005
|
-
La,
|
|
3006
|
-
{
|
|
3007
|
-
board: h.board,
|
|
3008
|
-
onCardClick: _,
|
|
3009
|
-
onCardDoubleClick: u,
|
|
3010
|
-
onCardDragStart: f.handleDragStart,
|
|
3011
|
-
onCardDragEnd: f.handleDragEnd,
|
|
3012
|
-
onCardDrop: f.handleDrop,
|
|
3013
|
-
onAddCard: l,
|
|
3014
|
-
onToggleColumnCollapse: E,
|
|
3015
|
-
onToggleSwimlaneCollapse: T,
|
|
3016
|
-
onDeleteColumn: f.deleteColumn,
|
|
3017
|
-
onUpdateColumn: f.updateColumn,
|
|
3018
|
-
onColumnClick: f.setSelectedColumnId,
|
|
3019
|
-
onCreateCard: m,
|
|
3020
|
-
selectedColumnId: h.selectedColumnId,
|
|
3021
|
-
draggedCardId: h.draggedCard?.id,
|
|
3022
|
-
filteredCards: h.filteredCards,
|
|
3023
|
-
slots: t.slots,
|
|
3024
|
-
slotProps: t.slotProps,
|
|
3025
|
-
view: h.view,
|
|
3026
|
-
dir: k,
|
|
3027
|
-
className: "flex-1 h-full"
|
|
3028
|
-
}
|
|
3029
|
-
) }),
|
|
3030
|
-
t.slots?.cardEditor ? /* @__PURE__ */ e(
|
|
3031
|
-
t.slots.cardEditor,
|
|
3032
|
-
{
|
|
3033
|
-
isOpen: C,
|
|
3034
|
-
onClose: () => B(!1),
|
|
3035
|
-
onSave: m,
|
|
3036
|
-
onDelete: v,
|
|
3037
|
-
card: c,
|
|
3038
|
-
columns: h.board.columns,
|
|
3039
|
-
...t.slotProps?.cardEditor || {}
|
|
3040
|
-
}
|
|
3041
|
-
) : /* @__PURE__ */ e(
|
|
3042
|
-
Ba,
|
|
3043
|
-
{
|
|
3044
|
-
isOpen: C,
|
|
3045
|
-
onClose: () => B(!1),
|
|
3046
|
-
onSave: m,
|
|
3047
|
-
onDelete: v,
|
|
3048
|
-
card: c,
|
|
3049
|
-
columns: h.board.columns
|
|
3050
|
-
}
|
|
3051
|
-
),
|
|
3052
|
-
/* @__PURE__ */ e(
|
|
3053
|
-
Pa,
|
|
3054
|
-
{
|
|
3055
|
-
isOpen: N,
|
|
3056
|
-
onClose: () => I(!1),
|
|
3057
|
-
onConfirm: D,
|
|
3058
|
-
title: "Confirm Delete",
|
|
3059
|
-
message: "Are you sure you want to delete this card?",
|
|
3060
|
-
description: "This action cannot be undone."
|
|
3061
|
-
}
|
|
3062
|
-
)
|
|
3063
|
-
] });
|
|
3064
|
-
});
|
|
3065
|
-
gt.displayName = "EzKanbanInner";
|
|
3066
|
-
export {
|
|
3067
|
-
ot as B,
|
|
3068
|
-
Pe as C,
|
|
3069
|
-
ja as E,
|
|
3070
|
-
La as K,
|
|
3071
|
-
mt as S,
|
|
3072
|
-
lt as T,
|
|
3073
|
-
Ke as a,
|
|
3074
|
-
_a as b,
|
|
3075
|
-
Va as c,
|
|
3076
|
-
ct as d,
|
|
3077
|
-
Ea as e,
|
|
3078
|
-
ht as f,
|
|
3079
|
-
Ba as g,
|
|
3080
|
-
$a as h,
|
|
3081
|
-
ve as i,
|
|
3082
|
-
dt as j,
|
|
3083
|
-
fe as k,
|
|
3084
|
-
Te as l,
|
|
3085
|
-
Aa as m,
|
|
3086
|
-
Da as n,
|
|
3087
|
-
ye as o,
|
|
3088
|
-
Ze as p,
|
|
3089
|
-
Ra as q,
|
|
3090
|
-
Ta as r,
|
|
3091
|
-
Ia as u
|
|
3092
|
-
};
|