kanbase 0.0.7 → 0.0.9
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/index.d.ts +22 -22
- package/dist/kanbase.es.js +544 -1525
- package/dist/kanbase.es.js.map +1 -1
- package/dist/kanbase.umd.js +1 -1
- package/dist/kanbase.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/kanbase.es.js
CHANGED
|
@@ -2,270 +2,272 @@ import { jsxs as i, jsx as r, Fragment as Re } from "react/jsx-runtime";
|
|
|
2
2
|
import { useSensors as Te, useSensor as ne, MouseSensor as Me, TouchSensor as Ve, KeyboardSensor as Be, DndContext as He, MeasuringStrategy as qe, DragOverlay as $e, closestCenter as ae, pointerWithin as Le, rectIntersection as Ge, getFirstCollision as Ke, useDroppable as We } from "@dnd-kit/core";
|
|
3
3
|
import { useSortable as ge, SortableContext as he, verticalListSortingStrategy as Qe, horizontalListSortingStrategy as Ue } from "@dnd-kit/sortable";
|
|
4
4
|
import { useVirtualizer as fe } from "@tanstack/react-virtual";
|
|
5
|
-
import { MoreHorizontal as be, Calendar as Ce, MessageSquare as Pe, Paperclip as _e, GripVertical as Je, Plus as G, X as Q, Trash2 as oe, Save as
|
|
5
|
+
import { MoreHorizontal as be, Calendar as Ce, MessageSquare as Pe, Paperclip as _e, GripVertical as Je, Plus as G, X as Q, Trash2 as oe, Save as xe, AlignLeft as Xe, User as Ye, Tag as Ze, Info as et, RotateCcw as tt, Filter as ce } from "lucide-react";
|
|
6
6
|
import * as R from "react";
|
|
7
7
|
import { useState as D, useCallback as Y, useRef as j, useEffect as L, memo as M, useMemo as $, cloneElement as rt, isValidElement as nt } from "react";
|
|
8
|
-
import { clsx as
|
|
8
|
+
import { clsx as ve } from "clsx";
|
|
9
9
|
import { twMerge as we } from "tailwind-merge";
|
|
10
10
|
import { create as at } from "zustand";
|
|
11
11
|
import { devtools as lt } from "zustand/middleware";
|
|
12
12
|
import { CSS as ye } from "@dnd-kit/utilities";
|
|
13
|
-
import * as
|
|
13
|
+
import * as v from "@radix-ui/react-dialog";
|
|
14
14
|
import { Slot as ot } from "@radix-ui/react-slot";
|
|
15
15
|
import { cva as Ne } from "class-variance-authority";
|
|
16
|
-
function
|
|
17
|
-
return we(
|
|
16
|
+
function S(...t) {
|
|
17
|
+
return we(ve(t));
|
|
18
18
|
}
|
|
19
|
-
const Z = () => `${Date.now()}-${Math.random().toString(36).substr(2, 9)}`, B = at()(
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
columns
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
cardIds: [...c.cardIds, a]
|
|
51
|
-
}
|
|
19
|
+
const Z = () => `${Date.now()}-${Math.random().toString(36).substr(2, 9)}`, B = at()(lt((t) => ({
|
|
20
|
+
cards: {},
|
|
21
|
+
columns: {},
|
|
22
|
+
columnOrder: [],
|
|
23
|
+
config: {},
|
|
24
|
+
activeId: null,
|
|
25
|
+
viewingCardId: null,
|
|
26
|
+
editingCardId: null,
|
|
27
|
+
addingCardInColumnId: null,
|
|
28
|
+
editingColumnId: null,
|
|
29
|
+
// Initial Filter State
|
|
30
|
+
filters: {
|
|
31
|
+
searchQuery: "",
|
|
32
|
+
groups: [],
|
|
33
|
+
quickFilters: []
|
|
34
|
+
},
|
|
35
|
+
// === CARDS ===
|
|
36
|
+
addCard: (e, n) => {
|
|
37
|
+
const a = Z(), o = {
|
|
38
|
+
id: a,
|
|
39
|
+
...n
|
|
40
|
+
};
|
|
41
|
+
return t((l) => {
|
|
42
|
+
const c = l.columns[e];
|
|
43
|
+
return c ? {
|
|
44
|
+
cards: { ...l.cards, [a]: o },
|
|
45
|
+
columns: {
|
|
46
|
+
...l.columns,
|
|
47
|
+
[e]: {
|
|
48
|
+
...c,
|
|
49
|
+
cardIds: [...c.cardIds, a]
|
|
52
50
|
}
|
|
53
|
-
} : l;
|
|
54
|
-
}), a;
|
|
55
|
-
},
|
|
56
|
-
updateCard: (e, n) => t((a) => {
|
|
57
|
-
const o = a.cards[e];
|
|
58
|
-
return o ? {
|
|
59
|
-
cards: {
|
|
60
|
-
...a.cards,
|
|
61
|
-
[e]: { ...o, ...n }
|
|
62
51
|
}
|
|
63
|
-
} :
|
|
64
|
-
}),
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
if (!o) return a;
|
|
82
|
-
const l = Object.keys(a.columns).find(
|
|
83
|
-
(s) => a.columns[s].cardIds.includes(e)
|
|
84
|
-
);
|
|
85
|
-
if (!l) return a;
|
|
86
|
-
n = Z();
|
|
87
|
-
const c = {
|
|
88
|
-
...o,
|
|
89
|
-
id: n,
|
|
90
|
-
title: `${o.title} (copy)`
|
|
91
|
-
}, p = a.columns[l], u = p.cardIds.indexOf(e), d = [...p.cardIds];
|
|
92
|
-
return d.splice(u + 1, 0, n), {
|
|
93
|
-
cards: { ...a.cards, [n]: c },
|
|
94
|
-
columns: {
|
|
95
|
-
...a.columns,
|
|
96
|
-
[l]: {
|
|
97
|
-
...p,
|
|
98
|
-
cardIds: d
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
};
|
|
102
|
-
}), n;
|
|
103
|
-
},
|
|
104
|
-
// === COLUMNS ===
|
|
105
|
-
addColumn: (e, n) => {
|
|
106
|
-
const a = Z(), o = {
|
|
107
|
-
id: a,
|
|
108
|
-
...e,
|
|
109
|
-
cardIds: []
|
|
52
|
+
} : l;
|
|
53
|
+
}), a;
|
|
54
|
+
},
|
|
55
|
+
updateCard: (e, n) => t((a) => {
|
|
56
|
+
const o = a.cards[e];
|
|
57
|
+
return o ? {
|
|
58
|
+
cards: {
|
|
59
|
+
...a.cards,
|
|
60
|
+
[e]: { ...o, ...n }
|
|
61
|
+
}
|
|
62
|
+
} : a;
|
|
63
|
+
}),
|
|
64
|
+
deleteCard: (e) => t((n) => {
|
|
65
|
+
const { [e]: a, ...o } = n.cards, l = { ...n.columns };
|
|
66
|
+
return Object.keys(l).forEach((c) => {
|
|
67
|
+
l[c] = {
|
|
68
|
+
...l[c],
|
|
69
|
+
cardIds: l[c].cardIds.filter((p) => p !== e)
|
|
110
70
|
};
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
71
|
+
}), {
|
|
72
|
+
cards: o,
|
|
73
|
+
columns: l
|
|
74
|
+
};
|
|
75
|
+
}),
|
|
76
|
+
duplicateCard: (e) => {
|
|
77
|
+
let n = "";
|
|
78
|
+
return t((a) => {
|
|
79
|
+
const o = a.cards[e];
|
|
80
|
+
if (!o)
|
|
81
|
+
return a;
|
|
82
|
+
const l = Object.keys(a.columns).find((d) => a.columns[d].cardIds.includes(e));
|
|
83
|
+
if (!l)
|
|
84
|
+
return a;
|
|
85
|
+
n = Z();
|
|
86
|
+
const c = {
|
|
87
|
+
...o,
|
|
88
|
+
id: n,
|
|
89
|
+
title: `${o.title} (copy)`
|
|
90
|
+
}, p = a.columns[l], u = p.cardIds.indexOf(e), s = [...p.cardIds];
|
|
91
|
+
return s.splice(u + 1, 0, n), {
|
|
92
|
+
cards: { ...a.cards, [n]: c },
|
|
122
93
|
columns: {
|
|
123
94
|
...a.columns,
|
|
124
|
-
[
|
|
95
|
+
[l]: {
|
|
96
|
+
...p,
|
|
97
|
+
cardIds: s
|
|
98
|
+
}
|
|
125
99
|
}
|
|
126
|
-
} : a;
|
|
127
|
-
}),
|
|
128
|
-
deleteColumn: (e, n) => t((a) => {
|
|
129
|
-
const o = a.columns[e];
|
|
130
|
-
if (!o) return a;
|
|
131
|
-
const { [e]: l, ...c } = a.columns, p = a.columnOrder.filter((s) => s !== e);
|
|
132
|
-
let u = { ...a.cards }, d = { ...c };
|
|
133
|
-
if (n && d[n]) {
|
|
134
|
-
const s = d[n];
|
|
135
|
-
d[n] = {
|
|
136
|
-
...s,
|
|
137
|
-
cardIds: [...s.cardIds, ...o.cardIds]
|
|
138
|
-
}, o.cardIds.forEach((g) => {
|
|
139
|
-
u[g] && (u[g] = { ...u[g], previousColumnId: e });
|
|
140
|
-
});
|
|
141
|
-
} else {
|
|
142
|
-
const s = p.length > 0 ? p[0] : null;
|
|
143
|
-
o.cardIds.forEach((g) => {
|
|
144
|
-
const h = u[g];
|
|
145
|
-
if (!h) return;
|
|
146
|
-
const f = h.previousColumnId && d[h.previousColumnId] ? h.previousColumnId : s;
|
|
147
|
-
if (f && d[f]) {
|
|
148
|
-
const m = d[f];
|
|
149
|
-
d[f] = {
|
|
150
|
-
...m,
|
|
151
|
-
cardIds: [...m.cardIds, g]
|
|
152
|
-
}, u[g] = { ...h };
|
|
153
|
-
} else
|
|
154
|
-
delete u[g];
|
|
155
|
-
});
|
|
156
|
-
}
|
|
157
|
-
return {
|
|
158
|
-
cards: u,
|
|
159
|
-
columns: d,
|
|
160
|
-
columnOrder: p
|
|
161
100
|
};
|
|
162
|
-
}),
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
101
|
+
}), n;
|
|
102
|
+
},
|
|
103
|
+
// === COLUMNS ===
|
|
104
|
+
addColumn: (e, n) => {
|
|
105
|
+
const a = Z(), o = {
|
|
106
|
+
id: a,
|
|
107
|
+
...e,
|
|
108
|
+
cardIds: []
|
|
109
|
+
};
|
|
110
|
+
return t((l) => {
|
|
111
|
+
const c = [...l.columnOrder], p = n ?? c.length;
|
|
112
|
+
return c.splice(p, 0, a), {
|
|
113
|
+
columns: { ...l.columns, [a]: o },
|
|
114
|
+
columnOrder: c
|
|
115
|
+
};
|
|
116
|
+
}), a;
|
|
117
|
+
},
|
|
118
|
+
updateColumn: (e, n) => t((a) => {
|
|
119
|
+
const o = a.columns[e];
|
|
120
|
+
return o ? {
|
|
121
|
+
columns: {
|
|
122
|
+
...a.columns,
|
|
123
|
+
[e]: { ...o, ...n }
|
|
124
|
+
}
|
|
125
|
+
} : a;
|
|
126
|
+
}),
|
|
127
|
+
deleteColumn: (e, n) => t((a) => {
|
|
128
|
+
const o = a.columns[e];
|
|
129
|
+
if (!o)
|
|
130
|
+
return a;
|
|
131
|
+
const { [e]: l, ...c } = a.columns, p = a.columnOrder.filter((d) => d !== e);
|
|
132
|
+
let u = { ...a.cards }, s = { ...c };
|
|
133
|
+
if (n && s[n]) {
|
|
134
|
+
const d = s[n];
|
|
135
|
+
s[n] = {
|
|
136
|
+
...d,
|
|
137
|
+
cardIds: [...d.cardIds, ...o.cardIds]
|
|
138
|
+
}, o.cardIds.forEach((g) => {
|
|
139
|
+
u[g] && (u[g] = { ...u[g], previousColumnId: e });
|
|
140
|
+
});
|
|
141
|
+
} else {
|
|
142
|
+
const d = p.length > 0 ? p[0] : null;
|
|
143
|
+
o.cardIds.forEach((g) => {
|
|
144
|
+
const h = u[g];
|
|
145
|
+
if (!h)
|
|
146
|
+
return;
|
|
147
|
+
const f = h.previousColumnId && s[h.previousColumnId] ? h.previousColumnId : d;
|
|
148
|
+
if (f && s[f]) {
|
|
149
|
+
const m = s[f];
|
|
150
|
+
s[f] = {
|
|
151
|
+
...m,
|
|
152
|
+
cardIds: [...m.cardIds, g]
|
|
153
|
+
}, u[g] = { ...h };
|
|
154
|
+
} else
|
|
155
|
+
delete u[g];
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
return {
|
|
159
|
+
cards: u,
|
|
160
|
+
columns: s,
|
|
161
|
+
columnOrder: p
|
|
162
|
+
};
|
|
163
|
+
}),
|
|
164
|
+
// === MOVEMENT ===
|
|
165
|
+
moveCard: (e, n, a, o) => t((l) => {
|
|
166
|
+
const c = l.columns[n], p = l.columns[a];
|
|
167
|
+
if (!c || !p)
|
|
168
|
+
return l;
|
|
169
|
+
const u = c.cardIds.filter((g) => g !== e);
|
|
170
|
+
if (n === a)
|
|
171
|
+
return u.splice(o, 0, e), {
|
|
180
172
|
...l,
|
|
181
|
-
cards: { ...l.cards, [e]: s },
|
|
182
173
|
columns: {
|
|
183
174
|
...l.columns,
|
|
184
|
-
[n]: { ...c, cardIds: u }
|
|
185
|
-
[a]: { ...p, cardIds: d }
|
|
175
|
+
[n]: { ...c, cardIds: u }
|
|
186
176
|
}
|
|
187
177
|
};
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
...a,
|
|
199
|
-
cardIds: [e]
|
|
200
|
-
}, d = l.cardIds.filter((h) => h !== e), s = Array.from(o.columnOrder);
|
|
201
|
-
s.push(p);
|
|
202
|
-
const g = { ...c, previousColumnId: n };
|
|
203
|
-
return {
|
|
204
|
-
...o,
|
|
205
|
-
cards: { ...o.cards, [e]: g },
|
|
206
|
-
columns: {
|
|
207
|
-
...o.columns,
|
|
208
|
-
[n]: { ...l, cardIds: d },
|
|
209
|
-
[p]: u
|
|
210
|
-
},
|
|
211
|
-
columnOrder: s
|
|
212
|
-
};
|
|
213
|
-
}),
|
|
214
|
-
// === FILTERS ===
|
|
215
|
-
setSearchQuery: (e) => t((n) => ({
|
|
216
|
-
filters: { ...n.filters, searchQuery: e }
|
|
217
|
-
})),
|
|
218
|
-
addFilterGroup: (e) => t((n) => ({
|
|
219
|
-
filters: { ...n.filters, groups: [...n.filters.groups, e] }
|
|
220
|
-
})),
|
|
221
|
-
updateFilterGroup: (e, n) => t((a) => ({
|
|
222
|
-
filters: {
|
|
223
|
-
...a.filters,
|
|
224
|
-
groups: a.filters.groups.map((o) => o.id === e ? { ...o, ...n } : o)
|
|
178
|
+
const s = [...p.cardIds];
|
|
179
|
+
s.splice(o, 0, e);
|
|
180
|
+
const d = { ...l.cards[e], previousColumnId: n };
|
|
181
|
+
return {
|
|
182
|
+
...l,
|
|
183
|
+
cards: { ...l.cards, [e]: d },
|
|
184
|
+
columns: {
|
|
185
|
+
...l.columns,
|
|
186
|
+
[n]: { ...c, cardIds: u },
|
|
187
|
+
[a]: { ...p, cardIds: s }
|
|
225
188
|
}
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
189
|
+
};
|
|
190
|
+
}),
|
|
191
|
+
moveColumn: (e, n) => t((a) => {
|
|
192
|
+
const o = a.columnOrder.filter((l) => l !== e);
|
|
193
|
+
return o.splice(n, 0, e), { ...a, columnOrder: o };
|
|
194
|
+
}),
|
|
195
|
+
addColumnWithCard: (e, n, a) => t((o) => {
|
|
196
|
+
const l = o.columns[n], c = o.cards[e];
|
|
197
|
+
if (!l || !c)
|
|
198
|
+
return o;
|
|
199
|
+
const p = Z(), u = {
|
|
200
|
+
id: p,
|
|
201
|
+
...a,
|
|
202
|
+
cardIds: [e]
|
|
203
|
+
}, s = l.cardIds.filter((h) => h !== e), d = Array.from(o.columnOrder);
|
|
204
|
+
d.push(p);
|
|
205
|
+
const g = { ...c, previousColumnId: n };
|
|
206
|
+
return {
|
|
207
|
+
...o,
|
|
208
|
+
cards: { ...o.cards, [e]: g },
|
|
209
|
+
columns: {
|
|
210
|
+
...o.columns,
|
|
211
|
+
[n]: { ...l, cardIds: s },
|
|
212
|
+
[p]: u
|
|
213
|
+
},
|
|
214
|
+
columnOrder: d
|
|
215
|
+
};
|
|
216
|
+
}),
|
|
217
|
+
// === FILTERS ===
|
|
218
|
+
setSearchQuery: (e) => t((n) => ({
|
|
219
|
+
filters: { ...n.filters, searchQuery: e }
|
|
220
|
+
})),
|
|
221
|
+
addFilterGroup: (e) => t((n) => ({
|
|
222
|
+
filters: { ...n.filters, groups: [...n.filters.groups, e] }
|
|
223
|
+
})),
|
|
224
|
+
updateFilterGroup: (e, n) => t((a) => ({
|
|
225
|
+
filters: {
|
|
226
|
+
...a.filters,
|
|
227
|
+
groups: a.filters.groups.map((o) => o.id === e ? { ...o, ...n } : o)
|
|
228
|
+
}
|
|
229
|
+
})),
|
|
230
|
+
removeFilterGroup: (e) => t((n) => ({
|
|
231
|
+
filters: { ...n.filters, groups: n.filters.groups.filter((a) => a.id !== e) }
|
|
232
|
+
})),
|
|
233
|
+
removeFilterRule: (e, n) => t((a) => ({
|
|
234
|
+
filters: {
|
|
235
|
+
...a.filters,
|
|
236
|
+
groups: a.filters.groups.map((o) => o.id !== e ? o : {
|
|
237
|
+
...o,
|
|
238
|
+
rules: o.rules.filter((l) => !("id" in l) || l.id !== n)
|
|
239
|
+
})
|
|
240
|
+
}
|
|
241
|
+
})),
|
|
242
|
+
setFilters: (e) => t({ filters: e }),
|
|
243
|
+
clearFilters: () => t((e) => ({
|
|
244
|
+
filters: { ...e.filters, groups: [], searchQuery: "" }
|
|
245
|
+
})),
|
|
246
|
+
// === UTILITY ===
|
|
247
|
+
setBoardData: (e) => t({ ...e }),
|
|
248
|
+
setConfig: (e) => t((n) => ({ config: { ...n.config, ...e } })),
|
|
249
|
+
setActiveId: (e) => t({ activeId: e }),
|
|
250
|
+
setViewingCardId: (e) => t({ viewingCardId: e }),
|
|
251
|
+
clearViewingCardId: () => t({ viewingCardId: null }),
|
|
252
|
+
setEditingCardId: (e) => t({ editingCardId: e }),
|
|
253
|
+
clearEditingCardId: () => t({ editingCardId: null }),
|
|
254
|
+
setAddingCardInColumnId: (e) => t({ addingCardInColumnId: e }),
|
|
255
|
+
clearAddingCardInColumnId: () => t({ addingCardInColumnId: null }),
|
|
256
|
+
setEditingColumnId: (e) => t({ editingColumnId: e }),
|
|
257
|
+
clearEditingColumnId: () => t({ editingColumnId: null }),
|
|
258
|
+
clearBoard: () => t({
|
|
259
|
+
cards: {},
|
|
260
|
+
columns: {},
|
|
261
|
+
columnOrder: [],
|
|
262
|
+
filters: { searchQuery: "", groups: [], quickFilters: [] }
|
|
263
|
+
})
|
|
264
|
+
})));
|
|
263
265
|
function it(t) {
|
|
264
266
|
const e = B(), [n, a] = D(null), [o, l] = D(null), [c, p] = D(null), u = Y((h) => {
|
|
265
267
|
a(h);
|
|
266
|
-
}, []),
|
|
268
|
+
}, []), s = Y((h, f) => {
|
|
267
269
|
l(h), p(f ?? null);
|
|
268
|
-
}, []),
|
|
270
|
+
}, []), d = Y(() => {
|
|
269
271
|
a(null), l(null), p(null);
|
|
270
272
|
}, []), g = Y((h, f, m, b) => {
|
|
271
273
|
e.moveCard(h, f, m, b), t?.onCardMove?.(h, f, m, b);
|
|
@@ -285,8 +287,8 @@ function it(t) {
|
|
|
285
287
|
clearViewingCardId: e.clearViewingCardId,
|
|
286
288
|
// Ações de Cards
|
|
287
289
|
handleDragStart: u,
|
|
288
|
-
handleDragOver:
|
|
289
|
-
handleDragEnd:
|
|
290
|
+
handleDragOver: s,
|
|
291
|
+
handleDragEnd: d,
|
|
290
292
|
moveCard: g,
|
|
291
293
|
addCard: e.addCard,
|
|
292
294
|
updateCard: e.updateCard,
|
|
@@ -326,45 +328,29 @@ function it(t) {
|
|
|
326
328
|
}
|
|
327
329
|
};
|
|
328
330
|
}
|
|
329
|
-
function
|
|
330
|
-
|
|
331
|
-
touchActivationDelay: e,
|
|
332
|
-
onDragStart: n,
|
|
333
|
-
onDragOver: a,
|
|
334
|
-
onDragEnd: o,
|
|
335
|
-
onCardMove: l,
|
|
336
|
-
onColumnMove: c,
|
|
337
|
-
onCreateColumnWithCard: p,
|
|
338
|
-
columns: u,
|
|
339
|
-
columnOrder: d,
|
|
340
|
-
recentlyMovedToNewContainer: s
|
|
341
|
-
}) {
|
|
342
|
-
const g = j(u), h = j(d);
|
|
331
|
+
function dt({ dragActivationDistance: t, touchActivationDelay: e, onDragStart: n, onDragOver: a, onDragEnd: o, onCardMove: l, onColumnMove: c, onCreateColumnWithCard: p, columns: u, columnOrder: s, recentlyMovedToNewContainer: d }) {
|
|
332
|
+
const g = j(u), h = j(s);
|
|
343
333
|
L(() => {
|
|
344
|
-
g.current = u, h.current =
|
|
345
|
-
}, [u,
|
|
334
|
+
g.current = u, h.current = s;
|
|
335
|
+
}, [u, s]);
|
|
346
336
|
const f = j(null);
|
|
347
337
|
return {
|
|
348
|
-
sensors: Te(
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
activationConstraint: { delay: e, tolerance: 5 }
|
|
354
|
-
}),
|
|
355
|
-
ne(Be)
|
|
356
|
-
),
|
|
338
|
+
sensors: Te(ne(Me, {
|
|
339
|
+
activationConstraint: { distance: t }
|
|
340
|
+
}), ne(Ve, {
|
|
341
|
+
activationConstraint: { delay: e, tolerance: 5 }
|
|
342
|
+
}), ne(Be)),
|
|
357
343
|
handleDragStart: (C) => {
|
|
358
|
-
const
|
|
359
|
-
f.current = null, n(C.active.id,
|
|
344
|
+
const A = C.active.data.current?.type || "Card";
|
|
345
|
+
f.current = null, n(C.active.id, A);
|
|
360
346
|
},
|
|
361
347
|
handleDragOver: (C) => {
|
|
362
|
-
const { active: y, over:
|
|
363
|
-
if (!
|
|
348
|
+
const { active: y, over: A } = C, V = y.data.current?.type || "Card", F = g.current, ie = h.current;
|
|
349
|
+
if (!A) {
|
|
364
350
|
a(null), f.current = null;
|
|
365
351
|
return;
|
|
366
352
|
}
|
|
367
|
-
const z = y.id, O =
|
|
353
|
+
const z = y.id, O = A.id, K = A.rect, W = y.rect.current.translated;
|
|
368
354
|
let H = null;
|
|
369
355
|
if (W && K)
|
|
370
356
|
if (V === "Column") {
|
|
@@ -377,19 +363,15 @@ function st({
|
|
|
377
363
|
if (a(O, H), V === "Column") {
|
|
378
364
|
let I = O;
|
|
379
365
|
if (!F[O]) {
|
|
380
|
-
const
|
|
381
|
-
|
|
382
|
-
);
|
|
383
|
-
de && (I = de.id);
|
|
366
|
+
const se = Object.values(F).find((je) => je.cardIds.includes(O));
|
|
367
|
+
se && (I = se.id);
|
|
384
368
|
}
|
|
385
|
-
const q = ie.indexOf(I),
|
|
386
|
-
q !== -1 &&
|
|
369
|
+
const q = ie.indexOf(I), de = ie.indexOf(z);
|
|
370
|
+
q !== -1 && de !== -1 && de !== q && (c(z, q), f.current && (f.current.targetIndex = q));
|
|
387
371
|
return;
|
|
388
372
|
}
|
|
389
373
|
if (O === "new-column-drop-target") {
|
|
390
|
-
const I = Object.values(F).find(
|
|
391
|
-
(q) => q.cardIds.includes(z)
|
|
392
|
-
);
|
|
374
|
+
const I = Object.values(F).find((q) => q.cardIds.includes(z));
|
|
393
375
|
I && (f.current = {
|
|
394
376
|
type: "NewColumn",
|
|
395
377
|
activeId: z,
|
|
@@ -398,12 +380,11 @@ function st({
|
|
|
398
380
|
});
|
|
399
381
|
return;
|
|
400
382
|
}
|
|
401
|
-
const T = Object.values(F).find(
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
if (!T) return;
|
|
383
|
+
const T = Object.values(F).find((I) => I.cardIds.includes(z));
|
|
384
|
+
if (!T)
|
|
385
|
+
return;
|
|
405
386
|
if (F[O]) {
|
|
406
|
-
T.id !== O ? (
|
|
387
|
+
T.id !== O ? (d && (d.current = !0), f.current = {
|
|
407
388
|
type: "Card",
|
|
408
389
|
activeId: z,
|
|
409
390
|
sourceColumnId: T.id,
|
|
@@ -414,12 +395,11 @@ function st({
|
|
|
414
395
|
}) : f.current = null;
|
|
415
396
|
return;
|
|
416
397
|
}
|
|
417
|
-
const J = Object.values(F).find(
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
if (!J) return;
|
|
398
|
+
const J = Object.values(F).find((I) => I.cardIds.includes(O));
|
|
399
|
+
if (!J)
|
|
400
|
+
return;
|
|
421
401
|
const X = J.cardIds.indexOf(O), ze = H === "bottom" ? X + 1 : X;
|
|
422
|
-
T.id !== J.id ? (
|
|
402
|
+
T.id !== J.id ? (d && (d.current = !0), f.current = {
|
|
423
403
|
type: "Card",
|
|
424
404
|
activeId: z,
|
|
425
405
|
sourceColumnId: T.id,
|
|
@@ -445,12 +425,11 @@ function st({
|
|
|
445
425
|
}
|
|
446
426
|
};
|
|
447
427
|
}
|
|
448
|
-
function
|
|
428
|
+
function st(t, e) {
|
|
449
429
|
if (e.searchQuery) {
|
|
450
|
-
const n = e.searchQuery.toLowerCase(), a = t.title?.toLowerCase().includes(n), o = t.description?.toLowerCase().includes(n), l = t.metadata && Object.values(t.metadata).some(
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
if (!a && !o && !l) return !1;
|
|
430
|
+
const n = e.searchQuery.toLowerCase(), a = t.title?.toLowerCase().includes(n), o = t.description?.toLowerCase().includes(n), l = t.metadata && Object.values(t.metadata).some((c) => String(c).toLowerCase().includes(n));
|
|
431
|
+
if (!a && !o && !l)
|
|
432
|
+
return !1;
|
|
454
433
|
}
|
|
455
434
|
return e.groups.length === 0 ? !0 : e.groups.every((n) => n.enabled ? le(t, n) : !0);
|
|
456
435
|
}
|
|
@@ -459,7 +438,8 @@ function le(t, e) {
|
|
|
459
438
|
return a.length === 0 ? !0 : n === "and" ? a.every((o) => "conjunction" in o ? le(t, o) : ue(t, o)) : a.some((o) => "conjunction" in o ? le(t, o) : ue(t, o));
|
|
460
439
|
}
|
|
461
440
|
function ue(t, e) {
|
|
462
|
-
if (!e.field || !e.enabled)
|
|
441
|
+
if (!e.field || !e.enabled)
|
|
442
|
+
return !0;
|
|
463
443
|
const n = ct(t, e.field), a = e.value;
|
|
464
444
|
switch (e.operator) {
|
|
465
445
|
case "eq":
|
|
@@ -489,8 +469,8 @@ function ue(t, e) {
|
|
|
489
469
|
function ct(t, e) {
|
|
490
470
|
return e.split(".").reduce((n, a) => n && n[a], t);
|
|
491
471
|
}
|
|
492
|
-
function
|
|
493
|
-
return we(
|
|
472
|
+
function E(...t) {
|
|
473
|
+
return we(ve(t));
|
|
494
474
|
}
|
|
495
475
|
const Ie = M(({ card: t, isDragging: e }) => {
|
|
496
476
|
const { tags: n, members: a, commentsCount: o, attachmentsCount: l, dueDate: c, priority: p } = t.metadata || {}, u = {
|
|
@@ -498,299 +478,60 @@ const Ie = M(({ card: t, isDragging: e }) => {
|
|
|
498
478
|
medium: "bg-amber-500",
|
|
499
479
|
low: "bg-emerald-500"
|
|
500
480
|
};
|
|
501
|
-
return
|
|
502
|
-
"
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
// Priority Indicator on Left
|
|
510
|
-
p && "pl-4"
|
|
511
|
-
),
|
|
512
|
-
children: [
|
|
513
|
-
p && /* @__PURE__ */ r("div", { className: S(
|
|
514
|
-
"absolute left-0 top-3 bottom-3 w-1 rounded-r-full",
|
|
515
|
-
u[p] || "bg-slate-300"
|
|
516
|
-
) }),
|
|
517
|
-
/* @__PURE__ */ i("div", { className: "flex flex-col gap-2.5", children: [
|
|
518
|
-
n && n.length > 0 && /* @__PURE__ */ r("div", { className: "flex flex-wrap gap-1 mb-0.5", children: n.map((d, s) => /* @__PURE__ */ r(
|
|
519
|
-
"span",
|
|
520
|
-
{
|
|
521
|
-
className: S(
|
|
522
|
-
"px-2 py-0.5 rounded-full text-[10px] font-semibold tracking-tight",
|
|
523
|
-
d.color || "bg-slate-100 text-slate-600"
|
|
524
|
-
),
|
|
525
|
-
children: d.name
|
|
526
|
-
},
|
|
527
|
-
s
|
|
528
|
-
)) }),
|
|
529
|
-
/* @__PURE__ */ i("div", { className: "flex items-start justify-between gap-2", children: [
|
|
530
|
-
/* @__PURE__ */ r("h4", { className: "text-sm font-semibold text-slate-800 leading-snug group-hover:text-slate-900 transition-colors", children: t.title }),
|
|
531
|
-
/* @__PURE__ */ r("button", { className: "opacity-0 group-hover:opacity-100 transition-opacity p-1 hover:bg-slate-100 rounded text-slate-400 hover:text-slate-600 -mr-1 -mt-1", children: /* @__PURE__ */ r(be, { size: 14 }) })
|
|
532
|
-
] }),
|
|
533
|
-
t.description && /* @__PURE__ */ r("p", { className: "text-xs text-slate-500 line-clamp-2 leading-relaxed font-medium", children: t.description }),
|
|
534
|
-
(a || o || l || c) && /* @__PURE__ */ i("div", { className: "flex items-center justify-between mt-1 pt-2.5 border-t border-slate-100/80", children: [
|
|
535
|
-
/* @__PURE__ */ r("div", { className: "flex items-center", children: a && a.length > 0 ? /* @__PURE__ */ i("div", { className: "flex -space-x-2 overflow-hidden py-0.5 pl-0.5", children: [
|
|
536
|
-
a.map((d, s) => /* @__PURE__ */ r(
|
|
537
|
-
"div",
|
|
538
|
-
{
|
|
539
|
-
className: "h-6 w-6 rounded-full border-2 border-white bg-slate-200 flex items-center justify-center text-[9px] font-bold text-slate-600 ring-1 ring-slate-100",
|
|
540
|
-
title: d.name,
|
|
541
|
-
children: d.avatar ? /* @__PURE__ */ r("img", { src: d.avatar, alt: d.name, className: "w-full h-full rounded-full object-cover" }) : d.initials
|
|
542
|
-
},
|
|
543
|
-
s
|
|
544
|
-
)),
|
|
545
|
-
a.length > 3 && /* @__PURE__ */ i("div", { className: "h-6 w-6 rounded-full border-2 border-white bg-slate-50 flex items-center justify-center text-[9px] font-bold text-slate-400", children: [
|
|
546
|
-
"+",
|
|
547
|
-
a.length - 3
|
|
548
|
-
] })
|
|
549
|
-
] }) : /* @__PURE__ */ r("div", {}) }),
|
|
550
|
-
/* @__PURE__ */ i("div", { className: "flex items-center gap-3 text-slate-400", children: [
|
|
551
|
-
c && /* @__PURE__ */ i("div", { className: S("flex items-center gap-1 text-[10px] font-medium", new Date(c) < /* @__PURE__ */ new Date() ? "text-red-500" : "text-slate-400"), children: [
|
|
552
|
-
/* @__PURE__ */ r(Ce, { size: 12 }),
|
|
553
|
-
/* @__PURE__ */ r("span", { children: new Date(c).toLocaleDateString(void 0, { month: "short", day: "numeric" }) })
|
|
554
|
-
] }),
|
|
555
|
-
o > 0 && /* @__PURE__ */ i("div", { className: "flex items-center gap-1 text-[10px] font-medium hover:text-slate-600 transition-colors", children: [
|
|
556
|
-
/* @__PURE__ */ r(Pe, { size: 12 }),
|
|
557
|
-
/* @__PURE__ */ r("span", { children: o })
|
|
558
|
-
] }),
|
|
559
|
-
l > 0 && /* @__PURE__ */ i("div", { className: "flex items-center gap-1 text-[10px] font-medium hover:text-slate-600 transition-colors", children: [
|
|
560
|
-
/* @__PURE__ */ r(_e, { size: 12 }),
|
|
561
|
-
/* @__PURE__ */ r("span", { children: l })
|
|
562
|
-
] })
|
|
563
|
-
] })
|
|
564
|
-
] })
|
|
565
|
-
] })
|
|
566
|
-
]
|
|
567
|
-
}
|
|
568
|
-
);
|
|
481
|
+
return i("div", { className: E(
|
|
482
|
+
"group relative bg-card-bg rounded-card border border-card-border p-3",
|
|
483
|
+
"shadow-card transition-all duration-200 cursor-pointer select-none",
|
|
484
|
+
"hover:shadow-card-hover hover:-translate-y-0.5 hover:border-slate-300",
|
|
485
|
+
e && "opacity-50 grayscale-[0.5] scale-[1.02] shadow-xl border-blue-400 ring-1 ring-blue-400 rotate-2 z-50",
|
|
486
|
+
// Priority Indicator on Left
|
|
487
|
+
p && "pl-4"
|
|
488
|
+
), children: [p && r("div", { className: E("absolute left-0 top-3 bottom-3 w-1 rounded-r-full", u[p] || "bg-slate-300") }), i("div", { className: "flex flex-col gap-2.5", children: [n && n.length > 0 && r("div", { className: "flex flex-wrap gap-1 mb-0.5", children: n.map((s, d) => r("span", { className: E("px-2 py-0.5 rounded-full text-[10px] font-semibold tracking-tight", s.color || "bg-slate-100 text-slate-600"), children: s.name }, d)) }), i("div", { className: "flex items-start justify-between gap-2", children: [r("h4", { className: "text-sm font-semibold text-slate-800 leading-snug group-hover:text-slate-900 transition-colors", children: t.title }), r("button", { className: "opacity-0 group-hover:opacity-100 transition-opacity p-1 hover:bg-slate-100 rounded text-slate-400 hover:text-slate-600 -mr-1 -mt-1", children: r(be, { size: 14 }) })] }), t.description && r("p", { className: "text-xs text-slate-500 line-clamp-2 leading-relaxed font-medium", children: t.description }), (a || o || l || c) && i("div", { className: "flex items-center justify-between mt-1 pt-2.5 border-t border-slate-100/80", children: [r("div", { className: "flex items-center", children: a && a.length > 0 ? i("div", { className: "flex -space-x-2 overflow-hidden py-0.5 pl-0.5", children: [a.map((s, d) => r("div", { className: "h-6 w-6 rounded-full border-2 border-white bg-slate-200 flex items-center justify-center text-[9px] font-bold text-slate-600 ring-1 ring-slate-100", title: s.name, children: s.avatar ? r("img", { src: s.avatar, alt: s.name, className: "w-full h-full rounded-full object-cover" }) : s.initials }, d)), a.length > 3 && i("div", { className: "h-6 w-6 rounded-full border-2 border-white bg-slate-50 flex items-center justify-center text-[9px] font-bold text-slate-400", children: ["+", a.length - 3] })] }) : r("div", {}) }), i("div", { className: "flex items-center gap-3 text-slate-400", children: [c && i("div", { className: E("flex items-center gap-1 text-[10px] font-medium", new Date(c) < /* @__PURE__ */ new Date() ? "text-red-500" : "text-slate-400"), children: [r(Ce, { size: 12 }), r("span", { children: new Date(c).toLocaleDateString(void 0, { month: "short", day: "numeric" }) })] }), o > 0 && i("div", { className: "flex items-center gap-1 text-[10px] font-medium hover:text-slate-600 transition-colors", children: [r(Pe, { size: 12 }), r("span", { children: o })] }), l > 0 && i("div", { className: "flex items-center gap-1 text-[10px] font-medium hover:text-slate-600 transition-colors", children: [r(_e, { size: 12 }), r("span", { children: l })] })] })] })] })] });
|
|
569
489
|
}, (t, e) => t.card.id === e.card.id && t.card.title === e.card.title && t.card.description === e.card.description && t.isDragging === e.isDragging && JSON.stringify(t.card.metadata) === JSON.stringify(e.card.metadata));
|
|
570
490
|
Ie.displayName = "DefaultCard";
|
|
571
|
-
const De = M(() =>
|
|
491
|
+
const De = M(() => r("div", { className: "flex items-center justify-center h-32 text-slate-400 text-sm", children: "Arraste cards aqui" }));
|
|
572
492
|
De.displayName = "DefaultColumnEmpty";
|
|
573
|
-
const
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
{
|
|
581
|
-
...a.attributes,
|
|
582
|
-
...a.listeners,
|
|
583
|
-
onClick: (c) => c.stopPropagation(),
|
|
584
|
-
className: "cursor-grab active:cursor-grabbing text-slate-400 hover:text-slate-600 p-0.5 rounded hover:bg-slate-200/50 transition-colors",
|
|
585
|
-
children: /* @__PURE__ */ r(Je, { size: 14 })
|
|
586
|
-
}
|
|
587
|
-
),
|
|
588
|
-
/* @__PURE__ */ r("h3", { className: "font-semibold text-sm text-slate-700 truncate tracking-tight flex-1", children: t.title }),
|
|
589
|
-
/* @__PURE__ */ r("span", { className: "text-[10px] bg-slate-200/50 border border-slate-200 px-2 py-0.5 rounded-full text-slate-500 font-bold tabular-nums", children: e })
|
|
590
|
-
] }),
|
|
591
|
-
/* @__PURE__ */ i("div", { className: "flex items-center gap-1 opacity-0 group-hover/header:opacity-100 transition-opacity", children: [
|
|
592
|
-
o && /* @__PURE__ */ r(
|
|
593
|
-
"button",
|
|
594
|
-
{
|
|
595
|
-
onClick: o,
|
|
596
|
-
className: "p-1 hover:bg-slate-200/50 rounded text-slate-400 hover:text-slate-600 transition-colors",
|
|
597
|
-
title: "Adicionar Card",
|
|
598
|
-
children: /* @__PURE__ */ r(G, { size: 14 })
|
|
599
|
-
}
|
|
600
|
-
),
|
|
601
|
-
l && /* @__PURE__ */ r(
|
|
602
|
-
"button",
|
|
603
|
-
{
|
|
604
|
-
onClick: l,
|
|
605
|
-
className: "p-1 hover:bg-slate-200/50 rounded text-slate-400 hover:text-slate-600 transition-colors",
|
|
606
|
-
title: "Editar Coluna",
|
|
607
|
-
children: /* @__PURE__ */ r(be, { size: 14 })
|
|
608
|
-
}
|
|
609
|
-
)
|
|
610
|
-
] })
|
|
611
|
-
] }));
|
|
612
|
-
Se.displayName = "DefaultColumnHeader";
|
|
613
|
-
const ee = x.Root, ut = x.Portal, Ae = R.forwardRef(({ className: t, ...e }, n) => /* @__PURE__ */ r(
|
|
614
|
-
x.Overlay,
|
|
615
|
-
{
|
|
616
|
-
ref: n,
|
|
617
|
-
className: A(
|
|
618
|
-
"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
619
|
-
t
|
|
620
|
-
),
|
|
621
|
-
...e
|
|
622
|
-
}
|
|
623
|
-
));
|
|
624
|
-
Ae.displayName = x.Overlay.displayName;
|
|
625
|
-
const U = R.forwardRef(({ className: t, children: e, ...n }, a) => /* @__PURE__ */ i(ut, { children: [
|
|
626
|
-
/* @__PURE__ */ r(Ae, {}),
|
|
627
|
-
/* @__PURE__ */ i(
|
|
628
|
-
x.Content,
|
|
629
|
-
{
|
|
630
|
-
ref: a,
|
|
631
|
-
className: A(
|
|
632
|
-
"fixed left-1/2 top-1/2 z-50 grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-48% data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-48% sm:rounded-lg",
|
|
633
|
-
t
|
|
634
|
-
),
|
|
635
|
-
...n,
|
|
636
|
-
children: [
|
|
637
|
-
e,
|
|
638
|
-
/* @__PURE__ */ i(x.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", children: [
|
|
639
|
-
/* @__PURE__ */ r(Q, { className: "h-4 w-4" }),
|
|
640
|
-
/* @__PURE__ */ r("span", { className: "sr-only", children: "Close" })
|
|
641
|
-
] })
|
|
642
|
-
]
|
|
643
|
-
}
|
|
644
|
-
)
|
|
645
|
-
] }));
|
|
646
|
-
U.displayName = x.Content.displayName;
|
|
647
|
-
const P = ({
|
|
648
|
-
className: t,
|
|
649
|
-
...e
|
|
650
|
-
}) => /* @__PURE__ */ r(
|
|
651
|
-
"div",
|
|
652
|
-
{
|
|
653
|
-
className: A(
|
|
654
|
-
"flex flex-col space-y-1.5 text-center sm:text-left",
|
|
655
|
-
t
|
|
656
|
-
),
|
|
657
|
-
...e
|
|
658
|
-
}
|
|
659
|
-
);
|
|
493
|
+
const Ee = M(({ column: t, cardCount: e, isOver: n, dragHandleProps: a, onAddCard: o, onEditColumn: l }) => i("div", { className: E("px-3 py-3 flex items-center justify-between transition-colors mb-2 rounded-t-xl select-none group/header", n ? "bg-blue-50/80" : "bg-transparent"), children: [i("div", { className: "flex items-center gap-2 min-w-0 flex-1", children: [a && r("div", { ...a.attributes, ...a.listeners, onClick: (c) => c.stopPropagation(), className: "cursor-grab active:cursor-grabbing text-slate-400 hover:text-slate-600 p-0.5 rounded hover:bg-slate-200/50 transition-colors", children: r(Je, { size: 14 }) }), r("h3", { className: "font-semibold text-sm text-slate-700 truncate tracking-tight flex-1", children: t.title }), r("span", { className: "text-[10px] bg-slate-200/50 border border-slate-200 px-2 py-0.5 rounded-full text-slate-500 font-bold tabular-nums", children: e })] }), i("div", { className: "flex items-center gap-1 opacity-0 group-hover/header:opacity-100 transition-opacity", children: [o && r("button", { onClick: o, className: "p-1 hover:bg-slate-200/50 rounded text-slate-400 hover:text-slate-600 transition-colors", title: "Adicionar Card", children: r(G, { size: 14 }) }), l && r("button", { onClick: l, className: "p-1 hover:bg-slate-200/50 rounded text-slate-400 hover:text-slate-600 transition-colors", title: "Editar Coluna", children: r(be, { size: 14 }) })] })] }));
|
|
494
|
+
Ee.displayName = "DefaultColumnHeader";
|
|
495
|
+
const ee = v.Root, ut = v.Portal, Se = R.forwardRef(({ className: t, ...e }, n) => r(v.Overlay, { ref: n, className: S("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", t), ...e }));
|
|
496
|
+
Se.displayName = v.Overlay.displayName;
|
|
497
|
+
const U = R.forwardRef(({ className: t, children: e, ...n }, a) => i(ut, { children: [r(Se, {}), i(v.Content, { ref: a, className: S("fixed left-1/2 top-1/2 z-50 grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-48% data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-48% sm:rounded-lg", t), ...n, children: [e, i(v.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", children: [r(Q, { className: "h-4 w-4" }), r("span", { className: "sr-only", children: "Close" })] })] })] }));
|
|
498
|
+
U.displayName = v.Content.displayName;
|
|
499
|
+
const P = ({ className: t, ...e }) => r("div", { className: S("flex flex-col space-y-1.5 text-center sm:text-left", t), ...e });
|
|
660
500
|
P.displayName = "DialogHeader";
|
|
661
|
-
const te = ({
|
|
662
|
-
className: t,
|
|
663
|
-
...e
|
|
664
|
-
}) => /* @__PURE__ */ r(
|
|
665
|
-
"div",
|
|
666
|
-
{
|
|
667
|
-
className: A(
|
|
668
|
-
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
|
|
669
|
-
t
|
|
670
|
-
),
|
|
671
|
-
...e
|
|
672
|
-
}
|
|
673
|
-
);
|
|
501
|
+
const te = ({ className: t, ...e }) => r("div", { className: S("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", t), ...e });
|
|
674
502
|
te.displayName = "DialogFooter";
|
|
675
|
-
const _ = R.forwardRef(({ className: t, ...e }, n) =>
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
x.Description,
|
|
689
|
-
{
|
|
690
|
-
ref: n,
|
|
691
|
-
className: A("text-sm text-muted-foreground", t),
|
|
692
|
-
...e
|
|
693
|
-
}
|
|
694
|
-
));
|
|
695
|
-
re.displayName = x.Description.displayName;
|
|
696
|
-
const mt = Ne(
|
|
697
|
-
"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
|
|
698
|
-
{
|
|
699
|
-
variants: {
|
|
700
|
-
variant: {
|
|
701
|
-
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
702
|
-
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
703
|
-
outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
|
|
704
|
-
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
705
|
-
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
706
|
-
link: "text-primary underline-offset-4 hover:underline"
|
|
707
|
-
},
|
|
708
|
-
size: {
|
|
709
|
-
default: "h-10 px-4 py-2",
|
|
710
|
-
sm: "h-9 rounded-md px-3",
|
|
711
|
-
lg: "h-11 rounded-md px-8",
|
|
712
|
-
icon: "h-10 w-10"
|
|
713
|
-
}
|
|
503
|
+
const _ = R.forwardRef(({ className: t, ...e }, n) => r(v.Title, { ref: n, className: S("text-lg font-semibold leading-none tracking-tight", t), ...e }));
|
|
504
|
+
_.displayName = v.Title.displayName;
|
|
505
|
+
const re = R.forwardRef(({ className: t, ...e }, n) => r(v.Description, { ref: n, className: S("text-sm text-muted-foreground", t), ...e }));
|
|
506
|
+
re.displayName = v.Description.displayName;
|
|
507
|
+
const mt = Ne("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50", {
|
|
508
|
+
variants: {
|
|
509
|
+
variant: {
|
|
510
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
511
|
+
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
512
|
+
outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
|
|
513
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
514
|
+
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
515
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
714
516
|
},
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
517
|
+
size: {
|
|
518
|
+
default: "h-10 px-4 py-2",
|
|
519
|
+
sm: "h-9 rounded-md px-3",
|
|
520
|
+
lg: "h-11 rounded-md px-8",
|
|
521
|
+
icon: "h-10 w-10"
|
|
718
522
|
}
|
|
523
|
+
},
|
|
524
|
+
defaultVariants: {
|
|
525
|
+
variant: "default",
|
|
526
|
+
size: "default"
|
|
719
527
|
}
|
|
720
|
-
), w = R.forwardRef(
|
|
721
|
-
({ className: t, variant: e, size: n, asChild: a = !1, ...o }, l) => /* @__PURE__ */ r(
|
|
722
|
-
a ? ot : "button",
|
|
723
|
-
{
|
|
724
|
-
className: A(mt({ variant: e, size: n, className: t })),
|
|
725
|
-
ref: l,
|
|
726
|
-
...o
|
|
727
|
-
}
|
|
728
|
-
)
|
|
729
|
-
);
|
|
528
|
+
}), w = R.forwardRef(({ className: t, variant: e, size: n, asChild: a = !1, ...o }, l) => r(a ? ot : "button", { className: S(mt({ variant: e, size: n, className: t })), ref: l, ...o }));
|
|
730
529
|
w.displayName = "Button";
|
|
731
530
|
function pt({ card: t, onSave: e, onCancel: n, onDelete: a }) {
|
|
732
|
-
const [o, l] = D(t.title || ""), [c, p] = D(t.description || "")
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
/* @__PURE__ */ r(re, { children: "Faça alterações no card aqui. Clique em salvar quando terminar." })
|
|
737
|
-
] }),
|
|
738
|
-
/* @__PURE__ */ i("form", { onSubmit: (d) => {
|
|
739
|
-
d.preventDefault(), e({ title: o, description: c });
|
|
740
|
-
}, className: "grid gap-4 py-4", children: [
|
|
741
|
-
/* @__PURE__ */ i("div", { className: "grid gap-2", children: [
|
|
742
|
-
/* @__PURE__ */ r("label", { htmlFor: "title", className: "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70", children: "Título" }),
|
|
743
|
-
/* @__PURE__ */ r(
|
|
744
|
-
"input",
|
|
745
|
-
{
|
|
746
|
-
id: "title",
|
|
747
|
-
autoFocus: !0,
|
|
748
|
-
value: o,
|
|
749
|
-
onChange: (d) => l(d.target.value),
|
|
750
|
-
className: "flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
|
|
751
|
-
placeholder: "Digite o título..."
|
|
752
|
-
}
|
|
753
|
-
)
|
|
754
|
-
] }),
|
|
755
|
-
/* @__PURE__ */ i("div", { className: "grid gap-2", children: [
|
|
756
|
-
/* @__PURE__ */ r("label", { htmlFor: "desc", className: "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70", children: "Descrição" }),
|
|
757
|
-
/* @__PURE__ */ r(
|
|
758
|
-
"textarea",
|
|
759
|
-
{
|
|
760
|
-
id: "desc",
|
|
761
|
-
value: c,
|
|
762
|
-
onChange: (d) => p(d.target.value),
|
|
763
|
-
rows: 4,
|
|
764
|
-
className: "flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 resize-none",
|
|
765
|
-
placeholder: "Adicione uma descrição..."
|
|
766
|
-
}
|
|
767
|
-
)
|
|
768
|
-
] }),
|
|
769
|
-
/* @__PURE__ */ i(te, { className: "flex items-center justify-between w-full sm:justify-between", children: [
|
|
770
|
-
a && /* @__PURE__ */ i(
|
|
771
|
-
w,
|
|
772
|
-
{
|
|
773
|
-
type: "button",
|
|
774
|
-
variant: "destructive",
|
|
775
|
-
size: "sm",
|
|
776
|
-
onClick: a,
|
|
777
|
-
className: "gap-2",
|
|
778
|
-
children: [
|
|
779
|
-
/* @__PURE__ */ r(oe, { size: 14 }),
|
|
780
|
-
"Excluir"
|
|
781
|
-
]
|
|
782
|
-
}
|
|
783
|
-
),
|
|
784
|
-
/* @__PURE__ */ i("div", { className: "flex gap-2", children: [
|
|
785
|
-
/* @__PURE__ */ r(w, { type: "button", variant: "outline", onClick: n, children: "Cancelar" }),
|
|
786
|
-
/* @__PURE__ */ i(w, { type: "submit", className: "gap-2", children: [
|
|
787
|
-
/* @__PURE__ */ r(ve, { size: 14 }),
|
|
788
|
-
"Salvar"
|
|
789
|
-
] })
|
|
790
|
-
] })
|
|
791
|
-
] })
|
|
792
|
-
] })
|
|
793
|
-
] }) });
|
|
531
|
+
const [o, l] = D(t.title || ""), [c, p] = D(t.description || ""), u = (s) => {
|
|
532
|
+
s.preventDefault(), e({ title: o, description: c });
|
|
533
|
+
};
|
|
534
|
+
return r(ee, { open: !0, onOpenChange: (s) => !s && n(), children: i(U, { className: "sm:max-w-[425px]", children: [i(P, { children: [r(_, { children: "Editar Card" }), r(re, { children: "Faça alterações no card aqui. Clique em salvar quando terminar." })] }), i("form", { onSubmit: u, className: "grid gap-4 py-4", children: [i("div", { className: "grid gap-2", children: [r("label", { htmlFor: "title", className: "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70", children: "Título" }), r("input", { id: "title", autoFocus: !0, value: o, onChange: (s) => l(s.target.value), className: "flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50", placeholder: "Digite o título..." })] }), i("div", { className: "grid gap-2", children: [r("label", { htmlFor: "desc", className: "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70", children: "Descrição" }), r("textarea", { id: "desc", value: c, onChange: (s) => p(s.target.value), rows: 4, className: "flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 resize-none", placeholder: "Adicione uma descrição..." })] }), i(te, { className: "flex items-center justify-between w-full sm:justify-between", children: [a && i(w, { type: "button", variant: "destructive", size: "sm", onClick: a, className: "gap-2", children: [r(oe, { size: 14 }), "Excluir"] }), i("div", { className: "flex gap-2", children: [r(w, { type: "button", variant: "outline", onClick: n, children: "Cancelar" }), i(w, { type: "submit", className: "gap-2", children: [r(xe, { size: 14 }), "Salvar"] })] })] })] })] }) });
|
|
794
535
|
}
|
|
795
536
|
const gt = M(({ card: t, onClose: e }) => {
|
|
796
537
|
const { priority: n, tags: a, members: o, dueDate: l, ...c } = t.metadata || {}, u = n && {
|
|
@@ -798,151 +539,27 @@ const gt = M(({ card: t, onClose: e }) => {
|
|
|
798
539
|
medium: { label: "Média", color: "text-amber-700", bg: "bg-amber-50 border-amber-200" },
|
|
799
540
|
low: { label: "Baixa", color: "text-emerald-700", bg: "bg-emerald-50 border-emerald-200" }
|
|
800
541
|
}[n];
|
|
801
|
-
return
|
|
802
|
-
u && /* @__PURE__ */ r("div", { className: S("h-1.5 w-full", u.bg.split(" ")[0], u.bg.replace("bg-", "bg-opacity-100")) }),
|
|
803
|
-
/* @__PURE__ */ i("div", { className: "flex flex-col h-full max-h-[85vh]", children: [
|
|
804
|
-
/* @__PURE__ */ r(P, { className: "p-6 pb-4", children: /* @__PURE__ */ i("div", { className: "flex items-start gap-4", children: [
|
|
805
|
-
/* @__PURE__ */ r("div", { className: "mt-1 p-2 bg-slate-100 rounded-lg text-slate-500", children: /* @__PURE__ */ r(Xe, { size: 20 }) }),
|
|
806
|
-
/* @__PURE__ */ i("div", { className: "space-y-1 flex-1", children: [
|
|
807
|
-
/* @__PURE__ */ r(_, { className: "text-xl font-bold text-slate-900 leading-tight", children: t.title }),
|
|
808
|
-
/* @__PURE__ */ r("p", { className: "text-xs text-slate-400 font-medium uppercase tracking-wider", children: t.id })
|
|
809
|
-
] }),
|
|
810
|
-
u && /* @__PURE__ */ r("div", { className: S("px-3 py-1 rounded-full text-xs font-bold border uppercase tracking-wide", u.color, u.bg), children: u.label })
|
|
811
|
-
] }) }),
|
|
812
|
-
/* @__PURE__ */ i("div", { className: "flex-1 overflow-y-auto p-6 pt-0 grid md:grid-cols-[1fr,240px] gap-8", children: [
|
|
813
|
-
/* @__PURE__ */ i("div", { className: "space-y-6", children: [
|
|
814
|
-
/* @__PURE__ */ i("div", { className: "space-y-3", children: [
|
|
815
|
-
/* @__PURE__ */ r("h4", { className: "text-sm font-semibold text-slate-900 flex items-center gap-2", children: "Descrição" }),
|
|
816
|
-
/* @__PURE__ */ r("div", { className: S(
|
|
817
|
-
"text-sm text-slate-600 leading-relaxed p-4 rounded-lg border border-slate-100 bg-slate-50/50 min-h-[100px]",
|
|
818
|
-
!t.description && "italic text-slate-400 flex items-center justify-center"
|
|
819
|
-
), children: t.description || "Nenhuma descrição fornecida." })
|
|
820
|
-
] }),
|
|
821
|
-
t.content && /* @__PURE__ */ i("div", { className: "space-y-3", children: [
|
|
822
|
-
/* @__PURE__ */ r("h4", { className: "text-sm font-semibold text-slate-900", children: "Conteúdo Detalhado" }),
|
|
823
|
-
/* @__PURE__ */ r("pre", { className: "text-xs font-mono bg-slate-900 text-slate-50 p-4 rounded-lg overflow-x-auto shadow-inner", children: typeof t.content == "object" ? JSON.stringify(t.content, null, 2) : t.content })
|
|
824
|
-
] })
|
|
825
|
-
] }),
|
|
826
|
-
/* @__PURE__ */ i("div", { className: "space-y-6", children: [
|
|
827
|
-
l && /* @__PURE__ */ i("div", { className: "space-y-1.5", children: [
|
|
828
|
-
/* @__PURE__ */ i("span", { className: "text-xs font-semibold text-slate-500 uppercase tracking-wider flex items-center gap-1.5", children: [
|
|
829
|
-
/* @__PURE__ */ r(Ce, { size: 12 }),
|
|
830
|
-
" Data de Entrega"
|
|
831
|
-
] }),
|
|
832
|
-
/* @__PURE__ */ r("div", { className: "text-sm font-medium text-slate-900 bg-slate-50 px-3 py-2 rounded-md border border-slate-200", children: new Date(l).toLocaleDateString() })
|
|
833
|
-
] }),
|
|
834
|
-
o && Array.isArray(o) && o.length > 0 && /* @__PURE__ */ i("div", { className: "space-y-2", children: [
|
|
835
|
-
/* @__PURE__ */ i("span", { className: "text-xs font-semibold text-slate-500 uppercase tracking-wider flex items-center gap-1.5", children: [
|
|
836
|
-
/* @__PURE__ */ r(Ye, { size: 12 }),
|
|
837
|
-
" Membros"
|
|
838
|
-
] }),
|
|
839
|
-
/* @__PURE__ */ r("div", { className: "flex flex-col gap-2", children: o.map((d, s) => /* @__PURE__ */ i("div", { className: "flex items-center gap-2 text-sm text-slate-700 bg-white p-1.5 rounded-md border border-slate-100 shadow-sm", children: [
|
|
840
|
-
/* @__PURE__ */ r("div", { className: "h-6 w-6 rounded-full bg-slate-200 flex items-center justify-center text-[10px] font-bold overflow-hidden shrink-0", children: d.avatar ? /* @__PURE__ */ r("img", { src: d.avatar, alt: d.name, className: "w-full h-full object-cover" }) : d.initials }),
|
|
841
|
-
/* @__PURE__ */ r("span", { className: "truncate", children: d.name })
|
|
842
|
-
] }, s)) })
|
|
843
|
-
] }),
|
|
844
|
-
a && Array.isArray(a) && a.length > 0 && /* @__PURE__ */ i("div", { className: "space-y-2", children: [
|
|
845
|
-
/* @__PURE__ */ i("span", { className: "text-xs font-semibold text-slate-500 uppercase tracking-wider flex items-center gap-1.5", children: [
|
|
846
|
-
/* @__PURE__ */ r(Ze, { size: 12 }),
|
|
847
|
-
" Tags"
|
|
848
|
-
] }),
|
|
849
|
-
/* @__PURE__ */ r("div", { className: "flex flex-wrap gap-1.5", children: a.map((d, s) => /* @__PURE__ */ r("span", { className: S(
|
|
850
|
-
"px-2.5 py-1 rounded-md text-xs font-semibold border shadow-sm",
|
|
851
|
-
d.color ? `bg-${d.color}-50 text-${d.color}-700 border-${d.color}-200` : "bg-slate-100 text-slate-700 border-slate-200"
|
|
852
|
-
), children: d.name }, s)) })
|
|
853
|
-
] }),
|
|
854
|
-
Object.keys(c).length > 0 && /* @__PURE__ */ i("div", { className: "space-y-3 pt-4 border-t border-slate-100", children: [
|
|
855
|
-
/* @__PURE__ */ i("span", { className: "text-xs font-semibold text-slate-500 uppercase tracking-wider flex items-center gap-1.5", children: [
|
|
856
|
-
/* @__PURE__ */ r(et, { size: 12 }),
|
|
857
|
-
" Outros Detalhes"
|
|
858
|
-
] }),
|
|
859
|
-
/* @__PURE__ */ r("div", { className: "grid gap-3", children: Object.entries(c).map(([d, s]) => /* @__PURE__ */ i("div", { className: "group", children: [
|
|
860
|
-
/* @__PURE__ */ r("dt", { className: "text-[10px] font-bold text-slate-400 uppercase mb-0.5 group-hover:text-slate-600 transition-colors", children: d.replace(/([A-Z])/g, " $1") }),
|
|
861
|
-
/* @__PURE__ */ r("dd", { className: "text-sm font-medium text-slate-800 break-words", children: typeof s == "boolean" ? s ? /* @__PURE__ */ r("span", { className: "inline-flex items-center gap-1 text-emerald-600 bg-emerald-50 px-2 py-0.5 rounded text-xs", children: "Sim" }) : /* @__PURE__ */ r("span", { className: "text-slate-400", children: "Não" }) : String(s) })
|
|
862
|
-
] }, d)) })
|
|
863
|
-
] })
|
|
864
|
-
] })
|
|
865
|
-
] }),
|
|
866
|
-
/* @__PURE__ */ r("div", { className: "p-4 border-t border-slate-100 bg-slate-50/50 flex justify-end", children: /* @__PURE__ */ r(w, { variant: "outline", onClick: e, className: "hover:bg-white hover:text-slate-900 transition-colors", children: "Fechar Visualização" }) })
|
|
867
|
-
] })
|
|
868
|
-
] }) });
|
|
542
|
+
return r(ee, { open: !0, onOpenChange: (s) => !s && e(), children: i(U, { className: "sm:max-w-2xl p-0 gap-0 overflow-hidden bg-white", children: [u && r("div", { className: E("h-1.5 w-full", u.bg.split(" ")[0], u.bg.replace("bg-", "bg-opacity-100")) }), i("div", { className: "flex flex-col h-full max-h-[85vh]", children: [r(P, { className: "p-6 pb-4", children: i("div", { className: "flex items-start gap-4", children: [r("div", { className: "mt-1 p-2 bg-slate-100 rounded-lg text-slate-500", children: r(Xe, { size: 20 }) }), i("div", { className: "space-y-1 flex-1", children: [r(_, { className: "text-xl font-bold text-slate-900 leading-tight", children: t.title }), r("p", { className: "text-xs text-slate-400 font-medium uppercase tracking-wider", children: t.id })] }), u && r("div", { className: E("px-3 py-1 rounded-full text-xs font-bold border uppercase tracking-wide", u.color, u.bg), children: u.label })] }) }), i("div", { className: "flex-1 overflow-y-auto p-6 pt-0 grid md:grid-cols-[1fr,240px] gap-8", children: [i("div", { className: "space-y-6", children: [i("div", { className: "space-y-3", children: [r("h4", { className: "text-sm font-semibold text-slate-900 flex items-center gap-2", children: "Descrição" }), r("div", { className: E("text-sm text-slate-600 leading-relaxed p-4 rounded-lg border border-slate-100 bg-slate-50/50 min-h-[100px]", !t.description && "italic text-slate-400 flex items-center justify-center"), children: t.description || "Nenhuma descrição fornecida." })] }), t.content && i("div", { className: "space-y-3", children: [r("h4", { className: "text-sm font-semibold text-slate-900", children: "Conteúdo Detalhado" }), r("pre", { className: "text-xs font-mono bg-slate-900 text-slate-50 p-4 rounded-lg overflow-x-auto shadow-inner", children: typeof t.content == "object" ? JSON.stringify(t.content, null, 2) : t.content })] })] }), i("div", { className: "space-y-6", children: [l && i("div", { className: "space-y-1.5", children: [i("span", { className: "text-xs font-semibold text-slate-500 uppercase tracking-wider flex items-center gap-1.5", children: [r(Ce, { size: 12 }), " Data de Entrega"] }), r("div", { className: "text-sm font-medium text-slate-900 bg-slate-50 px-3 py-2 rounded-md border border-slate-200", children: new Date(l).toLocaleDateString() })] }), o && Array.isArray(o) && o.length > 0 && i("div", { className: "space-y-2", children: [i("span", { className: "text-xs font-semibold text-slate-500 uppercase tracking-wider flex items-center gap-1.5", children: [r(Ye, { size: 12 }), " Membros"] }), r("div", { className: "flex flex-col gap-2", children: o.map((s, d) => i("div", { className: "flex items-center gap-2 text-sm text-slate-700 bg-white p-1.5 rounded-md border border-slate-100 shadow-sm", children: [r("div", { className: "h-6 w-6 rounded-full bg-slate-200 flex items-center justify-center text-[10px] font-bold overflow-hidden shrink-0", children: s.avatar ? r("img", { src: s.avatar, alt: s.name, className: "w-full h-full object-cover" }) : s.initials }), r("span", { className: "truncate", children: s.name })] }, d)) })] }), a && Array.isArray(a) && a.length > 0 && i("div", { className: "space-y-2", children: [i("span", { className: "text-xs font-semibold text-slate-500 uppercase tracking-wider flex items-center gap-1.5", children: [r(Ze, { size: 12 }), " Tags"] }), r("div", { className: "flex flex-wrap gap-1.5", children: a.map((s, d) => r("span", { className: E("px-2.5 py-1 rounded-md text-xs font-semibold border shadow-sm", s.color ? `bg-${s.color}-50 text-${s.color}-700 border-${s.color}-200` : "bg-slate-100 text-slate-700 border-slate-200"), children: s.name }, d)) })] }), Object.keys(c).length > 0 && i("div", { className: "space-y-3 pt-4 border-t border-slate-100", children: [i("span", { className: "text-xs font-semibold text-slate-500 uppercase tracking-wider flex items-center gap-1.5", children: [r(et, { size: 12 }), " Outros Detalhes"] }), r("div", { className: "grid gap-3", children: Object.entries(c).map(([s, d]) => i("div", { className: "group", children: [r("dt", { className: "text-[10px] font-bold text-slate-400 uppercase mb-0.5 group-hover:text-slate-600 transition-colors", children: s.replace(/([A-Z])/g, " $1") }), r("dd", { className: "text-sm font-medium text-slate-800 break-words", children: typeof d == "boolean" ? d ? r("span", { className: "inline-flex items-center gap-1 text-emerald-600 bg-emerald-50 px-2 py-0.5 rounded text-xs", children: "Sim" }) : r("span", { className: "text-slate-400", children: "Não" }) : String(d) })] }, s)) })] })] })] }), r("div", { className: "p-4 border-t border-slate-100 bg-slate-50/50 flex justify-end", children: r(w, { variant: "outline", onClick: e, className: "hover:bg-white hover:text-slate-900 transition-colors", children: "Fechar Visualização" }) })] })] }) });
|
|
869
543
|
});
|
|
870
544
|
function ht() {
|
|
871
|
-
const { filters: t, removeFilterRule: e, clearFilters: n } = B(), a = t.groups.flatMap(
|
|
872
|
-
|
|
873
|
-
);
|
|
874
|
-
return a.length === 0 && !t.searchQuery ? null : /* @__PURE__ */ i("div", { className: "flex flex-wrap items-center gap-2 px-4 py-2 bg-slate-50/50 border-b min-h-[48px] animate-in fade-in slide-in-from-top-1 duration-300", children: [
|
|
875
|
-
/* @__PURE__ */ i("div", { className: "flex items-center gap-1.5 mr-2", children: [
|
|
876
|
-
/* @__PURE__ */ r("div", { className: "h-2 w-2 rounded-full bg-primary animate-pulse" }),
|
|
877
|
-
/* @__PURE__ */ r("span", { className: "text-[11px] font-bold text-slate-500 uppercase tracking-tight", children: "Filtros Ativos:" })
|
|
878
|
-
] }),
|
|
879
|
-
t.searchQuery && /* @__PURE__ */ i("div", { className: "flex items-center gap-1 bg-white border border-primary/20 rounded-full px-3 py-1 text-[11px] shadow-sm", children: [
|
|
880
|
-
/* @__PURE__ */ r("span", { className: "text-slate-500", children: "Busca:" }),
|
|
881
|
-
/* @__PURE__ */ r("span", { className: "font-semibold text-primary", children: t.searchQuery }),
|
|
882
|
-
/* @__PURE__ */ r(
|
|
883
|
-
"button",
|
|
884
|
-
{
|
|
885
|
-
onClick: () => B.getState().setSearchQuery(""),
|
|
886
|
-
className: "ml-1 hover:text-destructive transition-colors",
|
|
887
|
-
children: /* @__PURE__ */ r(Q, { className: "h-3 w-3" })
|
|
888
|
-
}
|
|
889
|
-
)
|
|
890
|
-
] }),
|
|
891
|
-
a.map(({ groupId: o, rule: l }) => /* @__PURE__ */ i(
|
|
892
|
-
"div",
|
|
893
|
-
{
|
|
894
|
-
className: "flex items-center gap-1 bg-white border border-slate-200 rounded-full px-3 py-1 text-[11px] shadow-sm hover:border-primary/30 transition-colors group",
|
|
895
|
-
children: [
|
|
896
|
-
/* @__PURE__ */ i("span", { className: "text-slate-400 capitalize", children: [
|
|
897
|
-
l.field.split(".").pop(),
|
|
898
|
-
":"
|
|
899
|
-
] }),
|
|
900
|
-
/* @__PURE__ */ r("span", { className: "font-semibold text-slate-700", children: l.value || "(vazio)" }),
|
|
901
|
-
/* @__PURE__ */ r(
|
|
902
|
-
"button",
|
|
903
|
-
{
|
|
904
|
-
onClick: () => e(o, l.id),
|
|
905
|
-
className: "ml-1 text-slate-300 group-hover:text-destructive transition-colors",
|
|
906
|
-
children: /* @__PURE__ */ r(Q, { className: "h-3 w-3" })
|
|
907
|
-
}
|
|
908
|
-
)
|
|
909
|
-
]
|
|
910
|
-
},
|
|
911
|
-
l.id
|
|
912
|
-
)),
|
|
913
|
-
/* @__PURE__ */ i(
|
|
914
|
-
w,
|
|
915
|
-
{
|
|
916
|
-
variant: "ghost",
|
|
917
|
-
size: "sm",
|
|
918
|
-
className: "h-7 text-[10px] font-bold text-slate-400 hover:text-destructive gap-1 px-2 border-l ml-auto rounded-none",
|
|
919
|
-
onClick: n,
|
|
920
|
-
children: [
|
|
921
|
-
/* @__PURE__ */ r(tt, { className: "h-3 w-3" }),
|
|
922
|
-
"LIMPAR TUDO"
|
|
923
|
-
]
|
|
924
|
-
}
|
|
925
|
-
)
|
|
926
|
-
] });
|
|
545
|
+
const { filters: t, removeFilterRule: e, clearFilters: n } = B(), a = t.groups.flatMap((o) => o.rules.filter((l) => !("conjunction" in l) && l.enabled).map((l) => ({ groupId: o.id, rule: l })));
|
|
546
|
+
return a.length === 0 && !t.searchQuery ? null : i("div", { className: "flex flex-wrap items-center gap-2 px-4 py-2 bg-slate-50/50 border-b min-h-[48px] animate-in fade-in slide-in-from-top-1 duration-300", children: [i("div", { className: "flex items-center gap-1.5 mr-2", children: [r("div", { className: "h-2 w-2 rounded-full bg-primary animate-pulse" }), r("span", { className: "text-[11px] font-bold text-slate-500 uppercase tracking-tight", children: "Filtros Ativos:" })] }), t.searchQuery && i("div", { className: "flex items-center gap-1 bg-white border border-primary/20 rounded-full px-3 py-1 text-[11px] shadow-sm", children: [r("span", { className: "text-slate-500", children: "Busca:" }), r("span", { className: "font-semibold text-primary", children: t.searchQuery }), r("button", { onClick: () => B.getState().setSearchQuery(""), className: "ml-1 hover:text-destructive transition-colors", children: r(Q, { className: "h-3 w-3" }) })] }), a.map(({ groupId: o, rule: l }) => i("div", { className: "flex items-center gap-1 bg-white border border-slate-200 rounded-full px-3 py-1 text-[11px] shadow-sm hover:border-primary/30 transition-colors group", children: [i("span", { className: "text-slate-400 capitalize", children: [l.field.split(".").pop(), ":"] }), r("span", { className: "font-semibold text-slate-700", children: l.value || "(vazio)" }), r("button", { onClick: () => e(o, l.id), className: "ml-1 text-slate-300 group-hover:text-destructive transition-colors", children: r(Q, { className: "h-3 w-3" }) })] }, l.id)), i(w, { variant: "ghost", size: "sm", className: "h-7 text-[10px] font-bold text-slate-400 hover:text-destructive gap-1 px-2 border-l ml-auto rounded-none", onClick: n, children: [r(tt, { className: "h-3 w-3" }), "LIMPAR TUDO"] })] });
|
|
927
547
|
}
|
|
928
548
|
const me = /* @__PURE__ */ new Map();
|
|
929
|
-
function ft({
|
|
930
|
-
cardIds: t,
|
|
931
|
-
estimatedCardHeight: e,
|
|
932
|
-
overscan: n
|
|
933
|
-
}) {
|
|
549
|
+
function ft({ cardIds: t, estimatedCardHeight: e, overscan: n }) {
|
|
934
550
|
const a = j(null), [o, l] = D(0);
|
|
935
551
|
L(() => {
|
|
936
552
|
const u = a.current;
|
|
937
|
-
if (!u)
|
|
938
|
-
|
|
553
|
+
if (!u)
|
|
554
|
+
return;
|
|
555
|
+
let s = 0, d = Date.now(), g;
|
|
939
556
|
const h = () => {
|
|
940
|
-
const m = Date.now(), b = u.scrollTop, N = m -
|
|
557
|
+
const m = Date.now(), b = u.scrollTop, N = m - d, x = Math.abs(b - s);
|
|
941
558
|
if (N > 0) {
|
|
942
|
-
const C =
|
|
559
|
+
const C = x / N;
|
|
943
560
|
l(C);
|
|
944
561
|
}
|
|
945
|
-
|
|
562
|
+
s = b, d = m;
|
|
946
563
|
}, f = () => {
|
|
947
564
|
g && cancelAnimationFrame(g), g = requestAnimationFrame(h);
|
|
948
565
|
};
|
|
@@ -954,12 +571,12 @@ function ft({
|
|
|
954
571
|
count: t.length,
|
|
955
572
|
getScrollElement: () => a.current,
|
|
956
573
|
estimateSize: (u) => {
|
|
957
|
-
const
|
|
958
|
-
return
|
|
574
|
+
const s = t[u], d = me.get(s);
|
|
575
|
+
return d || e;
|
|
959
576
|
},
|
|
960
577
|
measureElement: (u) => {
|
|
961
|
-
const
|
|
962
|
-
return
|
|
578
|
+
const s = u.getBoundingClientRect().height, d = u.getAttribute("data-card-id");
|
|
579
|
+
return d && me.set(d, s), s;
|
|
963
580
|
},
|
|
964
581
|
overscan: c
|
|
965
582
|
});
|
|
@@ -969,37 +586,10 @@ function ft({
|
|
|
969
586
|
};
|
|
970
587
|
}
|
|
971
588
|
function bt({ onClick: t }) {
|
|
972
|
-
return
|
|
973
|
-
"button",
|
|
974
|
-
{
|
|
975
|
-
onClick: t,
|
|
976
|
-
className: "w-full flex items-center gap-2 px-3 py-2 text-sm font-medium text-slate-500 hover:text-blue-600 hover:bg-blue-50/50 rounded-lg transition-all duration-200 group",
|
|
977
|
-
children: [
|
|
978
|
-
/* @__PURE__ */ r("div", { className: "bg-slate-200 group-hover:bg-blue-600 group-hover:text-white p-0.5 rounded transition-colors", children: /* @__PURE__ */ r(G, { size: 14 }) }),
|
|
979
|
-
/* @__PURE__ */ r("span", { children: "Adicionar card" })
|
|
980
|
-
]
|
|
981
|
-
}
|
|
982
|
-
);
|
|
589
|
+
return i("button", { onClick: t, className: "w-full flex items-center gap-2 px-3 py-2 text-sm font-medium text-slate-500 hover:text-blue-600 hover:bg-blue-50/50 rounded-lg transition-all duration-200 group", children: [r("div", { className: "bg-slate-200 group-hover:bg-blue-600 group-hover:text-white p-0.5 rounded transition-colors", children: r(G, { size: 14 }) }), r("span", { children: "Adicionar card" })] });
|
|
983
590
|
}
|
|
984
|
-
function Ct({
|
|
985
|
-
|
|
986
|
-
renderCard: e,
|
|
987
|
-
onClick: n,
|
|
988
|
-
onEdit: a,
|
|
989
|
-
allowEdit: o,
|
|
990
|
-
index: l,
|
|
991
|
-
columnId: c,
|
|
992
|
-
overId: p,
|
|
993
|
-
overSide: u
|
|
994
|
-
}) {
|
|
995
|
-
const {
|
|
996
|
-
attributes: d,
|
|
997
|
-
listeners: s,
|
|
998
|
-
setNodeRef: g,
|
|
999
|
-
transform: h,
|
|
1000
|
-
transition: f,
|
|
1001
|
-
isDragging: m
|
|
1002
|
-
} = ge({
|
|
591
|
+
function Ct({ card: t, renderCard: e, onClick: n, onEdit: a, allowEdit: o, index: l, columnId: c, overId: p, overSide: u }) {
|
|
592
|
+
const { attributes: s, listeners: d, setNodeRef: g, transform: h, transition: f, isDragging: m } = ge({
|
|
1003
593
|
id: t.id,
|
|
1004
594
|
data: {
|
|
1005
595
|
type: "Card",
|
|
@@ -1013,253 +603,91 @@ function Ct({
|
|
|
1013
603
|
opacity: m ? 0.4 : 1
|
|
1014
604
|
}), [h, f, m]), N = $(() => (C) => {
|
|
1015
605
|
C.stopPropagation(), n ? n(t) : o && a?.(t);
|
|
1016
|
-
}, [n, a, o, t]),
|
|
1017
|
-
|
|
1018
|
-
[t, e, m]
|
|
1019
|
-
);
|
|
1020
|
-
return /* @__PURE__ */ i(
|
|
1021
|
-
"div",
|
|
1022
|
-
{
|
|
1023
|
-
ref: g,
|
|
1024
|
-
style: b,
|
|
1025
|
-
...d,
|
|
1026
|
-
...s,
|
|
1027
|
-
onClick: N,
|
|
1028
|
-
className: "relative cursor-grab active:cursor-grabbing touch-none group",
|
|
1029
|
-
children: [
|
|
1030
|
-
p === t.id && u === "top" && /* @__PURE__ */ r("div", { className: "absolute -top-[2px] left-0 right-0 h-[4px] bg-blue-500 rounded-full z-10 pointer-events-none shadow-sm" }),
|
|
1031
|
-
v,
|
|
1032
|
-
p === t.id && u === "bottom" && /* @__PURE__ */ r("div", { className: "absolute -bottom-[2px] left-0 right-0 h-[4px] bg-blue-500 rounded-full z-10 pointer-events-none shadow-sm" })
|
|
1033
|
-
]
|
|
1034
|
-
}
|
|
1035
|
-
);
|
|
606
|
+
}, [n, a, o, t]), x = $(() => e({ card: t, isDragging: m }), [t, e, m]);
|
|
607
|
+
return i("div", { ref: g, style: b, ...s, ...d, onClick: N, className: "relative cursor-grab active:cursor-grabbing touch-none group", children: [p === t.id && u === "top" && r("div", { className: "absolute -top-[2px] left-0 right-0 h-[4px] bg-blue-500 rounded-full z-10 pointer-events-none shadow-sm" }), x, p === t.id && u === "bottom" && r("div", { className: "absolute -bottom-[2px] left-0 right-0 h-[4px] bg-blue-500 rounded-full z-10 pointer-events-none shadow-sm" })] });
|
|
1036
608
|
}
|
|
1037
|
-
const
|
|
1038
|
-
function
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
activeId: n,
|
|
1042
|
-
overId: a,
|
|
1043
|
-
overSide: o,
|
|
1044
|
-
config: l,
|
|
1045
|
-
dragHandleProps: c,
|
|
1046
|
-
isActiveColumnDragging: p,
|
|
1047
|
-
isDragging: u,
|
|
1048
|
-
isOverlay: d
|
|
1049
|
-
}) {
|
|
1050
|
-
const s = t, { setAddingCardInColumnId: g, setEditingColumnId: h } = B(), {
|
|
1051
|
-
parentRef: f,
|
|
1052
|
-
rowVirtualizer: m
|
|
1053
|
-
} = ft({
|
|
1054
|
-
cardIds: s.cardIds,
|
|
609
|
+
const xt = M(Ct, (t, e) => t.card === e.card && t.index === e.index && t.columnId === e.columnId && t.overId === e.overId && t.overSide === e.overSide);
|
|
610
|
+
function vt({ column: t, allCards: e, activeId: n, overId: a, overSide: o, config: l, dragHandleProps: c, isActiveColumnDragging: p, isDragging: u, isOverlay: s }) {
|
|
611
|
+
const d = t, { setAddingCardInColumnId: g, setEditingColumnId: h } = B(), { parentRef: f, rowVirtualizer: m } = ft({
|
|
612
|
+
cardIds: d.cardIds,
|
|
1055
613
|
estimatedCardHeight: l.estimatedCardHeight,
|
|
1056
614
|
overscan: l.virtualOverscan
|
|
1057
|
-
}), b = a ===
|
|
1058
|
-
return
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
),
|
|
1110
|
-
children: /* @__PURE__ */ r("div", { className: "pointer-events-none select-none opacity-50", children: l.renderColumnEmpty({}) })
|
|
1111
|
-
}
|
|
1112
|
-
)
|
|
1113
|
-
) : (
|
|
1114
|
-
// Column with cards - use SortableContext for reordering
|
|
1115
|
-
/* @__PURE__ */ r(he, { items: s.cardIds, strategy: Qe, children: /* @__PURE__ */ r(
|
|
1116
|
-
"div",
|
|
1117
|
-
{
|
|
1118
|
-
ref: f,
|
|
1119
|
-
className: "flex-1 overflow-y-auto px-3 pb-2 scrollbar-thin scrollbar-thumb-slate-300 scrollbar-track-transparent",
|
|
1120
|
-
style: { minHeight: l.columnMinHeight },
|
|
1121
|
-
children: /* @__PURE__ */ r(
|
|
1122
|
-
"div",
|
|
1123
|
-
{
|
|
1124
|
-
style: {
|
|
1125
|
-
height: `${m.getTotalSize()}px`,
|
|
1126
|
-
width: "100%",
|
|
1127
|
-
position: "relative"
|
|
1128
|
-
},
|
|
1129
|
-
children: m.getVirtualItems().map((v) => {
|
|
1130
|
-
const C = s.cardIds[v.index], y = e[C];
|
|
1131
|
-
if (!y) return null;
|
|
1132
|
-
const E = C === n;
|
|
1133
|
-
return /* @__PURE__ */ r(
|
|
1134
|
-
"div",
|
|
1135
|
-
{
|
|
1136
|
-
"data-index": v.index,
|
|
1137
|
-
"data-card-id": C,
|
|
1138
|
-
style: {
|
|
1139
|
-
position: "absolute",
|
|
1140
|
-
top: 0,
|
|
1141
|
-
left: 0,
|
|
1142
|
-
width: "100%",
|
|
1143
|
-
height: `${v.size}px`,
|
|
1144
|
-
transform: `translateY(${v.start}px)`
|
|
1145
|
-
},
|
|
1146
|
-
children: /* @__PURE__ */ r(
|
|
1147
|
-
vt,
|
|
1148
|
-
{
|
|
1149
|
-
card: y,
|
|
1150
|
-
isDragging: E,
|
|
1151
|
-
renderCard: l.renderCard,
|
|
1152
|
-
onClick: l.onCardClick,
|
|
1153
|
-
onEdit: l.onEditCard,
|
|
1154
|
-
allowEdit: l.allowEdit,
|
|
1155
|
-
index: v.index,
|
|
1156
|
-
columnId: s.id,
|
|
1157
|
-
overId: a,
|
|
1158
|
-
overSide: o
|
|
1159
|
-
}
|
|
1160
|
-
)
|
|
1161
|
-
},
|
|
1162
|
-
C
|
|
1163
|
-
);
|
|
1164
|
-
})
|
|
1165
|
-
}
|
|
1166
|
-
)
|
|
1167
|
-
}
|
|
1168
|
-
) })
|
|
1169
|
-
)
|
|
1170
|
-
}
|
|
1171
|
-
),
|
|
1172
|
-
l.allowAdd && /* @__PURE__ */ r(
|
|
1173
|
-
"div",
|
|
1174
|
-
{
|
|
1175
|
-
className: "p-3 border-t border-slate-200 shrink-0 relative z-20",
|
|
1176
|
-
onClick: (v) => v.stopPropagation(),
|
|
1177
|
-
children: l.renderAddButton ? l.renderAddButton({
|
|
1178
|
-
columnId: s.id,
|
|
1179
|
-
onClick: () => g(s.id)
|
|
1180
|
-
}) : /* @__PURE__ */ r(bt, { onClick: () => g(s.id) })
|
|
1181
|
-
}
|
|
1182
|
-
)
|
|
1183
|
-
]
|
|
1184
|
-
}
|
|
1185
|
-
);
|
|
615
|
+
}), b = a === d.id;
|
|
616
|
+
return i("div", { onClick: (x) => {
|
|
617
|
+
x.stopPropagation(), l.onColumnClick ? l.onColumnClick(t) : l.allowColumnEdit && (l.onEditColumn?.(t), h(d.id));
|
|
618
|
+
}, style: {
|
|
619
|
+
width: l.columnWidth,
|
|
620
|
+
maxHeight: "100%",
|
|
621
|
+
boxSizing: "border-box"
|
|
622
|
+
}, className: E(
|
|
623
|
+
"flex flex-col group/column bg-column-bg rounded-column transition-all relative select-none h-fit max-h-full",
|
|
624
|
+
"duration-250 ease-[cubic-bezier(0.18,0.67,0.6,1.22)]",
|
|
625
|
+
// Spring-like transition
|
|
626
|
+
b && "bg-blue-50/50 ring-1 ring-blue-300 shadow-sm",
|
|
627
|
+
p && !u && !s && "scale-[0.98] border border-slate-200 border-dashed opacity-50",
|
|
628
|
+
// Other columns
|
|
629
|
+
u && !s && "opacity-20",
|
|
630
|
+
// Placeholder
|
|
631
|
+
s && "bg-slate-100/80 shadow-[0_20px_50px_rgba(0,0,0,0.15)] scale-[1.02] z-50 cursor-grabbing ring-1 ring-slate-300"
|
|
632
|
+
// Overlay
|
|
633
|
+
), children: [a === d.id && o === "left" && r("div", { className: "absolute top-0 bottom-0 -left-[4px] w-[4px] bg-blue-500 rounded-full z-20 pointer-events-none shadow-sm" }), a === d.id && o === "right" && r("div", { className: "absolute top-0 bottom-0 -right-[4px] w-[4px] bg-blue-500 rounded-full z-20 pointer-events-none shadow-sm" }), r("div", { onClick: (x) => x.stopPropagation(), children: l.renderColumnHeader({
|
|
634
|
+
column: t,
|
|
635
|
+
cardCount: d.cardIds.length,
|
|
636
|
+
isOver: b,
|
|
637
|
+
dragHandleProps: c,
|
|
638
|
+
onAddCard: l.allowAdd ? () => g(d.id) : void 0,
|
|
639
|
+
onEditColumn: l.allowColumnEdit ? () => h(d.id) : void 0
|
|
640
|
+
}) }), r("div", { className: E("flex-1 flex flex-col min-h-0 transition-colors duration-200", b && "bg-blue-50/30"), style: { minHeight: l.columnMinHeight }, children: d.cardIds.length === 0 ? (
|
|
641
|
+
// Empty column - simple area with parentRef for eventual virtualizer stability
|
|
642
|
+
r("div", { ref: f, className: E("flex-1 px-3 pb-2 flex items-center justify-center border-2 border-dashed border-transparent rounded-b-lg transition-colors", b && "border-blue-300"), children: r("div", { className: "pointer-events-none select-none opacity-50", children: l.renderColumnEmpty({}) }) })
|
|
643
|
+
) : (
|
|
644
|
+
// Column with cards - use SortableContext for reordering
|
|
645
|
+
r(he, { items: d.cardIds, strategy: Qe, children: r("div", { ref: f, className: "flex-1 overflow-y-auto px-3 pb-2 scrollbar-thin scrollbar-thumb-slate-300 scrollbar-track-transparent", style: { minHeight: l.columnMinHeight }, children: r("div", { style: {
|
|
646
|
+
height: `${m.getTotalSize()}px`,
|
|
647
|
+
width: "100%",
|
|
648
|
+
position: "relative"
|
|
649
|
+
}, children: m.getVirtualItems().map((x) => {
|
|
650
|
+
const C = d.cardIds[x.index], y = e[C];
|
|
651
|
+
if (!y)
|
|
652
|
+
return null;
|
|
653
|
+
const A = C === n;
|
|
654
|
+
return r("div", { "data-index": x.index, "data-card-id": C, style: {
|
|
655
|
+
position: "absolute",
|
|
656
|
+
top: 0,
|
|
657
|
+
left: 0,
|
|
658
|
+
width: "100%",
|
|
659
|
+
height: `${x.size}px`,
|
|
660
|
+
transform: `translateY(${x.start}px)`
|
|
661
|
+
}, children: r(xt, { card: y, isDragging: A, renderCard: l.renderCard, onClick: l.onCardClick, onEdit: l.onEditCard, allowEdit: l.allowEdit, index: x.index, columnId: d.id, overId: a, overSide: o }) }, C);
|
|
662
|
+
}) }) }) })
|
|
663
|
+
) }), l.allowAdd && r("div", { className: "p-3 border-t border-slate-200 shrink-0 relative z-20", onClick: (x) => x.stopPropagation(), children: l.renderAddButton ? l.renderAddButton({
|
|
664
|
+
columnId: d.id,
|
|
665
|
+
onClick: () => g(d.id)
|
|
666
|
+
}) : r(bt, { onClick: () => g(d.id) }) })] });
|
|
1186
667
|
}
|
|
1187
|
-
const pe = M(
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
}
|
|
1197
|
-
));
|
|
1198
|
-
It.displayName = x.Overlay.displayName;
|
|
1199
|
-
const Dt = Ne(
|
|
1200
|
-
"fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
|
|
1201
|
-
{
|
|
1202
|
-
variants: {
|
|
1203
|
-
side: {
|
|
1204
|
-
top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
|
|
1205
|
-
bottom: "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
|
|
1206
|
-
left: "inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",
|
|
1207
|
-
right: "inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"
|
|
1208
|
-
}
|
|
1209
|
-
},
|
|
1210
|
-
defaultVariants: {
|
|
1211
|
-
side: "right"
|
|
668
|
+
const pe = M(vt), wt = v.Root, yt = v.Trigger, Nt = v.Portal, It = R.forwardRef(({ className: t, ...e }, n) => r(v.Overlay, { className: S("fixed inset-0 z-50 bg-black/40 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", t), ...e, ref: n }));
|
|
669
|
+
It.displayName = v.Overlay.displayName;
|
|
670
|
+
const Dt = Ne("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500", {
|
|
671
|
+
variants: {
|
|
672
|
+
side: {
|
|
673
|
+
top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
|
|
674
|
+
bottom: "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
|
|
675
|
+
left: "inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",
|
|
676
|
+
right: "inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"
|
|
1212
677
|
}
|
|
678
|
+
},
|
|
679
|
+
defaultVariants: {
|
|
680
|
+
side: "right"
|
|
1213
681
|
}
|
|
1214
|
-
),
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
ref: o,
|
|
1218
|
-
className: A(Dt({ side: t }), "bg-white shadow-2xl", e),
|
|
1219
|
-
...a,
|
|
1220
|
-
children: [
|
|
1221
|
-
n,
|
|
1222
|
-
/* @__PURE__ */ i(x.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary", children: [
|
|
1223
|
-
/* @__PURE__ */ r(Q, { className: "h-4 w-4" }),
|
|
1224
|
-
/* @__PURE__ */ r("span", { className: "sr-only", children: "Close" })
|
|
1225
|
-
] })
|
|
1226
|
-
]
|
|
1227
|
-
}
|
|
1228
|
-
) }));
|
|
1229
|
-
Ee.displayName = x.Content.displayName;
|
|
1230
|
-
const Fe = ({
|
|
1231
|
-
className: t,
|
|
1232
|
-
...e
|
|
1233
|
-
}) => /* @__PURE__ */ r(
|
|
1234
|
-
"div",
|
|
1235
|
-
{
|
|
1236
|
-
className: A(
|
|
1237
|
-
"flex flex-col space-y-2 text-center sm:text-left",
|
|
1238
|
-
t
|
|
1239
|
-
),
|
|
1240
|
-
...e
|
|
1241
|
-
}
|
|
1242
|
-
);
|
|
682
|
+
}), Ae = R.forwardRef(({ side: t = "right", className: e, children: n, ...a }, o) => r(Nt, { children: i(v.Content, { ref: o, className: S(Dt({ side: t }), "bg-white shadow-2xl", e), ...a, children: [n, i(v.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary", children: [r(Q, { className: "h-4 w-4" }), r("span", { className: "sr-only", children: "Close" })] })] }) }));
|
|
683
|
+
Ae.displayName = v.Content.displayName;
|
|
684
|
+
const Fe = ({ className: t, ...e }) => r("div", { className: S("flex flex-col space-y-2 text-center sm:text-left", t), ...e });
|
|
1243
685
|
Fe.displayName = "SheetHeader";
|
|
1244
|
-
const Oe = R.forwardRef(({ className: t, ...e }, n) =>
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
...e
|
|
1250
|
-
}
|
|
1251
|
-
));
|
|
1252
|
-
Oe.displayName = x.Title.displayName;
|
|
1253
|
-
const ke = R.forwardRef(({ className: t, ...e }, n) => /* @__PURE__ */ r(
|
|
1254
|
-
x.Description,
|
|
1255
|
-
{
|
|
1256
|
-
ref: n,
|
|
1257
|
-
className: A("text-sm text-muted-foreground", t),
|
|
1258
|
-
...e
|
|
1259
|
-
}
|
|
1260
|
-
));
|
|
1261
|
-
ke.displayName = x.Description.displayName;
|
|
1262
|
-
function St({ group: t, availableFields: e }) {
|
|
686
|
+
const Oe = R.forwardRef(({ className: t, ...e }, n) => r(v.Title, { ref: n, className: S("text-lg font-semibold text-foreground", t), ...e }));
|
|
687
|
+
Oe.displayName = v.Title.displayName;
|
|
688
|
+
const ke = R.forwardRef(({ className: t, ...e }, n) => r(v.Description, { ref: n, className: S("text-sm text-muted-foreground", t), ...e }));
|
|
689
|
+
ke.displayName = v.Description.displayName;
|
|
690
|
+
function Et({ group: t, availableFields: e }) {
|
|
1263
691
|
const { updateFilterGroup: n, removeFilterGroup: a } = B(), o = () => {
|
|
1264
692
|
const u = {
|
|
1265
693
|
id: crypto.randomUUID(),
|
|
@@ -1273,63 +701,20 @@ function St({ group: t, availableFields: e }) {
|
|
|
1273
701
|
});
|
|
1274
702
|
}, l = (u) => {
|
|
1275
703
|
n(t.id, {
|
|
1276
|
-
rules: t.rules.filter((
|
|
704
|
+
rules: t.rules.filter((s) => "id" in s && s.id !== u)
|
|
1277
705
|
});
|
|
1278
|
-
}, c = (u,
|
|
706
|
+
}, c = (u, s) => {
|
|
1279
707
|
n(t.id, {
|
|
1280
|
-
rules: t.rules.map((
|
|
708
|
+
rules: t.rules.map((d) => "id" in d && d.id === u ? { ...d, ...s } : d)
|
|
1281
709
|
});
|
|
1282
710
|
};
|
|
1283
|
-
return
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
{
|
|
1289
|
-
variant: "ghost",
|
|
1290
|
-
size: "sm",
|
|
1291
|
-
className: "h-7 text-[10px] uppercase font-bold tracking-wider hover:bg-white",
|
|
1292
|
-
onClick: () => {
|
|
1293
|
-
n(t.id, {
|
|
1294
|
-
conjunction: t.conjunction === "and" ? "or" : "and"
|
|
1295
|
-
});
|
|
1296
|
-
},
|
|
1297
|
-
children: t.conjunction
|
|
1298
|
-
}
|
|
1299
|
-
),
|
|
1300
|
-
/* @__PURE__ */ r("span", { className: "text-xs text-muted-foreground italic", children: "dos seguintes critérios:" })
|
|
1301
|
-
] }),
|
|
1302
|
-
/* @__PURE__ */ r(
|
|
1303
|
-
w,
|
|
1304
|
-
{
|
|
1305
|
-
variant: "ghost",
|
|
1306
|
-
size: "icon",
|
|
1307
|
-
className: "h-8 w-8 text-destructive opacity-0 group-hover:opacity-100 transition-opacity",
|
|
1308
|
-
onClick: () => a(t.id),
|
|
1309
|
-
children: /* @__PURE__ */ r(oe, { className: "h-4 w-4" })
|
|
1310
|
-
}
|
|
1311
|
-
)
|
|
1312
|
-
] }),
|
|
1313
|
-
/* @__PURE__ */ i("div", { className: "space-y-3", children: [
|
|
1314
|
-
t.rules.map((u) => "field" in u ? /* @__PURE__ */ r(
|
|
1315
|
-
At,
|
|
1316
|
-
{
|
|
1317
|
-
rule: u,
|
|
1318
|
-
availableFields: e,
|
|
1319
|
-
onDelete: () => l(u.id),
|
|
1320
|
-
onUpdate: (d) => c(u.id, d)
|
|
1321
|
-
},
|
|
1322
|
-
u.id
|
|
1323
|
-
) : null),
|
|
1324
|
-
t.rules.length === 0 && /* @__PURE__ */ r("div", { className: "text-center py-4 border-2 border-dashed rounded-md bg-white/50 cursor-pointer hover:bg-white transition-colors", onClick: o, children: /* @__PURE__ */ r("p", { className: "text-xs text-muted-foreground", children: "Nenhuma regra definida. Clique para adicionar." }) })
|
|
1325
|
-
] }),
|
|
1326
|
-
/* @__PURE__ */ i(w, { variant: "ghost", size: "sm", className: "w-full h-8 text-xs border-dashed border hover:border-solid mt-2 bg-white", onClick: o, children: [
|
|
1327
|
-
/* @__PURE__ */ r(G, { className: "mr-2 h-3 w-3" }),
|
|
1328
|
-
"Adicionar Regra"
|
|
1329
|
-
] })
|
|
1330
|
-
] });
|
|
711
|
+
return i("div", { className: "p-4 border rounded-lg bg-slate-50/50 space-y-4 relative group", children: [i("div", { className: "flex items-center justify-between", children: [i("div", { className: "flex items-center gap-2", children: [r(w, { variant: "ghost", size: "sm", className: "h-7 text-[10px] uppercase font-bold tracking-wider hover:bg-white", onClick: () => {
|
|
712
|
+
n(t.id, {
|
|
713
|
+
conjunction: t.conjunction === "and" ? "or" : "and"
|
|
714
|
+
});
|
|
715
|
+
}, children: t.conjunction }), r("span", { className: "text-xs text-muted-foreground italic", children: "dos seguintes critérios:" })] }), r(w, { variant: "ghost", size: "icon", className: "h-8 w-8 text-destructive opacity-0 group-hover:opacity-100 transition-opacity", onClick: () => a(t.id), children: r(oe, { className: "h-4 w-4" }) })] }), i("div", { className: "space-y-3", children: [t.rules.map((u) => "field" in u ? r(St, { rule: u, availableFields: e, onDelete: () => l(u.id), onUpdate: (s) => c(u.id, s) }, u.id) : null), t.rules.length === 0 && r("div", { className: "text-center py-4 border-2 border-dashed rounded-md bg-white/50 cursor-pointer hover:bg-white transition-colors", onClick: o, children: r("p", { className: "text-xs text-muted-foreground", children: "Nenhuma regra definida. Clique para adicionar." }) })] }), i(w, { variant: "ghost", size: "sm", className: "w-full h-8 text-xs border-dashed border hover:border-solid mt-2 bg-white", onClick: o, children: [r(G, { className: "mr-2 h-3 w-3" }), "Adicionar Regra"] })] });
|
|
1331
716
|
}
|
|
1332
|
-
function
|
|
717
|
+
function St({ rule: t, availableFields: e, onDelete: n, onUpdate: a }) {
|
|
1333
718
|
const o = [
|
|
1334
719
|
{ label: "contém", value: "contains" },
|
|
1335
720
|
{ label: "não contém", value: "notContains" },
|
|
@@ -1340,64 +725,9 @@ function At({ rule: t, availableFields: e, onDelete: n, onUpdate: a }) {
|
|
|
1340
725
|
{ label: "está vazio", value: "isEmpty" },
|
|
1341
726
|
{ label: "não está vazio", value: "isNotEmpty" }
|
|
1342
727
|
];
|
|
1343
|
-
return
|
|
1344
|
-
/* @__PURE__ */ r(
|
|
1345
|
-
"input",
|
|
1346
|
-
{
|
|
1347
|
-
type: "checkbox",
|
|
1348
|
-
checked: t.enabled,
|
|
1349
|
-
onChange: (l) => a({ enabled: l.target.checked }),
|
|
1350
|
-
className: "h-3 w-3 rounded border-slate-300 text-primary focus:ring-primary cursor-pointer",
|
|
1351
|
-
title: t.enabled ? "Desabilitar regra" : "Habilitar regra"
|
|
1352
|
-
}
|
|
1353
|
-
),
|
|
1354
|
-
/* @__PURE__ */ i(
|
|
1355
|
-
"select",
|
|
1356
|
-
{
|
|
1357
|
-
value: t.field,
|
|
1358
|
-
onChange: (l) => a({ field: l.target.value }),
|
|
1359
|
-
className: "flex-[1.5] min-w-[100px] bg-transparent text-[11px] font-semibold focus:outline-none truncate",
|
|
1360
|
-
disabled: !t.enabled,
|
|
1361
|
-
children: [
|
|
1362
|
-
/* @__PURE__ */ r("option", { value: "", disabled: !0, children: "Campo..." }),
|
|
1363
|
-
e.map((l) => /* @__PURE__ */ r("option", { value: l.value, children: l.label }, l.value))
|
|
1364
|
-
]
|
|
1365
|
-
}
|
|
1366
|
-
),
|
|
1367
|
-
/* @__PURE__ */ r(
|
|
1368
|
-
"select",
|
|
1369
|
-
{
|
|
1370
|
-
value: t.operator,
|
|
1371
|
-
onChange: (l) => a({ operator: l.target.value }),
|
|
1372
|
-
className: "flex-1 min-w-[90px] bg-transparent text-[11px] text-muted-foreground focus:outline-none border-x px-2",
|
|
1373
|
-
disabled: !t.enabled,
|
|
1374
|
-
children: o.map((l) => /* @__PURE__ */ r("option", { value: l.value, children: l.label }, l.value))
|
|
1375
|
-
}
|
|
1376
|
-
),
|
|
1377
|
-
/* @__PURE__ */ r(
|
|
1378
|
-
"input",
|
|
1379
|
-
{
|
|
1380
|
-
type: (e.find((l) => l.value === t.field)?.type ?? "text") === "number" ? "number" : "text",
|
|
1381
|
-
value: t.value || "",
|
|
1382
|
-
onChange: (l) => a({ value: l.target.value }),
|
|
1383
|
-
placeholder: "Valor...",
|
|
1384
|
-
disabled: !t.enabled || t.operator === "isEmpty" || t.operator === "isNotEmpty",
|
|
1385
|
-
className: "flex-[2] min-w-[100px] bg-transparent text-[11px] focus:outline-none placeholder:italic disabled:opacity-30 font-medium"
|
|
1386
|
-
}
|
|
1387
|
-
),
|
|
1388
|
-
/* @__PURE__ */ r(
|
|
1389
|
-
w,
|
|
1390
|
-
{
|
|
1391
|
-
variant: "ghost",
|
|
1392
|
-
size: "icon",
|
|
1393
|
-
className: "h-6 w-6 shrink-0 hover:bg-destructive/10 hover:text-destructive opacity-0 group-row-hover/row:opacity-100 transition-opacity",
|
|
1394
|
-
onClick: n,
|
|
1395
|
-
children: /* @__PURE__ */ r(Q, { className: "h-3 w-3" })
|
|
1396
|
-
}
|
|
1397
|
-
)
|
|
1398
|
-
] });
|
|
728
|
+
return i("div", { className: `flex items-center gap-2 bg-white p-2 rounded-md border shadow-sm transition-all duration-200 group/row ${t.enabled ? "hover:border-primary/30" : "opacity-50 grayscale bg-slate-50"}`, children: [r("input", { type: "checkbox", checked: t.enabled, onChange: (l) => a({ enabled: l.target.checked }), className: "h-3 w-3 rounded border-slate-300 text-primary focus:ring-primary cursor-pointer", title: t.enabled ? "Desabilitar regra" : "Habilitar regra" }), i("select", { value: t.field, onChange: (l) => a({ field: l.target.value }), className: "flex-[1.5] min-w-[100px] bg-transparent text-[11px] font-semibold focus:outline-none truncate", disabled: !t.enabled, children: [r("option", { value: "", disabled: !0, children: "Campo..." }), e.map((l) => r("option", { value: l.value, children: l.label }, l.value))] }), r("select", { value: t.operator, onChange: (l) => a({ operator: l.target.value }), className: "flex-1 min-w-[90px] bg-transparent text-[11px] text-muted-foreground focus:outline-none border-x px-2", disabled: !t.enabled, children: o.map((l) => r("option", { value: l.value, children: l.label }, l.value)) }), r("input", { type: (e.find((l) => l.value === t.field)?.type ?? "text") === "number" ? "number" : "text", value: t.value || "", onChange: (l) => a({ value: l.target.value }), placeholder: "Valor...", disabled: !t.enabled || t.operator === "isEmpty" || t.operator === "isNotEmpty", className: "flex-[2] min-w-[100px] bg-transparent text-[11px] focus:outline-none placeholder:italic disabled:opacity-30 font-medium" }), r(w, { variant: "ghost", size: "icon", className: "h-6 w-6 shrink-0 hover:bg-destructive/10 hover:text-destructive opacity-0 group-row-hover/row:opacity-100 transition-opacity", onClick: n, children: r(Q, { className: "h-3 w-3" }) })] });
|
|
1399
729
|
}
|
|
1400
|
-
function
|
|
730
|
+
function At(t) {
|
|
1401
731
|
const e = {
|
|
1402
732
|
title: { label: "Título", value: "title", type: "text" },
|
|
1403
733
|
description: { label: "Descrição", value: "description", type: "text" }
|
|
@@ -1417,7 +747,7 @@ function Et(t) {
|
|
|
1417
747
|
}), Object.values(e);
|
|
1418
748
|
}
|
|
1419
749
|
function Ft() {
|
|
1420
|
-
const { filters: t, addFilterGroup: e, cards: n } = B(), a = $(() =>
|
|
750
|
+
const { filters: t, addFilterGroup: e, cards: n } = B(), a = $(() => At(n), [n]), o = () => {
|
|
1421
751
|
const l = {
|
|
1422
752
|
id: crypto.randomUUID(),
|
|
1423
753
|
conjunction: "and",
|
|
@@ -1426,194 +756,34 @@ function Ft() {
|
|
|
1426
756
|
};
|
|
1427
757
|
e(l);
|
|
1428
758
|
};
|
|
1429
|
-
return
|
|
1430
|
-
/* @__PURE__ */ r(yt, { asChild: !0, children: /* @__PURE__ */ i(w, { variant: "outline", size: "sm", className: "gap-2 text-slate-600 bg-white hover:bg-slate-50 border-slate-200 shadow-sm", children: [
|
|
1431
|
-
/* @__PURE__ */ r(ce, { className: "h-4 w-4" }),
|
|
1432
|
-
"Filtros",
|
|
1433
|
-
t.groups.length > 0 && /* @__PURE__ */ r("span", { className: "flex h-5 w-5 items-center justify-center rounded-full bg-primary text-[10px] text-primary-foreground font-bold shadow-sm", children: t.groups.length })
|
|
1434
|
-
] }) }),
|
|
1435
|
-
/* @__PURE__ */ i(Ee, { className: "w-full sm:w-[600px] sm:max-w-none overflow-y-auto bg-white/95 backdrop-blur-sm border-l shadow-2xl", children: [
|
|
1436
|
-
/* @__PURE__ */ r(Fe, { className: "pb-6 border-b", children: /* @__PURE__ */ i("div", { className: "flex items-center justify-between", children: [
|
|
1437
|
-
/* @__PURE__ */ i("div", { children: [
|
|
1438
|
-
/* @__PURE__ */ r(Oe, { className: "text-xl font-bold text-slate-800", children: "Filtros Avançados" }),
|
|
1439
|
-
/* @__PURE__ */ r(ke, { className: "text-sm text-slate-500", children: "Crie combinações de filtros para refinar sua visualização do board." })
|
|
1440
|
-
] }),
|
|
1441
|
-
t.groups.length > 0 && /* @__PURE__ */ r(
|
|
1442
|
-
w,
|
|
1443
|
-
{
|
|
1444
|
-
variant: "ghost",
|
|
1445
|
-
size: "sm",
|
|
1446
|
-
onClick: B.getState().clearFilters,
|
|
1447
|
-
className: "text-xs font-bold text-slate-400 hover:text-destructive h-8",
|
|
1448
|
-
children: "Limpar Tudo"
|
|
1449
|
-
}
|
|
1450
|
-
)
|
|
1451
|
-
] }) }),
|
|
1452
|
-
/* @__PURE__ */ i("div", { className: "mt-8 space-y-6", children: [
|
|
1453
|
-
t.groups.length === 0 ? /* @__PURE__ */ i("div", { className: "text-center py-12 px-6 bg-slate-50/50 border-2 border-dashed border-slate-200 rounded-xl space-y-2", children: [
|
|
1454
|
-
/* @__PURE__ */ r(ce, { className: "mx-auto h-8 w-8 text-slate-300" }),
|
|
1455
|
-
/* @__PURE__ */ r("p", { className: "text-slate-600 font-medium", children: "Nenhum filtro ativo." }),
|
|
1456
|
-
/* @__PURE__ */ r("p", { className: "text-xs text-slate-400", children: "Adicione um grupo para começar a filtrar seus itens." })
|
|
1457
|
-
] }) : /* @__PURE__ */ r("div", { className: "space-y-6", children: t.groups.map((l) => /* @__PURE__ */ r(
|
|
1458
|
-
St,
|
|
1459
|
-
{
|
|
1460
|
-
group: l,
|
|
1461
|
-
availableFields: a
|
|
1462
|
-
},
|
|
1463
|
-
l.id
|
|
1464
|
-
)) }),
|
|
1465
|
-
/* @__PURE__ */ i(w, { onClick: o, className: "w-full", variant: "outline", children: [
|
|
1466
|
-
/* @__PURE__ */ r(G, { className: "mr-2 h-4 w-4" }),
|
|
1467
|
-
"Adicionar Grupo de Filtros"
|
|
1468
|
-
] })
|
|
1469
|
-
] })
|
|
1470
|
-
] })
|
|
1471
|
-
] });
|
|
759
|
+
return i(wt, { children: [r(yt, { asChild: !0, children: i(w, { variant: "outline", size: "sm", className: "gap-2 text-slate-600 bg-white hover:bg-slate-50 border-slate-200 shadow-sm", children: [r(ce, { className: "h-4 w-4" }), "Filtros", t.groups.length > 0 && r("span", { className: "flex h-5 w-5 items-center justify-center rounded-full bg-primary text-[10px] text-primary-foreground font-bold shadow-sm", children: t.groups.length })] }) }), i(Ae, { className: "w-full sm:w-[600px] sm:max-w-none overflow-y-auto bg-white/95 backdrop-blur-sm border-l shadow-2xl", children: [r(Fe, { className: "pb-6 border-b", children: i("div", { className: "flex items-center justify-between", children: [i("div", { children: [r(Oe, { className: "text-xl font-bold text-slate-800", children: "Filtros Avançados" }), r(ke, { className: "text-sm text-slate-500", children: "Crie combinações de filtros para refinar sua visualização do board." })] }), t.groups.length > 0 && r(w, { variant: "ghost", size: "sm", onClick: B.getState().clearFilters, className: "text-xs font-bold text-slate-400 hover:text-destructive h-8", children: "Limpar Tudo" })] }) }), i("div", { className: "mt-8 space-y-6", children: [t.groups.length === 0 ? i("div", { className: "text-center py-12 px-6 bg-slate-50/50 border-2 border-dashed border-slate-200 rounded-xl space-y-2", children: [r(ce, { className: "mx-auto h-8 w-8 text-slate-300" }), r("p", { className: "text-slate-600 font-medium", children: "Nenhum filtro ativo." }), r("p", { className: "text-xs text-slate-400", children: "Adicione um grupo para começar a filtrar seus itens." })] }) : r("div", { className: "space-y-6", children: t.groups.map((l) => r(Et, { group: l, availableFields: a }, l.id)) }), i(w, { onClick: o, className: "w-full", variant: "outline", children: [r(G, { className: "mr-2 h-4 w-4" }), "Adicionar Grupo de Filtros"] })] })] })] });
|
|
1472
760
|
}
|
|
1473
761
|
function Ot({ columnId: t, onAdd: e, onCancel: n }) {
|
|
1474
|
-
const [a, o] = D(""), [l, c] = D(""), [p, u] = D("medium")
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
title: a,
|
|
1483
|
-
description: l,
|
|
1484
|
-
metadata: { priority: p }
|
|
1485
|
-
});
|
|
1486
|
-
}, className: "grid gap-4 py-4", children: [
|
|
1487
|
-
/* @__PURE__ */ i("div", { className: "grid gap-2", children: [
|
|
1488
|
-
/* @__PURE__ */ r("label", { htmlFor: "title", className: "text-sm font-medium leading-none", children: "Título" }),
|
|
1489
|
-
/* @__PURE__ */ r(
|
|
1490
|
-
"input",
|
|
1491
|
-
{
|
|
1492
|
-
id: "title",
|
|
1493
|
-
autoFocus: !0,
|
|
1494
|
-
value: a,
|
|
1495
|
-
onChange: (s) => o(s.target.value),
|
|
1496
|
-
className: "flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
1497
|
-
placeholder: "O que precisa ser feito?"
|
|
1498
|
-
}
|
|
1499
|
-
)
|
|
1500
|
-
] }),
|
|
1501
|
-
/* @__PURE__ */ i("div", { className: "grid gap-2", children: [
|
|
1502
|
-
/* @__PURE__ */ r("label", { className: "text-sm font-medium leading-none", children: "Prioridade" }),
|
|
1503
|
-
/* @__PURE__ */ r("div", { className: "flex gap-2", children: ["low", "medium", "high"].map((s) => /* @__PURE__ */ r(
|
|
1504
|
-
"button",
|
|
1505
|
-
{
|
|
1506
|
-
type: "button",
|
|
1507
|
-
onClick: () => u(s),
|
|
1508
|
-
className: S(
|
|
1509
|
-
"flex-1 px-3 py-2 text-xs font-bold uppercase tracking-wider rounded-md border transition-all",
|
|
1510
|
-
p === s ? s === "high" ? "bg-red-100 border-red-500 text-red-700" : s === "medium" ? "bg-amber-100 border-amber-500 text-amber-900" : "bg-emerald-100 border-emerald-500 text-emerald-800" : "bg-transparent border-slate-200 text-slate-500 hover:bg-slate-50"
|
|
1511
|
-
),
|
|
1512
|
-
children: s === "low" ? "Baixa" : s === "medium" ? "Média" : "Alta"
|
|
1513
|
-
},
|
|
1514
|
-
s
|
|
1515
|
-
)) })
|
|
1516
|
-
] }),
|
|
1517
|
-
/* @__PURE__ */ i("div", { className: "grid gap-2", children: [
|
|
1518
|
-
/* @__PURE__ */ r("label", { htmlFor: "desc", className: "text-sm font-medium leading-none", children: "Descrição" }),
|
|
1519
|
-
/* @__PURE__ */ r(
|
|
1520
|
-
"textarea",
|
|
1521
|
-
{
|
|
1522
|
-
id: "desc",
|
|
1523
|
-
value: l,
|
|
1524
|
-
onChange: (s) => c(s.target.value),
|
|
1525
|
-
rows: 3,
|
|
1526
|
-
className: "flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm resize-none focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
1527
|
-
placeholder: "Detalhes adicionais..."
|
|
1528
|
-
}
|
|
1529
|
-
)
|
|
1530
|
-
] }),
|
|
1531
|
-
/* @__PURE__ */ i(te, { children: [
|
|
1532
|
-
/* @__PURE__ */ r(w, { type: "button", variant: "outline", onClick: n, children: "Cancelar" }),
|
|
1533
|
-
/* @__PURE__ */ i(w, { type: "submit", className: "gap-2 bg-blue-600 hover:bg-blue-700 text-white", children: [
|
|
1534
|
-
/* @__PURE__ */ r(G, { size: 16 }),
|
|
1535
|
-
"Criar Card"
|
|
1536
|
-
] })
|
|
1537
|
-
] })
|
|
1538
|
-
] })
|
|
1539
|
-
] }) });
|
|
762
|
+
const [a, o] = D(""), [l, c] = D(""), [p, u] = D("medium"), s = (d) => {
|
|
763
|
+
d.preventDefault(), e({
|
|
764
|
+
title: a,
|
|
765
|
+
description: l,
|
|
766
|
+
metadata: { priority: p }
|
|
767
|
+
});
|
|
768
|
+
};
|
|
769
|
+
return r(ee, { open: !0, onOpenChange: (d) => !d && n(), children: i(U, { className: "sm:max-w-[425px]", children: [i(P, { children: [r(_, { children: "Adicionar Novo Card" }), r(re, { children: "Novo item para a coluna." })] }), i("form", { onSubmit: s, className: "grid gap-4 py-4", children: [i("div", { className: "grid gap-2", children: [r("label", { htmlFor: "title", className: "text-sm font-medium leading-none", children: "Título" }), r("input", { id: "title", autoFocus: !0, value: a, onChange: (d) => o(d.target.value), className: "flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring", placeholder: "O que precisa ser feito?" })] }), i("div", { className: "grid gap-2", children: [r("label", { className: "text-sm font-medium leading-none", children: "Prioridade" }), r("div", { className: "flex gap-2", children: ["low", "medium", "high"].map((d) => r("button", { type: "button", onClick: () => u(d), className: E("flex-1 px-3 py-2 text-xs font-bold uppercase tracking-wider rounded-md border transition-all", p === d ? d === "high" ? "bg-red-100 border-red-500 text-red-700" : d === "medium" ? "bg-amber-100 border-amber-500 text-amber-900" : "bg-emerald-100 border-emerald-500 text-emerald-800" : "bg-transparent border-slate-200 text-slate-500 hover:bg-slate-50"), children: d === "low" ? "Baixa" : d === "medium" ? "Média" : "Alta" }, d)) })] }), i("div", { className: "grid gap-2", children: [r("label", { htmlFor: "desc", className: "text-sm font-medium leading-none", children: "Descrição" }), r("textarea", { id: "desc", value: l, onChange: (d) => c(d.target.value), rows: 3, className: "flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm resize-none focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring", placeholder: "Detalhes adicionais..." })] }), i(te, { children: [r(w, { type: "button", variant: "outline", onClick: n, children: "Cancelar" }), i(w, { type: "submit", className: "gap-2 bg-blue-600 hover:bg-blue-700 text-white", children: [r(G, { size: 16 }), "Criar Card"] })] })] })] }) });
|
|
1540
770
|
}
|
|
1541
771
|
function kt({ column: t, onSave: e, onCancel: n, onDelete: a }) {
|
|
1542
|
-
const [o, l] = D(t.title || "")
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
/* @__PURE__ */ i("form", { onSubmit: (p) => {
|
|
1549
|
-
p.preventDefault(), e({ title: o });
|
|
1550
|
-
}, className: "grid gap-4 py-4", children: [
|
|
1551
|
-
/* @__PURE__ */ i("div", { className: "grid gap-2", children: [
|
|
1552
|
-
/* @__PURE__ */ r("label", { htmlFor: "col-title", className: "text-sm font-medium leading-none", children: "Nome da Coluna" }),
|
|
1553
|
-
/* @__PURE__ */ r(
|
|
1554
|
-
"input",
|
|
1555
|
-
{
|
|
1556
|
-
id: "col-title",
|
|
1557
|
-
autoFocus: !0,
|
|
1558
|
-
value: o,
|
|
1559
|
-
onChange: (p) => l(p.target.value),
|
|
1560
|
-
className: "flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
1561
|
-
placeholder: "Ex: A Fazer"
|
|
1562
|
-
}
|
|
1563
|
-
)
|
|
1564
|
-
] }),
|
|
1565
|
-
/* @__PURE__ */ i(te, { className: "flex items-center justify-between w-full sm:justify-between", children: [
|
|
1566
|
-
a ? /* @__PURE__ */ i(
|
|
1567
|
-
w,
|
|
1568
|
-
{
|
|
1569
|
-
type: "button",
|
|
1570
|
-
variant: "destructive",
|
|
1571
|
-
size: "sm",
|
|
1572
|
-
onClick: () => {
|
|
1573
|
-
window.confirm("Tem certeza que deseja excluir esta coluna e mover seus cards para a anterior?") && a();
|
|
1574
|
-
},
|
|
1575
|
-
className: "gap-2",
|
|
1576
|
-
children: [
|
|
1577
|
-
/* @__PURE__ */ r(oe, { size: 14 }),
|
|
1578
|
-
"Excluir"
|
|
1579
|
-
]
|
|
1580
|
-
}
|
|
1581
|
-
) : /* @__PURE__ */ r("div", {}),
|
|
1582
|
-
/* @__PURE__ */ i("div", { className: "flex gap-2", children: [
|
|
1583
|
-
/* @__PURE__ */ r(w, { type: "button", variant: "outline", onClick: n, children: "Cancelar" }),
|
|
1584
|
-
/* @__PURE__ */ i(w, { type: "submit", className: "gap-2", children: [
|
|
1585
|
-
/* @__PURE__ */ r(ve, { size: 14 }),
|
|
1586
|
-
"Salvar"
|
|
1587
|
-
] })
|
|
1588
|
-
] })
|
|
1589
|
-
] })
|
|
1590
|
-
] })
|
|
1591
|
-
] }) });
|
|
772
|
+
const [o, l] = D(t.title || ""), c = (p) => {
|
|
773
|
+
p.preventDefault(), e({ title: o });
|
|
774
|
+
};
|
|
775
|
+
return r(ee, { open: !0, onOpenChange: (p) => !p && n(), children: i(U, { className: "sm:max-w-[400px]", children: [i(P, { children: [r(_, { children: "Editar Coluna" }), r(re, { children: "Gerencie as configurações desta coluna." })] }), i("form", { onSubmit: c, className: "grid gap-4 py-4", children: [i("div", { className: "grid gap-2", children: [r("label", { htmlFor: "col-title", className: "text-sm font-medium leading-none", children: "Nome da Coluna" }), r("input", { id: "col-title", autoFocus: !0, value: o, onChange: (p) => l(p.target.value), className: "flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring", placeholder: "Ex: A Fazer" })] }), i(te, { className: "flex items-center justify-between w-full sm:justify-between", children: [a ? i(w, { type: "button", variant: "destructive", size: "sm", onClick: () => {
|
|
776
|
+
window.confirm("Tem certeza que deseja excluir esta coluna e mover seus cards para a anterior?") && a();
|
|
777
|
+
}, className: "gap-2", children: [r(oe, { size: 14 }), "Excluir"] }) : r("div", {}), i("div", { className: "flex gap-2", children: [r(w, { type: "button", variant: "outline", onClick: n, children: "Cancelar" }), i(w, { type: "submit", className: "gap-2", children: [r(xe, { size: 14 }), "Salvar"] })] })] })] })] }) });
|
|
1592
778
|
}
|
|
1593
|
-
const zt = M(({
|
|
1594
|
-
children: t
|
|
1595
|
-
}) => {
|
|
779
|
+
const zt = M(({ children: t }) => {
|
|
1596
780
|
const { setNodeRef: e, isOver: n } = We({
|
|
1597
781
|
id: "new-column-drop-target",
|
|
1598
782
|
data: { type: "NewColumn" }
|
|
1599
783
|
});
|
|
1600
|
-
return
|
|
1601
|
-
}), jt = M(({
|
|
1602
|
-
|
|
1603
|
-
start: e,
|
|
1604
|
-
width: n,
|
|
1605
|
-
children: a,
|
|
1606
|
-
allowReorder: o,
|
|
1607
|
-
cardIds: l
|
|
1608
|
-
}) => {
|
|
1609
|
-
const {
|
|
1610
|
-
attributes: c,
|
|
1611
|
-
listeners: p,
|
|
1612
|
-
setNodeRef: u,
|
|
1613
|
-
transform: d,
|
|
1614
|
-
transition: s,
|
|
1615
|
-
isDragging: g
|
|
1616
|
-
} = ge({
|
|
784
|
+
return r(Re, { children: t(n, e) });
|
|
785
|
+
}), jt = M(({ id: t, start: e, width: n, children: a, allowReorder: o, cardIds: l }) => {
|
|
786
|
+
const { attributes: c, listeners: p, setNodeRef: u, transform: s, transition: d, isDragging: g } = ge({
|
|
1617
787
|
id: t,
|
|
1618
788
|
disabled: !o,
|
|
1619
789
|
data: {
|
|
@@ -1627,21 +797,19 @@ const zt = M(({
|
|
|
1627
797
|
left: `${e}px`,
|
|
1628
798
|
// Virtual positioning via left, NOT transform
|
|
1629
799
|
width: `${n}px`,
|
|
1630
|
-
transition:
|
|
800
|
+
transition: d || "transform 250ms cubic-bezier(0.18, 0.67, 0.6, 1.22)",
|
|
1631
801
|
// Transform is now ONLY for dnd-kit's sorting logic
|
|
1632
|
-
transform:
|
|
802
|
+
transform: s && !g ? ye.Transform.toString(s) : void 0,
|
|
1633
803
|
zIndex: g ? 50 : void 0,
|
|
1634
804
|
pointerEvents: g ? "none" : void 0,
|
|
1635
805
|
animation: g ? "tilt 0.2s ease-in-out forwards" : void 0
|
|
1636
806
|
};
|
|
1637
|
-
return
|
|
807
|
+
return r("div", { ref: u, style: h, children: nt(a) ? rt(a, {
|
|
1638
808
|
dragHandleProps: o ? { attributes: c, listeners: p } : void 0,
|
|
1639
809
|
isDragging: g
|
|
1640
810
|
}) : a });
|
|
1641
811
|
});
|
|
1642
|
-
function Pt({
|
|
1643
|
-
config: t
|
|
1644
|
-
}) {
|
|
812
|
+
function Pt({ config: t }) {
|
|
1645
813
|
const e = it(t), n = j(null), a = fe({
|
|
1646
814
|
horizontal: !0,
|
|
1647
815
|
count: e.columnOrder.length,
|
|
@@ -1651,13 +819,13 @@ function Pt({
|
|
|
1651
819
|
}), o = $(() => {
|
|
1652
820
|
const m = {};
|
|
1653
821
|
Object.values(e.cards).forEach((N) => {
|
|
1654
|
-
|
|
822
|
+
st(N, e.filters) && (m[N.id] = N);
|
|
1655
823
|
});
|
|
1656
824
|
const b = {};
|
|
1657
825
|
return Object.values(e.columns).forEach((N) => {
|
|
1658
826
|
b[N.id] = {
|
|
1659
827
|
...N,
|
|
1660
|
-
cardIds: N.cardIds.filter((
|
|
828
|
+
cardIds: N.cardIds.filter((x) => m[x])
|
|
1661
829
|
};
|
|
1662
830
|
}), {
|
|
1663
831
|
cards: m,
|
|
@@ -1669,7 +837,7 @@ function Pt({
|
|
|
1669
837
|
c.current = !1;
|
|
1670
838
|
});
|
|
1671
839
|
}, [e.columnOrder, e.columns]);
|
|
1672
|
-
const p =
|
|
840
|
+
const p = dt({
|
|
1673
841
|
dragActivationDistance: e.config.dragActivationDistance,
|
|
1674
842
|
touchActivationDelay: e.config.touchActivationDelay,
|
|
1675
843
|
onDragStart: (m, b) => {
|
|
@@ -1685,10 +853,10 @@ function Pt({
|
|
|
1685
853
|
columns: e.columns,
|
|
1686
854
|
columnOrder: e.columnOrder,
|
|
1687
855
|
recentlyMovedToNewContainer: c
|
|
1688
|
-
}), u = e.activeId && e.cards[e.activeId] ? e.cards[e.activeId] : null,
|
|
1689
|
-
renderCard: t?.renderCard ?? ((m) =>
|
|
1690
|
-
renderColumnHeader: t?.renderColumnHeader ?? ((m) =>
|
|
1691
|
-
renderColumnEmpty: t?.renderColumnEmpty ?? (() =>
|
|
856
|
+
}), u = e.activeId && e.cards[e.activeId] ? e.cards[e.activeId] : null, s = e.activeId && e.columnOrder.includes(e.activeId) ? e.columns[e.activeId] : null, d = e.viewingCardId ? e.cards[e.viewingCardId] : null, g = e.editingColumnId ? e.columns[e.editingColumnId] : null, h = {
|
|
857
|
+
renderCard: t?.renderCard ?? ((m) => r(Ie, { ...m })),
|
|
858
|
+
renderColumnHeader: t?.renderColumnHeader ?? ((m) => r(Ee, { ...m })),
|
|
859
|
+
renderColumnEmpty: t?.renderColumnEmpty ?? (() => r(De, {})),
|
|
1692
860
|
renderAddButton: t?.renderAddButton,
|
|
1693
861
|
renderAddForm: t?.renderAddForm,
|
|
1694
862
|
renderEditForm: t?.renderEditForm,
|
|
@@ -1714,21 +882,19 @@ function Pt({
|
|
|
1714
882
|
const b = m.active.id;
|
|
1715
883
|
if (!(b && !e.columnOrder.includes(b)))
|
|
1716
884
|
return ae(m);
|
|
1717
|
-
const
|
|
1718
|
-
if (b &&
|
|
1719
|
-
const k =
|
|
885
|
+
const x = Le(m);
|
|
886
|
+
if (b && x.length > 0) {
|
|
887
|
+
const k = x.find((V) => V.id === "new-column-drop-target");
|
|
1720
888
|
if (k)
|
|
1721
889
|
return [k];
|
|
1722
890
|
}
|
|
1723
|
-
const C =
|
|
891
|
+
const C = x.length > 0 ? x : Ge(m);
|
|
1724
892
|
let y = Ke(C, "id");
|
|
1725
893
|
if (y != null) {
|
|
1726
894
|
if (e.columnOrder.includes(y)) {
|
|
1727
895
|
const k = e.columns[y];
|
|
1728
896
|
if (k && k.cardIds.length > 0) {
|
|
1729
|
-
const V = m.droppableContainers.filter(
|
|
1730
|
-
(F) => F.id !== y && k.cardIds.includes(F.id)
|
|
1731
|
-
);
|
|
897
|
+
const V = m.droppableContainers.filter((F) => F.id !== y && k.cardIds.includes(F.id));
|
|
1732
898
|
V.length > 0 && (y = ae({
|
|
1733
899
|
...m,
|
|
1734
900
|
droppableContainers: V
|
|
@@ -1737,204 +903,78 @@ function Pt({
|
|
|
1737
903
|
}
|
|
1738
904
|
return l.current = y, [{ id: y }];
|
|
1739
905
|
}
|
|
1740
|
-
const
|
|
906
|
+
const A = ae({
|
|
1741
907
|
...m,
|
|
1742
|
-
droppableContainers: m.droppableContainers.filter(
|
|
1743
|
-
(k) => k.id !== b
|
|
1744
|
-
)
|
|
908
|
+
droppableContainers: m.droppableContainers.filter((k) => k.id !== b)
|
|
1745
909
|
});
|
|
1746
|
-
return
|
|
910
|
+
return A.length > 0 ? (l.current = A[0].id, A) : (c.current && (l.current = b), l.current ? [{ id: l.current }] : []);
|
|
1747
911
|
};
|
|
1748
|
-
return
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
sensors: p.sensors,
|
|
1752
|
-
collisionDetection: f,
|
|
1753
|
-
measuring: {
|
|
1754
|
-
droppable: {
|
|
1755
|
-
strategy: qe.Always
|
|
1756
|
-
}
|
|
1757
|
-
},
|
|
1758
|
-
onDragStart: p.handleDragStart,
|
|
1759
|
-
onDragOver: p.handleDragOver,
|
|
1760
|
-
onDragEnd: p.handleDragEnd,
|
|
1761
|
-
children: /* @__PURE__ */ i("div", { className: "flex flex-col h-full bg-slate-50 relative group/board overflow-hidden", children: [
|
|
1762
|
-
e.config.allowFilters && /* @__PURE__ */ r("div", { className: "absolute top-4 right-6 z-30 pointer-events-none", children: /* @__PURE__ */ r("div", { className: "pointer-events-auto transition-all duration-300 translate-y-[-10px] opacity-0 group-hover/board:translate-y-0 group-hover/board:opacity-100", children: /* @__PURE__ */ r(Ft, {}) }) }),
|
|
1763
|
-
e.config.allowFilters && /* @__PURE__ */ r(ht, {}),
|
|
1764
|
-
/* @__PURE__ */ r(
|
|
1765
|
-
"div",
|
|
1766
|
-
{
|
|
1767
|
-
ref: n,
|
|
1768
|
-
className: "flex-1 overflow-x-auto overflow-y-hidden",
|
|
1769
|
-
children: /* @__PURE__ */ i(
|
|
1770
|
-
"div",
|
|
1771
|
-
{
|
|
1772
|
-
style: {
|
|
1773
|
-
width: `${a.getTotalSize() + (e.config.allowColumnAdd ? 200 : 0)}px`,
|
|
1774
|
-
height: "100%",
|
|
1775
|
-
position: "relative"
|
|
1776
|
-
},
|
|
1777
|
-
children: [
|
|
1778
|
-
/* @__PURE__ */ r(he, { items: e.columnOrder, strategy: Ue, children: a.getVirtualItems().map((m) => {
|
|
1779
|
-
const b = e.columnOrder[m.index];
|
|
1780
|
-
return /* @__PURE__ */ r(
|
|
1781
|
-
jt,
|
|
1782
|
-
{
|
|
1783
|
-
id: b,
|
|
1784
|
-
start: m.start,
|
|
1785
|
-
width: e.config.columnWidth,
|
|
1786
|
-
allowReorder: e.config.allowColumnReorder,
|
|
1787
|
-
cardIds: o.columns[b]?.cardIds ?? [],
|
|
1788
|
-
children: /* @__PURE__ */ r(
|
|
1789
|
-
pe,
|
|
1790
|
-
{
|
|
1791
|
-
column: o.columns[b],
|
|
1792
|
-
allCards: o.cards,
|
|
1793
|
-
activeId: e.activeId,
|
|
1794
|
-
overId: e.overId,
|
|
1795
|
-
overSide: e.overSide,
|
|
1796
|
-
config: h,
|
|
1797
|
-
isActiveColumnDragging: e.activeId ? e.columnOrder.includes(e.activeId) : !1
|
|
1798
|
-
}
|
|
1799
|
-
)
|
|
1800
|
-
},
|
|
1801
|
-
b
|
|
1802
|
-
);
|
|
1803
|
-
}) }),
|
|
1804
|
-
e.config.allowColumnAdd && /* @__PURE__ */ r(zt, { children: (m, b) => /* @__PURE__ */ r(
|
|
1805
|
-
"div",
|
|
1806
|
-
{
|
|
1807
|
-
ref: b,
|
|
1808
|
-
className: "h-full z-10",
|
|
1809
|
-
style: {
|
|
1810
|
-
position: "absolute",
|
|
1811
|
-
top: 0,
|
|
1812
|
-
left: `${a.getTotalSize()}px`,
|
|
1813
|
-
width: e.config.columnWidth,
|
|
1814
|
-
height: "100%",
|
|
1815
|
-
boxSizing: "border-box",
|
|
1816
|
-
paddingRight: e.config.gap
|
|
1817
|
-
},
|
|
1818
|
-
children: t?.renderAddColumnButton ? t.renderAddColumnButton({ onClick: () => e.addColumn({ title: "Nova Coluna" }) }) : /* @__PURE__ */ i(
|
|
1819
|
-
"button",
|
|
1820
|
-
{
|
|
1821
|
-
onClick: () => e.addColumn({ title: "Nova Coluna" }),
|
|
1822
|
-
className: A(
|
|
1823
|
-
"flex items-center gap-2 w-full p-4 bg-slate-100/50 hover:bg-slate-200 text-slate-600 rounded-lg border-2 border-dashed transition-all font-semibold h-[200px] justify-center",
|
|
1824
|
-
m ? "bg-blue-100 border-blue-400 text-blue-600 scale-[1.02] shadow-lg ring-4 ring-blue-500/20" : "border-slate-300"
|
|
1825
|
-
),
|
|
1826
|
-
children: [
|
|
1827
|
-
/* @__PURE__ */ r(G, { size: 20 }),
|
|
1828
|
-
m ? "Soltar para criar" : "Nova Coluna"
|
|
1829
|
-
]
|
|
1830
|
-
}
|
|
1831
|
-
)
|
|
1832
|
-
}
|
|
1833
|
-
) })
|
|
1834
|
-
]
|
|
1835
|
-
}
|
|
1836
|
-
)
|
|
1837
|
-
}
|
|
1838
|
-
),
|
|
1839
|
-
e.editingCardId && e.config.allowEdit && (() => {
|
|
1840
|
-
const m = e.cards[e.editingCardId];
|
|
1841
|
-
return m ? t?.renderEditForm ? t.renderEditForm({
|
|
1842
|
-
card: m,
|
|
1843
|
-
onSave: (b) => {
|
|
1844
|
-
e.updateCard(e.editingCardId, b), e.clearEditingCardId();
|
|
1845
|
-
},
|
|
1846
|
-
onCancel: e.clearEditingCardId,
|
|
1847
|
-
onDelete: () => {
|
|
1848
|
-
e.deleteCard(e.editingCardId), e.clearEditingCardId();
|
|
1849
|
-
}
|
|
1850
|
-
}) : /* @__PURE__ */ r(
|
|
1851
|
-
pt,
|
|
1852
|
-
{
|
|
1853
|
-
card: m,
|
|
1854
|
-
onSave: (b) => {
|
|
1855
|
-
e.updateCard(e.editingCardId, b), e.clearEditingCardId();
|
|
1856
|
-
},
|
|
1857
|
-
onCancel: e.clearEditingCardId,
|
|
1858
|
-
onDelete: () => {
|
|
1859
|
-
e.deleteCard(e.editingCardId), e.clearEditingCardId();
|
|
1860
|
-
}
|
|
1861
|
-
}
|
|
1862
|
-
) : null;
|
|
1863
|
-
})(),
|
|
1864
|
-
e.addingCardInColumnId && e.config.allowAdd && (t?.renderAddForm ? t.renderAddForm({
|
|
1865
|
-
columnId: e.addingCardInColumnId,
|
|
1866
|
-
onAdd: (m) => {
|
|
1867
|
-
e.addCard(e.addingCardInColumnId, m), e.clearAddingCardInColumnId();
|
|
1868
|
-
},
|
|
1869
|
-
onCancel: e.clearAddingCardInColumnId
|
|
1870
|
-
}) : /* @__PURE__ */ r(
|
|
1871
|
-
Ot,
|
|
1872
|
-
{
|
|
1873
|
-
columnId: e.addingCardInColumnId,
|
|
1874
|
-
onAdd: (m) => {
|
|
1875
|
-
e.addCard(e.addingCardInColumnId, m), e.clearAddingCardInColumnId();
|
|
1876
|
-
},
|
|
1877
|
-
onCancel: e.clearAddingCardInColumnId
|
|
1878
|
-
}
|
|
1879
|
-
)),
|
|
1880
|
-
g && e.config.allowColumnEdit && (t?.renderEditColumnForm ? t.renderEditColumnForm({
|
|
1881
|
-
column: g,
|
|
1882
|
-
onSave: (m) => {
|
|
1883
|
-
e.updateColumn(g.id, m), e.clearEditingColumnId();
|
|
1884
|
-
},
|
|
1885
|
-
onCancel: e.clearEditingColumnId,
|
|
1886
|
-
onDelete: e.config.allowColumnDelete ? () => {
|
|
1887
|
-
e.deleteColumn(g.id), e.clearEditingColumnId();
|
|
1888
|
-
} : void 0
|
|
1889
|
-
}) : /* @__PURE__ */ r(
|
|
1890
|
-
kt,
|
|
1891
|
-
{
|
|
1892
|
-
column: g,
|
|
1893
|
-
onSave: (m) => {
|
|
1894
|
-
e.updateColumn(g.id, m), e.clearEditingColumnId();
|
|
1895
|
-
},
|
|
1896
|
-
onCancel: e.clearEditingColumnId,
|
|
1897
|
-
onDelete: e.config.allowColumnDelete ? () => {
|
|
1898
|
-
e.deleteColumn(g.id), e.clearEditingColumnId();
|
|
1899
|
-
} : void 0
|
|
1900
|
-
}
|
|
1901
|
-
)),
|
|
1902
|
-
s && (h.renderCardView ? h.renderCardView({
|
|
1903
|
-
card: s,
|
|
1904
|
-
onClose: e.clearViewingCardId
|
|
1905
|
-
}) : /* @__PURE__ */ r(
|
|
1906
|
-
gt,
|
|
1907
|
-
{
|
|
1908
|
-
card: s,
|
|
1909
|
-
onClose: e.clearViewingCardId
|
|
1910
|
-
}
|
|
1911
|
-
)),
|
|
1912
|
-
/* @__PURE__ */ i($e, { dropAnimation: null, children: [
|
|
1913
|
-
u && /* @__PURE__ */ r("div", { className: "z-50 cursor-grabbing animate-tilt shadow-2xl rounded-card overflow-hidden", children: h.renderCard({
|
|
1914
|
-
card: u,
|
|
1915
|
-
isDragging: !0
|
|
1916
|
-
}) }),
|
|
1917
|
-
d ? /* @__PURE__ */ r(
|
|
1918
|
-
pe,
|
|
1919
|
-
{
|
|
1920
|
-
column: d,
|
|
1921
|
-
allCards: e.cards,
|
|
1922
|
-
activeId: null,
|
|
1923
|
-
overId: null,
|
|
1924
|
-
overSide: null,
|
|
1925
|
-
config: h,
|
|
1926
|
-
isDragging: !1,
|
|
1927
|
-
isOverlay: !0,
|
|
1928
|
-
dragHandleProps: {
|
|
1929
|
-
attributes: {},
|
|
1930
|
-
listeners: {}
|
|
1931
|
-
}
|
|
1932
|
-
}
|
|
1933
|
-
) : null
|
|
1934
|
-
] })
|
|
1935
|
-
] })
|
|
912
|
+
return r(He, { sensors: p.sensors, collisionDetection: f, measuring: {
|
|
913
|
+
droppable: {
|
|
914
|
+
strategy: qe.Always
|
|
1936
915
|
}
|
|
1937
|
-
)
|
|
916
|
+
}, onDragStart: p.handleDragStart, onDragOver: p.handleDragOver, onDragEnd: p.handleDragEnd, children: i("div", { className: "flex flex-col h-full bg-slate-50 relative group/board overflow-hidden", children: [e.config.allowFilters && r("div", { className: "absolute top-4 right-6 z-30 pointer-events-none", children: r("div", { className: "pointer-events-auto transition-all duration-300 translate-y-[-10px] opacity-0 group-hover/board:translate-y-0 group-hover/board:opacity-100", children: r(Ft, {}) }) }), e.config.allowFilters && r(ht, {}), r("div", { ref: n, className: "flex-1 overflow-x-auto overflow-y-hidden", children: i("div", { style: {
|
|
917
|
+
width: `${a.getTotalSize() + (e.config.allowColumnAdd ? 200 : 0)}px`,
|
|
918
|
+
height: "100%",
|
|
919
|
+
position: "relative"
|
|
920
|
+
}, children: [r(he, { items: e.columnOrder, strategy: Ue, children: a.getVirtualItems().map((m) => {
|
|
921
|
+
const b = e.columnOrder[m.index];
|
|
922
|
+
return r(jt, { id: b, start: m.start, width: e.config.columnWidth, allowReorder: e.config.allowColumnReorder, cardIds: o.columns[b]?.cardIds ?? [], children: r(pe, { column: o.columns[b], allCards: o.cards, activeId: e.activeId, overId: e.overId, overSide: e.overSide, config: h, isActiveColumnDragging: e.activeId ? e.columnOrder.includes(e.activeId) : !1 }) }, b);
|
|
923
|
+
}) }), e.config.allowColumnAdd && r(zt, { children: (m, b) => r("div", { ref: b, className: "h-full z-10", style: {
|
|
924
|
+
position: "absolute",
|
|
925
|
+
top: 0,
|
|
926
|
+
left: `${a.getTotalSize()}px`,
|
|
927
|
+
width: e.config.columnWidth,
|
|
928
|
+
height: "100%",
|
|
929
|
+
boxSizing: "border-box",
|
|
930
|
+
paddingRight: e.config.gap
|
|
931
|
+
}, children: t?.renderAddColumnButton ? t.renderAddColumnButton({ onClick: () => e.addColumn({ title: "Nova Coluna" }) }) : i("button", { onClick: () => e.addColumn({ title: "Nova Coluna" }), className: S("flex items-center gap-2 w-full p-4 bg-slate-100/50 hover:bg-slate-200 text-slate-600 rounded-lg border-2 border-dashed transition-all font-semibold h-[200px] justify-center", m ? "bg-blue-100 border-blue-400 text-blue-600 scale-[1.02] shadow-lg ring-4 ring-blue-500/20" : "border-slate-300"), children: [r(G, { size: 20 }), m ? "Soltar para criar" : "Nova Coluna"] }) }) })] }) }), e.editingCardId && e.config.allowEdit && (() => {
|
|
932
|
+
const m = e.cards[e.editingCardId];
|
|
933
|
+
return m ? t?.renderEditForm ? t.renderEditForm({
|
|
934
|
+
card: m,
|
|
935
|
+
onSave: (b) => {
|
|
936
|
+
e.updateCard(e.editingCardId, b), e.clearEditingCardId();
|
|
937
|
+
},
|
|
938
|
+
onCancel: e.clearEditingCardId,
|
|
939
|
+
onDelete: () => {
|
|
940
|
+
e.deleteCard(e.editingCardId), e.clearEditingCardId();
|
|
941
|
+
}
|
|
942
|
+
}) : r(pt, { card: m, onSave: (b) => {
|
|
943
|
+
e.updateCard(e.editingCardId, b), e.clearEditingCardId();
|
|
944
|
+
}, onCancel: e.clearEditingCardId, onDelete: () => {
|
|
945
|
+
e.deleteCard(e.editingCardId), e.clearEditingCardId();
|
|
946
|
+
} }) : null;
|
|
947
|
+
})(), e.addingCardInColumnId && e.config.allowAdd && (t?.renderAddForm ? t.renderAddForm({
|
|
948
|
+
columnId: e.addingCardInColumnId,
|
|
949
|
+
onAdd: (m) => {
|
|
950
|
+
e.addCard(e.addingCardInColumnId, m), e.clearAddingCardInColumnId();
|
|
951
|
+
},
|
|
952
|
+
onCancel: e.clearAddingCardInColumnId
|
|
953
|
+
}) : r(Ot, { columnId: e.addingCardInColumnId, onAdd: (m) => {
|
|
954
|
+
e.addCard(e.addingCardInColumnId, m), e.clearAddingCardInColumnId();
|
|
955
|
+
}, onCancel: e.clearAddingCardInColumnId })), g && e.config.allowColumnEdit && (t?.renderEditColumnForm ? t.renderEditColumnForm({
|
|
956
|
+
column: g,
|
|
957
|
+
onSave: (m) => {
|
|
958
|
+
e.updateColumn(g.id, m), e.clearEditingColumnId();
|
|
959
|
+
},
|
|
960
|
+
onCancel: e.clearEditingColumnId,
|
|
961
|
+
onDelete: e.config.allowColumnDelete ? () => {
|
|
962
|
+
e.deleteColumn(g.id), e.clearEditingColumnId();
|
|
963
|
+
} : void 0
|
|
964
|
+
}) : r(kt, { column: g, onSave: (m) => {
|
|
965
|
+
e.updateColumn(g.id, m), e.clearEditingColumnId();
|
|
966
|
+
}, onCancel: e.clearEditingColumnId, onDelete: e.config.allowColumnDelete ? () => {
|
|
967
|
+
e.deleteColumn(g.id), e.clearEditingColumnId();
|
|
968
|
+
} : void 0 })), d && (h.renderCardView ? h.renderCardView({
|
|
969
|
+
card: d,
|
|
970
|
+
onClose: e.clearViewingCardId
|
|
971
|
+
}) : r(gt, { card: d, onClose: e.clearViewingCardId })), i($e, { dropAnimation: null, children: [u && r("div", { className: "z-50 cursor-grabbing animate-tilt shadow-2xl rounded-card overflow-hidden", children: h.renderCard({
|
|
972
|
+
card: u,
|
|
973
|
+
isDragging: !0
|
|
974
|
+
}) }), s ? r(pe, { column: s, allCards: e.cards, activeId: null, overId: null, overSide: null, config: h, isDragging: !1, isOverlay: !0, dragHandleProps: {
|
|
975
|
+
attributes: {},
|
|
976
|
+
listeners: {}
|
|
977
|
+
} }) : null] })] }) });
|
|
1938
978
|
}
|
|
1939
979
|
const _t = (t) => (e) => e.cards[t], Jt = (t) => t.cards, Xt = (t) => (e) => t.map((n) => e.cards[n]).filter(Boolean), Yt = (t) => (e) => e.columns[t], Zt = (t) => t.columns, er = (t) => t.columnOrder, tr = (t) => (e) => {
|
|
1940
980
|
const n = e.columns[t];
|
|
@@ -1943,7 +983,7 @@ const _t = (t) => (e) => e.cards[t], Jt = (t) => t.cards, Xt = (t) => (e) => t.m
|
|
|
1943
983
|
cards: t.cards,
|
|
1944
984
|
columns: t.columns,
|
|
1945
985
|
columnOrder: t.columnOrder
|
|
1946
|
-
}), ir = (t) => Object.keys(t.cards).length,
|
|
986
|
+
}), ir = (t) => Object.keys(t.cards).length, dr = (t) => t.columnOrder.length, Rt = () => {
|
|
1947
987
|
const [t, e] = D(0), n = j(0), a = j(performance.now());
|
|
1948
988
|
return L(() => {
|
|
1949
989
|
let o;
|
|
@@ -1956,51 +996,30 @@ const _t = (t) => (e) => e.cards[t], Jt = (t) => t.cards, Xt = (t) => (e) => t.m
|
|
|
1956
996
|
cancelAnimationFrame(o);
|
|
1957
997
|
};
|
|
1958
998
|
}, []), t;
|
|
1959
|
-
},
|
|
999
|
+
}, sr = ({ cardCount: t, columnCount: e }) => {
|
|
1960
1000
|
const n = Rt(), [a, o] = D(60), [l, c] = D(0), [p, u] = D(!1);
|
|
1961
1001
|
return L(() => {
|
|
1962
1002
|
n > 0 && (n < a && o(n), n > l && c(n));
|
|
1963
1003
|
}, [n]), L(() => {
|
|
1964
|
-
if (!p)
|
|
1965
|
-
|
|
1966
|
-
|
|
1004
|
+
if (!p)
|
|
1005
|
+
return;
|
|
1006
|
+
const s = document.querySelectorAll(".overflow-y-auto");
|
|
1007
|
+
let d = 1, g = 2, h;
|
|
1967
1008
|
const f = () => {
|
|
1968
|
-
|
|
1969
|
-
m.scrollTop += g *
|
|
1009
|
+
s.forEach((m) => {
|
|
1010
|
+
m.scrollTop += g * d, m.scrollTop >= m.scrollHeight - m.clientHeight && (d = -1), m.scrollTop <= 0 && (d = 1);
|
|
1970
1011
|
}), h = requestAnimationFrame(f);
|
|
1971
1012
|
};
|
|
1972
1013
|
return h = requestAnimationFrame(f), () => cancelAnimationFrame(h);
|
|
1973
|
-
}, [p]),
|
|
1974
|
-
/* @__PURE__ */ i("div", { className: "flex items-center justify-between mb-2 gap-2", children: [
|
|
1975
|
-
/* @__PURE__ */ r("h3", { className: "font-bold text-blue-400", children: "⚡ Performance Stats" }),
|
|
1976
|
-
/* @__PURE__ */ r(
|
|
1977
|
-
"button",
|
|
1978
|
-
{
|
|
1979
|
-
onClick: () => u(!p),
|
|
1980
|
-
className: `text-xs px-2 py-1 rounded ${p ? "bg-red-500 hover:bg-red-600" : "bg-blue-600 hover:bg-blue-700"}`,
|
|
1981
|
-
children: p ? "Stop Stress Test" : "Start Stress Test"
|
|
1982
|
-
}
|
|
1983
|
-
)
|
|
1984
|
-
] }),
|
|
1985
|
-
/* @__PURE__ */ i("div", { className: "grid grid-cols-2 gap-x-4 gap-y-1", children: [
|
|
1986
|
-
/* @__PURE__ */ r("span", { className: "text-slate-400", children: "FPS:" }),
|
|
1987
|
-
/* @__PURE__ */ r("span", { className: `font-bold ${n < 30 ? "text-red-400" : n < 50 ? "text-yellow-400" : "text-green-400"}`, children: n }),
|
|
1988
|
-
/* @__PURE__ */ r("span", { className: "text-slate-400", children: "Min FPS:" }),
|
|
1989
|
-
/* @__PURE__ */ r("span", { className: "text-slate-200", children: a }),
|
|
1990
|
-
/* @__PURE__ */ r("span", { className: "text-slate-400", children: "Cards:" }),
|
|
1991
|
-
/* @__PURE__ */ r("span", { className: "text-slate-200", children: t }),
|
|
1992
|
-
/* @__PURE__ */ r("span", { className: "text-slate-400", children: "Columns:" }),
|
|
1993
|
-
/* @__PURE__ */ r("span", { className: "text-slate-200", children: e })
|
|
1994
|
-
] })
|
|
1995
|
-
] });
|
|
1014
|
+
}, [p]), i("div", { className: "fixed bottom-4 right-4 bg-slate-900/90 text-white p-4 rounded-lg shadow-lg backdrop-blur-sm z-50 font-mono text-sm", children: [i("div", { className: "flex items-center justify-between mb-2 gap-2", children: [r("h3", { className: "font-bold text-blue-400", children: "⚡ Performance Stats" }), r("button", { onClick: () => u(!p), className: `text-xs px-2 py-1 rounded ${p ? "bg-red-500 hover:bg-red-600" : "bg-blue-600 hover:bg-blue-700"}`, children: p ? "Stop Stress Test" : "Start Stress Test" })] }), i("div", { className: "grid grid-cols-2 gap-x-4 gap-y-1", children: [r("span", { className: "text-slate-400", children: "FPS:" }), r("span", { className: `font-bold ${n < 30 ? "text-red-400" : n < 50 ? "text-yellow-400" : "text-green-400"}`, children: n }), r("span", { className: "text-slate-400", children: "Min FPS:" }), r("span", { className: "text-slate-200", children: a }), r("span", { className: "text-slate-400", children: "Cards:" }), r("span", { className: "text-slate-200", children: t }), r("span", { className: "text-slate-400", children: "Columns:" }), r("span", { className: "text-slate-200", children: e })] })] });
|
|
1996
1015
|
};
|
|
1997
1016
|
export {
|
|
1998
|
-
|
|
1017
|
+
sr as BenchmarkStats,
|
|
1999
1018
|
Pt as Kanban,
|
|
2000
1019
|
Pt as Kanbase,
|
|
2001
1020
|
Pt as KanboomBoard,
|
|
2002
|
-
|
|
2003
|
-
|
|
1021
|
+
At as discoverFields,
|
|
1022
|
+
st as evaluateFilter,
|
|
2004
1023
|
Jt as selectAllCards,
|
|
2005
1024
|
Zt as selectAllColumns,
|
|
2006
1025
|
or as selectBoardData,
|
|
@@ -2010,7 +1029,7 @@ export {
|
|
|
2010
1029
|
Yt as selectColumn,
|
|
2011
1030
|
rr as selectColumnCardIds,
|
|
2012
1031
|
tr as selectColumnCards,
|
|
2013
|
-
|
|
1032
|
+
dr as selectColumnCount,
|
|
2014
1033
|
er as selectColumnOrder,
|
|
2015
1034
|
nr as selectMoveCard,
|
|
2016
1035
|
ar as selectMoveColumn,
|