@baishuyun/ui-base 6.26.0 → 6.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Amap/index.js +1 -1
- package/dist/Calendar/{Calendar-DDzn7R81.js → Calendar-QAOCYl0o.js} +1 -1
- package/dist/Calendar/index.js +3 -3
- package/dist/Card/index.js +1 -1
- package/dist/CheckBox/index.js +1 -1
- package/dist/ColorPicker/index.js +1 -1
- package/dist/ConfigProvider/index.js +1 -1
- package/dist/DatePicker/{DatePicker-jrgAcolw.js → DatePicker-C72BeWs_.js} +1 -1
- package/dist/DatePicker/{DatePickerPanel-Ci4quU-q.js → DatePickerPanel-CeQjC3c4.js} +1 -1
- package/dist/DatePicker/index.js +2 -2
- package/dist/DropDown/index.js +1 -1
- package/dist/Editor/index.js +1 -1
- package/dist/FieldCard/FieldCard-wwg7WBOx.js +280 -0
- package/dist/FieldCard/index.js +13 -2
- package/dist/Gantt/index.js +1 -1
- package/dist/Icon/index.js +1 -1
- package/dist/InputTag/index.js +1 -1
- package/dist/Kanban/index.js +308 -292
- package/dist/Loading/index.js +1 -1
- package/dist/Modal/index.js +1 -1
- package/dist/NotFoundContent/index.js +1 -1
- package/dist/Overlay/index.js +1 -1
- package/dist/Radio/index.js +1 -1
- package/dist/ScrollBar/index.js +1 -1
- package/dist/Segmented/index.js +1 -1
- package/dist/Select/index.js +1 -1
- package/dist/Table/index.js +1 -1
- package/dist/Tabs/index.js +1 -1
- package/dist/Tooltip/index.js +1 -1
- package/dist/Tree/index.js +1 -1
- package/dist/components/FieldCard/FieldCard.d.ts +3 -2
- package/dist/components/FieldCard/index.d.ts +1 -1
- package/dist/components/FieldCard/interface.d.ts +27 -2
- package/dist/components/Kanban/Kanban.d.ts +1 -1
- package/dist/components/Kanban/KanbanCardItem.d.ts +9 -13
- package/dist/components/Kanban/KanbanCardList.d.ts +3 -13
- package/dist/components/Kanban/KanbanColumnView.d.ts +2 -16
- package/dist/components/Kanban/KanbanConfigContext.d.ts +21 -0
- package/dist/components/Kanban/index.d.ts +1 -1
- package/dist/components/Kanban/interface.d.ts +12 -7
- package/dist/components/Kanban/resolveDrop.d.ts +2 -2
- package/dist/index.js +3 -3
- package/dist/style.css +1 -1
- package/dist/vendors/{version-DUd4fmF6.js → version-DYjHCEjG.js} +1 -1
- package/package.json +1 -1
- package/dist/FieldCard/FieldCard-CcLl0Fix.js +0 -186
package/dist/Kanban/index.js
CHANGED
|
@@ -1,27 +1,47 @@
|
|
|
1
|
-
import "../vendors/version-
|
|
1
|
+
import "../vendors/version-DYjHCEjG.js";
|
|
2
2
|
import "../ScrollBar/style-D26azwz6.js";
|
|
3
3
|
import { t as e } from "../Icon/Icon-CcKDWNGy.js";
|
|
4
4
|
import "../vendors/LocaleContext-CsTLO_Y2.js";
|
|
5
|
+
import "../Overlay/OverlayContext-CVSFoyqN.js";
|
|
5
6
|
import { t } from "../vendors/useLocale-3oUjPb-k.js";
|
|
7
|
+
import "../vendors/useLatchedPopupPortalRoot-CC6af8t-.js";
|
|
6
8
|
import { t as n } from "../vendors/cssVars-UpriQzph.js";
|
|
9
|
+
import "../Select/SelectInputSearch-BMJQw4ll.js";
|
|
7
10
|
import "../CheckBox/CheckBox-DOdRLFKI.js";
|
|
8
11
|
import { t as r } from "../CheckBox/CheckBox-CtOSHKM0.js";
|
|
12
|
+
import "../NotFoundContent/NotFoundContent-DJUQ0_2D.js";
|
|
9
13
|
import { t as i } from "../ScrollBar/ScrollBar-IMTuAOF5.js";
|
|
10
|
-
import
|
|
14
|
+
import "../vendors/useFloatingPortal-DJ1iKmW-.js";
|
|
15
|
+
import "../DropDown/DropDown-B3VFy5GF.js";
|
|
16
|
+
import { t as a } from "../FieldCard/FieldCard-wwg7WBOx.js";
|
|
11
17
|
import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
12
|
-
import {
|
|
13
|
-
import
|
|
14
|
-
import { useControllableValue as
|
|
15
|
-
import { useVirtualizer as
|
|
16
|
-
import { DndContext as
|
|
17
|
-
import { SortableContext as
|
|
18
|
+
import { createContext as l, memo as u, useCallback as d, useContext as f, useEffect as p, useLayoutEffect as m, useMemo as h, useRef as g, useState as _ } from "react";
|
|
19
|
+
import v from "clsx";
|
|
20
|
+
import { useControllableValue as y } from "ahooks";
|
|
21
|
+
import { useVirtualizer as b } from "@tanstack/react-virtual";
|
|
22
|
+
import { DndContext as x, DragOverlay as S, MeasuringStrategy as C, PointerSensor as w, closestCenter as T, pointerWithin as E, rectIntersection as ee, useDndContext as D, useDndMonitor as O, useDraggable as k, useDroppable as A, useSensor as j, useSensors as te } from "@dnd-kit/core";
|
|
23
|
+
import { SortableContext as ne, horizontalListSortingStrategy as re, useSortable as M } from "@dnd-kit/sortable";
|
|
18
24
|
import { CSS as N } from "@dnd-kit/utilities";
|
|
19
|
-
//#region src/components/Kanban/
|
|
25
|
+
//#region src/components/Kanban/KanbanConfigContext.ts
|
|
20
26
|
var P = {
|
|
27
|
+
columnSize: "middle",
|
|
28
|
+
fieldLayout: "vertical",
|
|
29
|
+
cardDraggable: !0,
|
|
30
|
+
cardCheckable: !1,
|
|
31
|
+
columnCheckable: !1,
|
|
32
|
+
onCardChecked: () => {},
|
|
33
|
+
onColumnChecked: () => {}
|
|
34
|
+
}, F = l(null);
|
|
35
|
+
function I() {
|
|
36
|
+
return f(F) ?? P;
|
|
37
|
+
}
|
|
38
|
+
//#endregion
|
|
39
|
+
//#region src/components/Kanban/interface.ts
|
|
40
|
+
var L = {
|
|
21
41
|
small: 200,
|
|
22
42
|
middle: 260,
|
|
23
43
|
large: 340
|
|
24
|
-
},
|
|
44
|
+
}, R = 80, z = { uncheckedBg: "#fff" }, B = {
|
|
25
45
|
root: "_root_1rtd0_1",
|
|
26
46
|
board: "_board_1rtd0_8",
|
|
27
47
|
column: "_column_1rtd0_19",
|
|
@@ -52,23 +72,29 @@ var P = {
|
|
|
52
72
|
};
|
|
53
73
|
//#endregion
|
|
54
74
|
//#region src/components/Kanban/KanbanCardItem.tsx
|
|
55
|
-
function
|
|
75
|
+
function V({ card: e, selected: t, loading: n, columnId: i, showExtra: o = !0, checkable: l, coverLayout: u, fieldLayout: d, size: f, checkboxTheme: p, onChecked: m, onCardMenuClick: h }) {
|
|
76
|
+
let g = I(), _ = l ?? g.cardCheckable, v = u ?? g.coverLayout, y = d ?? g.fieldLayout, b = f ?? g.columnSize, x = p ?? g.checkboxTheme, S = m ?? g.onCardChecked, C = h ?? g.onCardMenuClick, w = o && !!(e.menus && e.menus.length > 0);
|
|
56
77
|
return /* @__PURE__ */ c(a, {
|
|
57
78
|
title: e.title,
|
|
58
79
|
cover: e.cover,
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
80
|
+
coverPlaceholder: v?.position === "left",
|
|
81
|
+
coverLayout: v,
|
|
82
|
+
size: b,
|
|
83
|
+
layout: y,
|
|
62
84
|
selected: t,
|
|
63
85
|
loading: n,
|
|
64
86
|
children: [
|
|
65
|
-
|
|
87
|
+
w ? /* @__PURE__ */ s(a.Extra, {
|
|
88
|
+
menus: e.menus,
|
|
89
|
+
onMenuClick: (t) => i && C?.(t, e, i)
|
|
90
|
+
}) : null,
|
|
91
|
+
_ ? /* @__PURE__ */ s(a.Check, {
|
|
66
92
|
"data-kanban-no-drag": "",
|
|
67
93
|
"data-testid": `kanban-card-check-${e.id}`,
|
|
68
94
|
children: /* @__PURE__ */ s(r, {
|
|
69
|
-
theme:
|
|
95
|
+
theme: x ?? z,
|
|
70
96
|
checked: t,
|
|
71
|
-
onChange: (t) =>
|
|
97
|
+
onChange: (t) => S(e.id, t)
|
|
72
98
|
})
|
|
73
99
|
}) : null,
|
|
74
100
|
e.fields?.map((e, t) => /* @__PURE__ */ s(a.Meta, {
|
|
@@ -83,30 +109,30 @@ function R({ card: e, selected: t, loading: n, checkable: i, coverLayout: o, fie
|
|
|
83
109
|
]
|
|
84
110
|
});
|
|
85
111
|
}
|
|
86
|
-
|
|
87
|
-
let
|
|
112
|
+
var H = u(function({ card: e, columnId: t, index: n, selected: r, loading: i }) {
|
|
113
|
+
let a = I(), o = a.cardDraggable && !i, { attributes: l, listeners: u, setNodeRef: d, isDragging: f } = k({
|
|
88
114
|
id: e.id,
|
|
89
|
-
disabled: !
|
|
115
|
+
disabled: !o,
|
|
90
116
|
data: {
|
|
91
117
|
type: "card",
|
|
92
118
|
columnId: t,
|
|
93
119
|
index: n
|
|
94
120
|
}
|
|
95
|
-
}), { setNodeRef:
|
|
121
|
+
}), { setNodeRef: p, isOver: m } = A({
|
|
96
122
|
id: `card:${t}:${e.id}`,
|
|
97
123
|
data: {
|
|
98
124
|
type: "card",
|
|
99
125
|
columnId: t,
|
|
100
126
|
index: n
|
|
101
127
|
}
|
|
102
|
-
}), { active:
|
|
128
|
+
}), { active: h } = D(), g = h?.data.current, _ = m && g?.type === "card" && g.columnId !== t;
|
|
103
129
|
return /* @__PURE__ */ c("div", {
|
|
104
130
|
ref: (e) => {
|
|
105
|
-
|
|
131
|
+
d(e), p(e);
|
|
106
132
|
},
|
|
107
|
-
className: `${
|
|
133
|
+
className: `${B.card} ${f ? B.cardDragging : ""}`,
|
|
108
134
|
style: {
|
|
109
|
-
paddingTop:
|
|
135
|
+
paddingTop: _ ? 12 : 0,
|
|
110
136
|
transition: "opacity 0.2s ease, padding 0.2s ease"
|
|
111
137
|
},
|
|
112
138
|
"data-testid": `kanban-card-${e.id}`,
|
|
@@ -114,55 +140,51 @@ function z({ card: e, columnId: t, index: n, selected: r, loading: i, checkable:
|
|
|
114
140
|
"data-loading": i ? "true" : "false",
|
|
115
141
|
"data-selected": r ? "true" : "false",
|
|
116
142
|
onClick: (n) => {
|
|
117
|
-
i || n.target instanceof Element && n.target.closest("[data-kanban-no-drag]") ||
|
|
143
|
+
i || n.target instanceof Element && n.target.closest("[data-kanban-no-drag]") || a.onClick?.(e.id, t);
|
|
118
144
|
},
|
|
119
|
-
...
|
|
120
|
-
...
|
|
121
|
-
children: [
|
|
145
|
+
...l,
|
|
146
|
+
...o ? u : void 0,
|
|
147
|
+
children: [_ ? /* @__PURE__ */ s("div", { className: B.dropIndicator }) : null, /* @__PURE__ */ s(V, {
|
|
122
148
|
card: e,
|
|
149
|
+
columnId: t,
|
|
123
150
|
selected: r,
|
|
124
151
|
loading: i,
|
|
125
|
-
|
|
126
|
-
coverLayout: l,
|
|
127
|
-
fieldLayout: u,
|
|
128
|
-
size: d,
|
|
129
|
-
checkboxTheme: f,
|
|
130
|
-
onChecked: m
|
|
152
|
+
showExtra: !f
|
|
131
153
|
})]
|
|
132
154
|
});
|
|
133
|
-
}
|
|
155
|
+
});
|
|
134
156
|
//#endregion
|
|
135
157
|
//#region src/components/Kanban/columnListMotion.ts
|
|
136
|
-
function
|
|
158
|
+
function ie(e, t) {
|
|
137
159
|
if (e.length === 0) return !1;
|
|
138
160
|
let n = new Set(t), r = new Set(e), i = e.some((e) => !n.has(e)), a = t.some((e) => !r.has(e));
|
|
139
161
|
return i && !a;
|
|
140
162
|
}
|
|
141
163
|
//#endregion
|
|
142
164
|
//#region src/components/Kanban/KanbanCardList.tsx
|
|
143
|
-
var
|
|
144
|
-
function
|
|
145
|
-
let [
|
|
165
|
+
var ae = 20, U = 48, W = 12, G = 200, K = 54, q = 34;
|
|
166
|
+
function J({ column: e, estimate: n, selectedIds: r, loadingIds: a, footer: o, onReachBottom: l }) {
|
|
167
|
+
let u = I(), f = l ?? u.onReachBottom, [h, v] = _(null), [y, x] = _(0), S = g(!1), C = g([]), w = g(/* @__PURE__ */ new Map()), T = g(0), E = g(null), ee = e.items.map((e) => e.id), D = ee.join("\0"), k = ie(C.current, ee), [j, te] = _(!1), ne = k || j ? `transform ${G}ms ease` : void 0, re = k || j ? `height ${G}ms ease` : void 0, { setNodeRef: M } = A({
|
|
146
168
|
id: `column-body:${e.id}`,
|
|
147
169
|
data: {
|
|
148
170
|
type: "column-body",
|
|
149
171
|
columnId: e.id,
|
|
150
172
|
index: e.items.length
|
|
151
173
|
}
|
|
152
|
-
}),
|
|
174
|
+
}), N = b({
|
|
153
175
|
count: e.items.length,
|
|
154
|
-
getScrollElement: () =>
|
|
176
|
+
getScrollElement: () => h,
|
|
155
177
|
estimateSize: () => n,
|
|
156
178
|
overscan: 6,
|
|
157
179
|
getItemKey: (t) => e.items[t]?.id ?? t
|
|
158
180
|
});
|
|
159
|
-
|
|
160
|
-
let e =
|
|
161
|
-
for (let n of
|
|
181
|
+
m(() => {
|
|
182
|
+
let e = D === "" ? [] : D.split("\0"), t = /* @__PURE__ */ new Map();
|
|
183
|
+
for (let n of N.getVirtualItems()) {
|
|
162
184
|
let r = e[n.index];
|
|
163
185
|
r && t.set(r, n.start);
|
|
164
186
|
}
|
|
165
|
-
let n =
|
|
187
|
+
let n = N.getTotalSize(), r = E.current, i = ie(C.current, e);
|
|
166
188
|
if (i && r) {
|
|
167
189
|
let e = /* @__PURE__ */ new Map();
|
|
168
190
|
r.querySelectorAll("[data-card-id]").forEach((t) => {
|
|
@@ -170,156 +192,148 @@ function G({ column: e, estimate: n, selectedIds: r, loadingIds: a, checkable: o
|
|
|
170
192
|
n && t.parentElement && e.set(n, t.parentElement);
|
|
171
193
|
});
|
|
172
194
|
for (let [n, r] of t) {
|
|
173
|
-
let t =
|
|
195
|
+
let t = w.current.get(n), i = e.get(n);
|
|
174
196
|
t === void 0 || t === r || !i || (i.style.transition = "none", i.style.transform = `translateY(${t}px)`);
|
|
175
197
|
}
|
|
176
|
-
|
|
198
|
+
T.current !== n && (r.style.transition = "none", r.style.height = `${T.current}px`), r.offsetHeight;
|
|
177
199
|
for (let [n, r] of t) {
|
|
178
|
-
let t =
|
|
179
|
-
t === void 0 || t === r || !i || (i.style.transition = `transform ${
|
|
200
|
+
let t = w.current.get(n), i = e.get(n);
|
|
201
|
+
t === void 0 || t === r || !i || (i.style.transition = `transform ${G}ms ease`, i.style.transform = `translateY(${r}px)`);
|
|
180
202
|
}
|
|
181
|
-
|
|
203
|
+
T.current !== n && (r.style.transition = `height ${G}ms ease`, r.style.height = `${n}px`);
|
|
182
204
|
}
|
|
183
|
-
|
|
184
|
-
}, [
|
|
185
|
-
if (!
|
|
186
|
-
let e = window.setTimeout(() =>
|
|
205
|
+
C.current = e, w.current = t, T.current = n, i && te(!0);
|
|
206
|
+
}, [D, N]), p(() => {
|
|
207
|
+
if (!j) return;
|
|
208
|
+
let e = window.setTimeout(() => te(!1), G);
|
|
187
209
|
return () => window.clearTimeout(e);
|
|
188
|
-
}, [
|
|
189
|
-
let
|
|
190
|
-
|
|
191
|
-
}, [
|
|
192
|
-
|
|
193
|
-
let t =
|
|
194
|
-
(t || n) && (
|
|
210
|
+
}, [j]);
|
|
211
|
+
let P = d((e) => {
|
|
212
|
+
M(e), v(e), x(e?.clientHeight ?? 0);
|
|
213
|
+
}, [M]), { t: F } = t(), L = g(e.paging?.loading), R = g(e.items.length);
|
|
214
|
+
p(() => {
|
|
215
|
+
let t = L.current && !e.paging?.loading, n = R.current !== e.items.length;
|
|
216
|
+
(t || n) && (S.current = !1), L.current = e.paging?.loading, R.current = e.items.length;
|
|
195
217
|
}, [
|
|
196
218
|
e.id,
|
|
197
219
|
e.items.length,
|
|
198
220
|
e.paging?.loading
|
|
199
221
|
]);
|
|
200
|
-
let
|
|
201
|
-
if (!
|
|
222
|
+
let z = d((t) => {
|
|
223
|
+
if (!f || e.paging?.loading || e.paging?.noMore) return;
|
|
202
224
|
let n = t.target;
|
|
203
225
|
if (n instanceof HTMLElement) {
|
|
204
|
-
if (n.scrollHeight - n.scrollTop - n.clientHeight >
|
|
205
|
-
|
|
226
|
+
if (n.scrollHeight - n.scrollTop - n.clientHeight > ae) {
|
|
227
|
+
S.current = !1;
|
|
206
228
|
return;
|
|
207
229
|
}
|
|
208
|
-
|
|
230
|
+
S.current || (S.current = !0, f(e.id));
|
|
209
231
|
}
|
|
210
232
|
}, [
|
|
211
233
|
e.id,
|
|
212
234
|
e.paging?.noMore,
|
|
213
235
|
e.paging?.loading,
|
|
214
|
-
|
|
236
|
+
f
|
|
215
237
|
]);
|
|
216
|
-
|
|
217
|
-
if (!
|
|
218
|
-
let e = new ResizeObserver(() =>
|
|
219
|
-
return e.observe(
|
|
220
|
-
}, [
|
|
221
|
-
let
|
|
222
|
-
return
|
|
238
|
+
p(() => {
|
|
239
|
+
if (!h) return;
|
|
240
|
+
let e = new ResizeObserver(() => x(h.clientHeight));
|
|
241
|
+
return e.observe(h), () => e.disconnect();
|
|
242
|
+
}, [h]);
|
|
243
|
+
let V = !!e.paging?.loading, J = !!(e.paging?.noMore && !e.paging?.loading), oe = V || J, Y = N.getTotalSize(), se = Y, X = Y + (oe ? q : 0), Z = !!o && y > 0 && X + K > y, ce = X + (o && !Z ? K : 0);
|
|
244
|
+
return O({ onDragMove(t) {
|
|
223
245
|
let n = t.active.data.current;
|
|
224
|
-
if (!
|
|
246
|
+
if (!h || n?.type !== "card" || n.columnId === e.id) return;
|
|
225
247
|
let r = t.active.rect.current.translated;
|
|
226
248
|
if (!r) return;
|
|
227
|
-
let i =
|
|
228
|
-
a < i.top +
|
|
249
|
+
let i = h.getBoundingClientRect(), a = r.top + r.height / 2;
|
|
250
|
+
a < i.top + U ? h.scrollTop -= W : a > i.bottom - U && (h.scrollTop += W);
|
|
229
251
|
} }), /* @__PURE__ */ c("div", {
|
|
230
|
-
className:
|
|
252
|
+
className: B.list,
|
|
231
253
|
children: [/* @__PURE__ */ s(i, {
|
|
232
|
-
className:
|
|
233
|
-
viewportRef:
|
|
234
|
-
onScroll:
|
|
254
|
+
className: Z ? B.listScroll : B.listFill,
|
|
255
|
+
viewportRef: P,
|
|
256
|
+
onScroll: z,
|
|
235
257
|
options: { overflow: {
|
|
236
258
|
x: "hidden",
|
|
237
259
|
y: "scroll"
|
|
238
260
|
} },
|
|
239
261
|
children: /* @__PURE__ */ c("div", {
|
|
240
|
-
ref:
|
|
262
|
+
ref: E,
|
|
241
263
|
style: {
|
|
242
|
-
height:
|
|
264
|
+
height: ce,
|
|
243
265
|
position: "relative",
|
|
244
266
|
width: "100%",
|
|
245
|
-
transition:
|
|
267
|
+
transition: re
|
|
246
268
|
},
|
|
247
269
|
children: [
|
|
248
|
-
|
|
270
|
+
N.getVirtualItems().map((t) => {
|
|
249
271
|
let n = e.items[t.index];
|
|
250
272
|
return n ? /* @__PURE__ */ s("div", {
|
|
251
273
|
"data-index": t.index,
|
|
252
|
-
ref:
|
|
253
|
-
className:
|
|
274
|
+
ref: N.measureElement,
|
|
275
|
+
className: B.cardSlot,
|
|
254
276
|
style: {
|
|
255
277
|
position: "absolute",
|
|
256
278
|
top: 0,
|
|
257
279
|
left: 0,
|
|
258
280
|
width: "100%",
|
|
259
281
|
transform: `translateY(${t.start}px)`,
|
|
260
|
-
transition:
|
|
282
|
+
transition: ne
|
|
261
283
|
},
|
|
262
|
-
children: /* @__PURE__ */ s(
|
|
284
|
+
children: /* @__PURE__ */ s(H, {
|
|
263
285
|
card: n,
|
|
264
286
|
columnId: e.id,
|
|
265
287
|
index: t.index,
|
|
266
288
|
selected: r.has(n.id),
|
|
267
|
-
loading: a.has(n.id)
|
|
268
|
-
checkable: o,
|
|
269
|
-
cardDraggable: f,
|
|
270
|
-
coverLayout: h,
|
|
271
|
-
fieldLayout: g,
|
|
272
|
-
size: v,
|
|
273
|
-
checkboxTheme: y,
|
|
274
|
-
onItemClick: b,
|
|
275
|
-
onChecked: x
|
|
289
|
+
loading: a.has(n.id)
|
|
276
290
|
})
|
|
277
291
|
}, n.id) : null;
|
|
278
292
|
}),
|
|
279
|
-
|
|
280
|
-
className:
|
|
293
|
+
V ? /* @__PURE__ */ s("div", {
|
|
294
|
+
className: B.paging,
|
|
281
295
|
style: {
|
|
282
296
|
position: "absolute",
|
|
283
|
-
top:
|
|
297
|
+
top: se,
|
|
284
298
|
left: 0,
|
|
285
299
|
right: 0
|
|
286
300
|
},
|
|
287
301
|
"data-testid": `kanban-paging-loading-${e.id}`,
|
|
288
|
-
children:
|
|
302
|
+
children: F("kanban.loadingMore")
|
|
289
303
|
}) : null,
|
|
290
|
-
|
|
291
|
-
className:
|
|
304
|
+
J ? /* @__PURE__ */ s("div", {
|
|
305
|
+
className: B.paging,
|
|
292
306
|
style: {
|
|
293
307
|
position: "absolute",
|
|
294
|
-
top:
|
|
308
|
+
top: se,
|
|
295
309
|
left: 0,
|
|
296
310
|
right: 0
|
|
297
311
|
},
|
|
298
312
|
"data-testid": `kanban-paging-noMore-${e.id}`,
|
|
299
|
-
children:
|
|
313
|
+
children: F("kanban.noMore")
|
|
300
314
|
}) : null,
|
|
301
|
-
|
|
302
|
-
className:
|
|
303
|
-
style: { top:
|
|
304
|
-
children:
|
|
315
|
+
o && !Z ? /* @__PURE__ */ s("div", {
|
|
316
|
+
className: B.addAnchor,
|
|
317
|
+
style: { top: X },
|
|
318
|
+
children: o
|
|
305
319
|
}) : null
|
|
306
320
|
]
|
|
307
321
|
})
|
|
308
|
-
}),
|
|
322
|
+
}), Z ? o : null]
|
|
309
323
|
});
|
|
310
324
|
}
|
|
311
325
|
//#endregion
|
|
312
326
|
//#region src/components/Kanban/selection.ts
|
|
313
|
-
function
|
|
327
|
+
function oe(e, t, n) {
|
|
314
328
|
return n === e.includes(t) ? e : n ? [...e, t] : e.filter((e) => e !== t);
|
|
315
329
|
}
|
|
316
|
-
function
|
|
330
|
+
function Y(e, t) {
|
|
317
331
|
if (t.length === 0) return "unchecked";
|
|
318
332
|
let n = 0;
|
|
319
333
|
for (let r of t) e.has(r) && (n += 1);
|
|
320
334
|
return n === 0 ? "unchecked" : n === t.length ? "checked" : "indeterminate";
|
|
321
335
|
}
|
|
322
|
-
function
|
|
336
|
+
function se(e, t, n) {
|
|
323
337
|
if (t.length === 0) return e;
|
|
324
338
|
if (!n) {
|
|
325
339
|
let n = new Set(t);
|
|
@@ -332,101 +346,92 @@ function ie(e, t, n) {
|
|
|
332
346
|
}
|
|
333
347
|
//#endregion
|
|
334
348
|
//#region src/components/Kanban/KanbanColumnView.tsx
|
|
335
|
-
var
|
|
336
|
-
function
|
|
337
|
-
let { t:
|
|
349
|
+
var X = 120, Z = 40;
|
|
350
|
+
function ce({ column: n, columnWidth: i, collapsed: a, selectedIds: l, loadingIds: u, onToggleCollapse: d }) {
|
|
351
|
+
let { t: f } = t(), p = I(), { active: m } = D(), h = m?.data.current?.type === "card", g = n.sortable !== !1 && !h, { setNodeRef: _, attributes: v, listeners: y, isDragging: b, transform: x, transition: S } = M({
|
|
338
352
|
id: n.id,
|
|
339
|
-
disabled: !
|
|
353
|
+
disabled: !g,
|
|
340
354
|
data: {
|
|
341
355
|
type: "column",
|
|
342
356
|
columnId: n.id,
|
|
343
357
|
index: n.items.length
|
|
344
358
|
}
|
|
345
|
-
}),
|
|
346
|
-
className: `${
|
|
359
|
+
}), C = n.items.map((e) => e.id), w = Y(l, C), T = p.columnCheckable ? /* @__PURE__ */ s("div", {
|
|
360
|
+
className: `${B.columnCheck} ${w === "unchecked" ? "" : B.columnCheckVisible}`,
|
|
347
361
|
"data-kanban-no-drag": "",
|
|
348
362
|
"data-testid": `kanban-column-check-${n.id}`,
|
|
349
|
-
"data-check":
|
|
363
|
+
"data-check": w,
|
|
350
364
|
children: /* @__PURE__ */ s(r, {
|
|
351
|
-
theme:
|
|
352
|
-
checked:
|
|
353
|
-
indeterminate:
|
|
354
|
-
onChange: (e) =>
|
|
365
|
+
theme: p.checkboxTheme ?? z,
|
|
366
|
+
checked: w === "checked",
|
|
367
|
+
indeterminate: w === "indeterminate",
|
|
368
|
+
onChange: (e) => p.onColumnChecked(C, e)
|
|
355
369
|
})
|
|
356
370
|
}) : null;
|
|
357
371
|
return /* @__PURE__ */ c("div", {
|
|
358
|
-
ref:
|
|
359
|
-
className: `${
|
|
372
|
+
ref: _,
|
|
373
|
+
className: `${B.column} ${a ? B.columnCollapsed : ""} ${b ? B.columnDragging : ""}`,
|
|
360
374
|
style: {
|
|
361
|
-
width: a ?
|
|
362
|
-
transform: N.Transform.toString(
|
|
363
|
-
transition:
|
|
375
|
+
width: a ? Z : i,
|
|
376
|
+
transform: N.Transform.toString(x),
|
|
377
|
+
transition: S
|
|
364
378
|
},
|
|
365
379
|
"data-testid": `kanban-column-${n.id}`,
|
|
366
380
|
"data-column-id": n.id,
|
|
367
|
-
"data-sortable":
|
|
381
|
+
"data-sortable": g ? "true" : "false",
|
|
368
382
|
children: [/* @__PURE__ */ c("div", {
|
|
369
|
-
className: `${
|
|
370
|
-
...
|
|
371
|
-
...
|
|
383
|
+
className: `${B.header} ${a ? B.headerCollapsed : ""} ${g ? B.headerDraggable : ""}`,
|
|
384
|
+
...v,
|
|
385
|
+
...g ? y : void 0,
|
|
372
386
|
children: [a ? /* @__PURE__ */ c("div", {
|
|
373
|
-
className:
|
|
387
|
+
className: B.collapsedTitle,
|
|
374
388
|
children: [
|
|
375
|
-
|
|
389
|
+
T,
|
|
376
390
|
/* @__PURE__ */ s("span", { children: n.title }),
|
|
377
391
|
/* @__PURE__ */ s("span", {
|
|
378
|
-
className:
|
|
392
|
+
className: B.count,
|
|
379
393
|
"data-testid": `kanban-count-${n.id}`,
|
|
380
394
|
children: n.total
|
|
381
395
|
})
|
|
382
396
|
]
|
|
383
397
|
}) : /* @__PURE__ */ c("div", {
|
|
384
|
-
className:
|
|
398
|
+
className: B.titleRow,
|
|
385
399
|
children: [
|
|
386
|
-
|
|
400
|
+
T,
|
|
387
401
|
/* @__PURE__ */ s("div", {
|
|
388
|
-
className:
|
|
402
|
+
className: B.title,
|
|
389
403
|
children: n.title
|
|
390
404
|
}),
|
|
391
405
|
/* @__PURE__ */ s("span", {
|
|
392
|
-
className:
|
|
406
|
+
className: B.count,
|
|
393
407
|
"data-testid": `kanban-count-${n.id}`,
|
|
394
408
|
children: n.total
|
|
395
409
|
})
|
|
396
410
|
]
|
|
397
411
|
}), /* @__PURE__ */ s("button", {
|
|
398
412
|
type: "button",
|
|
399
|
-
className:
|
|
413
|
+
className: B.toggle,
|
|
400
414
|
"data-kanban-no-drag": "",
|
|
401
|
-
"aria-label":
|
|
402
|
-
onClick: () =>
|
|
415
|
+
"aria-label": f(a ? "kanban.expand" : "kanban.collapse"),
|
|
416
|
+
onClick: () => d?.(n.id),
|
|
403
417
|
children: /* @__PURE__ */ s(e, {
|
|
404
418
|
name: a ? "magnify" : "reduction",
|
|
405
419
|
size: 16
|
|
406
420
|
})
|
|
407
421
|
})]
|
|
408
|
-
}), a ? null : /* @__PURE__ */ s(o, { children: /* @__PURE__ */ s(
|
|
422
|
+
}), a ? null : /* @__PURE__ */ s(o, { children: /* @__PURE__ */ s(J, {
|
|
409
423
|
column: n,
|
|
410
|
-
estimate:
|
|
424
|
+
estimate: X,
|
|
411
425
|
selectedIds: l,
|
|
412
426
|
loadingIds: u,
|
|
413
|
-
checkable: d,
|
|
414
|
-
cardDraggable: p,
|
|
415
|
-
coverLayout: m,
|
|
416
|
-
fieldLayout: h,
|
|
417
|
-
size: g,
|
|
418
|
-
checkboxTheme: _,
|
|
419
|
-
onItemClick: v,
|
|
420
|
-
onChecked: y,
|
|
421
|
-
onReachEnd: S,
|
|
422
427
|
footer: n.addable ? /* @__PURE__ */ s("div", {
|
|
423
|
-
className:
|
|
428
|
+
className: B.add,
|
|
424
429
|
children: /* @__PURE__ */ s("button", {
|
|
425
430
|
type: "button",
|
|
426
431
|
"data-kanban-no-drag": "",
|
|
427
|
-
"aria-label":
|
|
432
|
+
"aria-label": f("kanban.add"),
|
|
428
433
|
"data-testid": `kanban-add-${n.id}`,
|
|
429
|
-
onClick: () =>
|
|
434
|
+
onClick: () => p.onAdd?.(n.id),
|
|
430
435
|
children: /* @__PURE__ */ s(e, {
|
|
431
436
|
name: "add",
|
|
432
437
|
size: 16
|
|
@@ -438,32 +443,32 @@ function ae({ column: n, columnWidth: i, collapsed: a, selectedIds: l, loadingId
|
|
|
438
443
|
}
|
|
439
444
|
//#endregion
|
|
440
445
|
//#region src/components/Kanban/KanbanPointerSensor.ts
|
|
441
|
-
var
|
|
446
|
+
var le = "[data-kanban-no-drag]", ue = class extends w {
|
|
442
447
|
static activators = [{
|
|
443
448
|
eventName: "onPointerDown",
|
|
444
449
|
handler: ({ nativeEvent: e }, t) => {
|
|
445
450
|
if (e.isPrimary === !1 || (e.button ?? 0) !== 0) return !1;
|
|
446
451
|
let n = e.target;
|
|
447
|
-
return n instanceof Element && n.closest(
|
|
452
|
+
return n instanceof Element && n.closest(le) ? !1 : (t.onActivation?.({ event: e }), !0);
|
|
448
453
|
}
|
|
449
454
|
}];
|
|
450
|
-
},
|
|
455
|
+
}, de = (e) => {
|
|
451
456
|
if (!(e == null || e === "")) return typeof e == "number" ? `${e}px` : String(e);
|
|
452
|
-
},
|
|
457
|
+
}, fe = (e) => {
|
|
453
458
|
let t = e?.colorPrimary, n = e?.checkbox?.colorPrimary ?? t;
|
|
454
459
|
return {
|
|
455
|
-
...
|
|
460
|
+
...z,
|
|
456
461
|
...e?.checkbox,
|
|
457
462
|
...n ? { colorPrimary: n } : {}
|
|
458
463
|
};
|
|
459
|
-
},
|
|
464
|
+
}, pe = (e) => {
|
|
460
465
|
if (!e) return {};
|
|
461
466
|
let t = {}, r = e.colorPrimary;
|
|
462
|
-
return n(t, "--bsy-kanban-color-primary", r), n(t, "--bsy-kanban-column-bg", e.columnBg), n(t, "--bsy-kanban-column-title-color", e.columnTitleColor), n(t, "--bsy-kanban-column-count-color", e.columnCountColor), n(t, "--bsy-kanban-column-border-radius",
|
|
467
|
+
return n(t, "--bsy-kanban-color-primary", r), n(t, "--bsy-kanban-column-bg", e.columnBg), n(t, "--bsy-kanban-column-title-color", e.columnTitleColor), n(t, "--bsy-kanban-column-count-color", e.columnCountColor), n(t, "--bsy-kanban-column-border-radius", de(e.columnBorderRadius)), n(t, "--bsy-field-card-color-primary", r), n(t, "--bsy-field-card-bg", e.cardBg), n(t, "--bsy-field-card-title-color", e.cardTitleColor), n(t, "--bsy-field-card-label-color", e.cardLabelColor), n(t, "--bsy-field-card-value-color", e.cardValueColor), n(t, "--bsy-field-card-hover-border", e.cardHoverBorderColor ?? r), n(t, "--bsy-field-card-selected-border", e.cardSelectedBorderColor ?? r), n(t, "--bsy-field-card-border-radius", de(e.cardBorderRadius)), n(t, "--bsy-kanban-drop-indicator-color", e.dropIndicatorColor ?? r), n(t, "--bsy-kanban-collapse-icon-color", e.collapseIconColor), n(t, "--bsy-kanban-collapse-icon-hover-color", e.collapseIconHoverColor ?? r), n(t, "--bsy-kanban-add-btn-bg", e.addBtnBg), n(t, "--bsy-kanban-add-btn-hover-bg", e.addBtnHoverBg), n(t, "--bsy-kanban-add-btn-color", e.addBtnColor), n(t, "--bsy-kanban-paging-color", e.pagingTextColor), t;
|
|
463
468
|
};
|
|
464
469
|
//#endregion
|
|
465
470
|
//#region src/components/Kanban/resolveDrop.ts
|
|
466
|
-
function
|
|
471
|
+
function me(e) {
|
|
467
472
|
return e.activeType === "column" ? e.overType !== "column" || !e.overColumnId || e.activeId === e.overColumnId || !e.sortableIds.has(e.activeId) || !e.sortableIds.has(e.overColumnId) ? null : {
|
|
468
473
|
kind: "column",
|
|
469
474
|
payload: {
|
|
@@ -482,42 +487,72 @@ function le(e) {
|
|
|
482
487
|
}
|
|
483
488
|
//#endregion
|
|
484
489
|
//#region src/components/Kanban/Kanban.tsx
|
|
485
|
-
var
|
|
486
|
-
function
|
|
490
|
+
var he = { droppable: { strategy: C.Always } };
|
|
491
|
+
function ge(e) {
|
|
487
492
|
return {
|
|
488
493
|
onChange: e?.onChange,
|
|
489
494
|
...e?.selectedItemKeys === void 0 ? {} : { selectedItemKeys: e.selectedItemKeys },
|
|
490
495
|
...e?.defaultSelectedItemKeys === void 0 ? {} : { defaultSelectedItemKeys: e.defaultSelectedItemKeys }
|
|
491
496
|
};
|
|
492
497
|
}
|
|
493
|
-
function
|
|
494
|
-
let [
|
|
498
|
+
function Q({ columns: e, columnSize: t = "middle", columnWidth: n, coverLayout: r, fieldLayout: i = "vertical", itemSelection: a, cardDraggable: o = !0, loadingIds: l, onClick: u, onCardMove: f, onColumnMove: p, onAdd: m, onReachBottom: b, onCardMenuClick: C, className: w, style: D, theme: O }) {
|
|
499
|
+
let [k, A] = _(null), M = a?.checkable ?? !1, N = a?.columnCheckable ?? !1, [P, I] = y(ge(a), {
|
|
495
500
|
defaultValue: [],
|
|
496
501
|
valuePropName: "selectedItemKeys",
|
|
497
502
|
defaultValuePropName: "defaultSelectedItemKeys",
|
|
498
503
|
trigger: "onChange"
|
|
499
|
-
}),
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
}, []),
|
|
508
|
-
|
|
509
|
-
|
|
504
|
+
}), R = h(() => pe(O), [O]), z = h(() => fe(O), [O]), H = g(null), ie = te(j(ue, { activationConstraint: { distance: 8 } })), ae = r?.position === "left" || r?.position === "right", U = n ?? L[t] + (ae ? 80 : 0), W = h(() => new Set(P), [P]), G = g(P);
|
|
505
|
+
G.current = P;
|
|
506
|
+
let K = d((e, t) => {
|
|
507
|
+
let n = G.current, r = oe(n, e, t);
|
|
508
|
+
r !== n && I(r);
|
|
509
|
+
}, [I]), q = d((e, t) => {
|
|
510
|
+
let n = G.current, r = se(n, e, t);
|
|
511
|
+
r !== n && I(r);
|
|
512
|
+
}, [I]), J = h(() => ({
|
|
513
|
+
columnSize: t,
|
|
514
|
+
fieldLayout: i,
|
|
515
|
+
coverLayout: r,
|
|
516
|
+
checkboxTheme: z,
|
|
517
|
+
cardDraggable: o,
|
|
518
|
+
cardCheckable: M,
|
|
519
|
+
columnCheckable: N,
|
|
520
|
+
onClick: u,
|
|
521
|
+
onCardChecked: K,
|
|
522
|
+
onColumnChecked: q,
|
|
523
|
+
onCardMenuClick: C,
|
|
524
|
+
onAdd: m,
|
|
525
|
+
onReachBottom: b
|
|
526
|
+
}), [
|
|
527
|
+
t,
|
|
528
|
+
i,
|
|
529
|
+
r,
|
|
530
|
+
z,
|
|
531
|
+
o,
|
|
532
|
+
M,
|
|
533
|
+
N,
|
|
534
|
+
u,
|
|
535
|
+
K,
|
|
536
|
+
q,
|
|
537
|
+
C,
|
|
538
|
+
m,
|
|
539
|
+
b
|
|
540
|
+
]), Y = h(() => new Set(l ?? []), [l]), [X, Z] = _([]), le = h(() => new Set(X), [X]), de = d((e) => {
|
|
541
|
+
Z((t) => t.includes(e) ? t.filter((t) => t !== e) : [...t, e]);
|
|
542
|
+
}, []), Q = h(() => e.filter((e) => e.sortable !== !1).map((e) => e.id), [e]), _e = h(() => new Set(Q), [Q]), ve = d((e) => {
|
|
543
|
+
if (H.current === "column") return T(e).filter((t) => e.droppableContainers.find((e) => e.id === t.id)?.data.current?.type === "column");
|
|
544
|
+
let t = E(e), n = (n) => t.find((t) => e.droppableContainers.find((e) => e.id === t.id)?.data.current?.type === n), r = n("card");
|
|
510
545
|
if (r) return [r];
|
|
511
546
|
let i = n("column-body");
|
|
512
547
|
if (i) return [i];
|
|
513
548
|
let a = n("column");
|
|
514
|
-
return a ? [a] :
|
|
515
|
-
}, []),
|
|
549
|
+
return a ? [a] : ee(e);
|
|
550
|
+
}, []), ye = d((t) => {
|
|
516
551
|
let n = t.active.data.current;
|
|
517
552
|
if (n?.type === "column" && n.columnId) {
|
|
518
|
-
|
|
553
|
+
H.current = "column";
|
|
519
554
|
let e = document.querySelector(`[data-column-id="${n.columnId}"]`), r = e instanceof HTMLElement ? e.getBoundingClientRect().height : void 0;
|
|
520
|
-
|
|
555
|
+
A({
|
|
521
556
|
type: "column",
|
|
522
557
|
id: String(t.active.id),
|
|
523
558
|
columnId: n.columnId,
|
|
@@ -527,130 +562,111 @@ function Z({ columns: e, columnSize: t = "middle", columnWidth: n, coverLayout:
|
|
|
527
562
|
}
|
|
528
563
|
if (n?.type === "card" && n.columnId) {
|
|
529
564
|
let r = e.find((e) => e.id === n.columnId)?.items.find((e) => e.id === String(t.active.id));
|
|
530
|
-
|
|
565
|
+
H.current = "card", A({
|
|
531
566
|
type: "card",
|
|
532
567
|
id: String(t.active.id),
|
|
533
568
|
columnId: n.columnId,
|
|
534
569
|
card: r
|
|
535
570
|
});
|
|
536
571
|
}
|
|
537
|
-
}, [e]),
|
|
538
|
-
let t = e.active.data.current, n = e.over?.data.current, r =
|
|
572
|
+
}, [e]), be = d((e) => {
|
|
573
|
+
let t = e.active.data.current, n = e.over?.data.current, r = me({
|
|
539
574
|
activeType: t?.type ?? null,
|
|
540
575
|
activeId: String(e.active.id),
|
|
541
576
|
fromColumnId: t?.columnId,
|
|
542
577
|
overType: n?.type ?? null,
|
|
543
578
|
overColumnId: n?.columnId,
|
|
544
579
|
overIndex: n?.index,
|
|
545
|
-
sortableIds:
|
|
580
|
+
sortableIds: _e
|
|
546
581
|
});
|
|
547
|
-
|
|
582
|
+
H.current = null, A(null), r?.kind === "card" && f?.(r.payload), r?.kind === "column" && p?.(r.payload);
|
|
548
583
|
}, [
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
]),
|
|
553
|
-
|
|
554
|
-
}, []),
|
|
555
|
-
return /* @__PURE__ */
|
|
556
|
-
sensors:
|
|
557
|
-
collisionDetection:
|
|
558
|
-
measuring:
|
|
559
|
-
autoScroll:
|
|
560
|
-
onDragStart:
|
|
561
|
-
onDragEnd:
|
|
562
|
-
onDragCancel:
|
|
563
|
-
children:
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
...E
|
|
568
|
-
},
|
|
569
|
-
"data-testid": "kanban-root",
|
|
570
|
-
children: e.length === 0 ? null : /* @__PURE__ */ s(A, {
|
|
571
|
-
items: $,
|
|
572
|
-
strategy: j,
|
|
573
|
-
children: /* @__PURE__ */ s("div", {
|
|
574
|
-
className: L.board,
|
|
575
|
-
children: e.map((e) => /* @__PURE__ */ s(ae, {
|
|
576
|
-
column: e,
|
|
577
|
-
columnWidth: ne,
|
|
578
|
-
collapsed: Z.has(e.id),
|
|
579
|
-
selectedIds: G,
|
|
580
|
-
loadingIds: J,
|
|
581
|
-
cardCheckable: F,
|
|
582
|
-
columnCheckable: I,
|
|
583
|
-
cardDraggable: o,
|
|
584
|
-
coverLayout: r,
|
|
585
|
-
fieldLayout: i,
|
|
586
|
-
size: t,
|
|
587
|
-
checkboxTheme: H,
|
|
588
|
-
onItemClick: d,
|
|
589
|
-
onCardChecked: K,
|
|
590
|
-
onColumnChecked: q,
|
|
591
|
-
onToggleCollapse: Q,
|
|
592
|
-
onReachEnd: T,
|
|
593
|
-
onColumnAdd: x
|
|
594
|
-
}, e.id))
|
|
595
|
-
})
|
|
596
|
-
})
|
|
597
|
-
}), /* @__PURE__ */ c(y, {
|
|
598
|
-
dropAnimation: {
|
|
599
|
-
duration: 250,
|
|
600
|
-
easing: "cubic-bezier(0.25, 1, 0.5, 1)"
|
|
601
|
-
},
|
|
602
|
-
children: [M?.type === "card" && M.card ? /* @__PURE__ */ s("div", {
|
|
603
|
-
className: L.cardOverlay,
|
|
604
|
-
style: V,
|
|
605
|
-
"data-testid": "kanban-card-overlay",
|
|
606
|
-
children: /* @__PURE__ */ s(R, {
|
|
607
|
-
card: M.card,
|
|
608
|
-
selected: G.has(M.card.id),
|
|
609
|
-
loading: J.has(M.card.id),
|
|
610
|
-
checkable: F,
|
|
611
|
-
coverLayout: r,
|
|
612
|
-
fieldLayout: i,
|
|
613
|
-
size: t,
|
|
614
|
-
checkboxTheme: H,
|
|
615
|
-
onChecked: K
|
|
616
|
-
})
|
|
617
|
-
}) : null, _e ? /* @__PURE__ */ c("div", {
|
|
618
|
-
className: `${L.column} ${L.columnOverlay}`,
|
|
584
|
+
f,
|
|
585
|
+
p,
|
|
586
|
+
_e
|
|
587
|
+
]), xe = d(() => {
|
|
588
|
+
H.current = null, A(null);
|
|
589
|
+
}, []), $ = k?.type === "column" ? e.find((e) => e.id === k.columnId) : void 0;
|
|
590
|
+
return /* @__PURE__ */ s(x, {
|
|
591
|
+
sensors: ie,
|
|
592
|
+
collisionDetection: ve,
|
|
593
|
+
measuring: he,
|
|
594
|
+
autoScroll: k?.type === "column",
|
|
595
|
+
onDragStart: ye,
|
|
596
|
+
onDragEnd: be,
|
|
597
|
+
onDragCancel: xe,
|
|
598
|
+
children: /* @__PURE__ */ c(F.Provider, {
|
|
599
|
+
value: J,
|
|
600
|
+
children: [/* @__PURE__ */ s("div", {
|
|
601
|
+
className: v(B.root, w),
|
|
619
602
|
style: {
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
...V
|
|
603
|
+
...R,
|
|
604
|
+
...D
|
|
623
605
|
},
|
|
624
|
-
"data-testid": "kanban-
|
|
625
|
-
children:
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
606
|
+
"data-testid": "kanban-root",
|
|
607
|
+
children: e.length === 0 ? null : /* @__PURE__ */ s(ne, {
|
|
608
|
+
items: Q,
|
|
609
|
+
strategy: re,
|
|
610
|
+
children: /* @__PURE__ */ s("div", {
|
|
611
|
+
className: B.board,
|
|
612
|
+
children: e.map((e) => /* @__PURE__ */ s(ce, {
|
|
613
|
+
column: e,
|
|
614
|
+
columnWidth: U,
|
|
615
|
+
collapsed: le.has(e.id),
|
|
616
|
+
selectedIds: W,
|
|
617
|
+
loadingIds: Y,
|
|
618
|
+
onToggleCollapse: de
|
|
619
|
+
}, e.id))
|
|
636
620
|
})
|
|
637
|
-
})
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
621
|
+
})
|
|
622
|
+
}), /* @__PURE__ */ c(S, {
|
|
623
|
+
dropAnimation: {
|
|
624
|
+
duration: 250,
|
|
625
|
+
easing: "cubic-bezier(0.25, 1, 0.5, 1)"
|
|
626
|
+
},
|
|
627
|
+
children: [k?.type === "card" && k.card ? /* @__PURE__ */ s("div", {
|
|
628
|
+
className: B.cardOverlay,
|
|
629
|
+
style: R,
|
|
630
|
+
"data-testid": "kanban-card-overlay",
|
|
631
|
+
children: /* @__PURE__ */ s(V, {
|
|
632
|
+
card: k.card,
|
|
633
|
+
selected: W.has(k.card.id),
|
|
634
|
+
loading: Y.has(k.card.id),
|
|
635
|
+
showExtra: !1
|
|
649
636
|
})
|
|
650
|
-
},
|
|
651
|
-
|
|
652
|
-
|
|
637
|
+
}) : null, $ ? /* @__PURE__ */ c("div", {
|
|
638
|
+
className: `${B.column} ${B.columnOverlay}`,
|
|
639
|
+
style: {
|
|
640
|
+
width: U,
|
|
641
|
+
height: k?.overlayHeight,
|
|
642
|
+
...R
|
|
643
|
+
},
|
|
644
|
+
"data-testid": "kanban-column-overlay",
|
|
645
|
+
children: [/* @__PURE__ */ s("div", {
|
|
646
|
+
className: B.header,
|
|
647
|
+
children: /* @__PURE__ */ c("div", {
|
|
648
|
+
className: B.titleRow,
|
|
649
|
+
children: [/* @__PURE__ */ s("div", {
|
|
650
|
+
className: B.title,
|
|
651
|
+
children: $.title
|
|
652
|
+
}), /* @__PURE__ */ s("span", {
|
|
653
|
+
className: B.count,
|
|
654
|
+
children: $.total
|
|
655
|
+
})]
|
|
656
|
+
})
|
|
657
|
+
}), /* @__PURE__ */ s("div", { children: $.items.map((e) => /* @__PURE__ */ s("div", {
|
|
658
|
+
className: B.cardSlot,
|
|
659
|
+
children: /* @__PURE__ */ s(V, {
|
|
660
|
+
card: e,
|
|
661
|
+
selected: W.has(e.id),
|
|
662
|
+
loading: Y.has(e.id),
|
|
663
|
+
showExtra: !1
|
|
664
|
+
})
|
|
665
|
+
}, e.id)) })]
|
|
666
|
+
}) : null]
|
|
667
|
+
})]
|
|
668
|
+
})
|
|
653
669
|
});
|
|
654
670
|
}
|
|
655
671
|
//#endregion
|
|
656
|
-
export {
|
|
672
|
+
export { L as KANBAN_COLUMN_WIDTH, R as KANBAN_COVER_SIDE_EXTRA, Q as default };
|