@thebuoyant-tsdev/mui-ts-library 3.34.0 → 3.36.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/README.de.md +19 -2
- package/README.md +19 -2
- package/dist/components/gantt-chart/GanttTaskPanel.js +66 -66
- package/dist/components/kanban-board/KanbanBoard.d.ts +1 -1
- package/dist/components/kanban-board/KanbanBoard.js +163 -88
- package/dist/components/kanban-board/KanbanBoard.types.d.ts +49 -0
- package/dist/components/kanban-board/KanbanBoard.types.js +10 -1
- package/dist/components/kanban-board/KanbanBoardCard.d.ts +3 -1
- package/dist/components/kanban-board/KanbanBoardCard.js +151 -91
- package/dist/components/kanban-board/KanbanBoardCardDialog.d.ts +2 -1
- package/dist/components/kanban-board/KanbanBoardCardDialog.js +162 -66
- package/dist/components/kanban-board/KanbanBoardColumn.d.ts +5 -1
- package/dist/components/kanban-board/KanbanBoardColumn.js +115 -54
- package/dist/components/kanban-board/KanbanBoardColumnDialog.d.ts +17 -0
- package/dist/components/kanban-board/KanbanBoardColumnDialog.js +78 -0
- package/dist/components/kanban-board/kanbanBoardClasses.d.ts +8 -0
- package/dist/components/kanban-board/kanbanBoardClasses.js +5 -1
- package/dist/components/rich-text-editor/RichTextEditorTableMenu.js +32 -32
- package/dist/components/tag-selection/TagSelectionAutocomplete.js +4 -4
- package/dist/index.cjs +2 -2
- package/package.json +6 -2
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import { muiTsStateClasses as e } from "../../utils/muiTsClasses.js";
|
|
2
2
|
import { kanbanBoardClasses as t } from "./kanbanBoardClasses.js";
|
|
3
3
|
import { useSortable as n } from "@dnd-kit/sortable";
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
4
|
+
import r from "@mui/icons-material/Add";
|
|
5
|
+
import { Box as i, Card as a, CardActionArea as o, CardContent as s, Chip as c, IconButton as l, LinearProgress as u, Tooltip as d, Typography as f } from "@mui/material";
|
|
6
|
+
import { CSS as p } from "@dnd-kit/utilities";
|
|
7
|
+
import m from "@mui/icons-material/CalendarToday";
|
|
8
|
+
import h from "@mui/icons-material/Person";
|
|
9
|
+
import { alpha as g } from "@mui/material/styles";
|
|
10
|
+
import { jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
10
11
|
//#region src/components/kanban-board/KanbanBoardCard.tsx
|
|
11
|
-
var
|
|
12
|
+
var y = {
|
|
12
13
|
low: "#4caf50",
|
|
13
14
|
medium: "#ff9800",
|
|
14
15
|
high: "#f44336",
|
|
15
16
|
critical: "#9c27b0"
|
|
16
|
-
},
|
|
17
|
+
}, b = {
|
|
17
18
|
fontSize: "0.7rem",
|
|
18
19
|
height: 22,
|
|
19
20
|
"& .MuiChip-icon": {
|
|
@@ -28,116 +29,175 @@ var h = {
|
|
|
28
29
|
pr: "10px"
|
|
29
30
|
}
|
|
30
31
|
};
|
|
31
|
-
function
|
|
32
|
-
let { attributes:
|
|
33
|
-
id:
|
|
34
|
-
disabled:
|
|
35
|
-
}),
|
|
36
|
-
transform:
|
|
37
|
-
transition:
|
|
38
|
-
opacity: +!
|
|
39
|
-
},
|
|
32
|
+
function x({ task: x, showPriority: S, showAssignee: C, showDueDate: w, showDueDateWarning: T, showSubtasks: E, enableBuiltinDialogs: D, chipVariant: O, t: k, onCardClick: A, isOverlay: j = !1 }) {
|
|
33
|
+
let { attributes: M, listeners: N, setNodeRef: P, transform: F, transition: I, isDragging: L } = n({
|
|
34
|
+
id: x.id,
|
|
35
|
+
disabled: j
|
|
36
|
+
}), R = j ? void 0 : {
|
|
37
|
+
transform: p.Transform.toString(F),
|
|
38
|
+
transition: I,
|
|
39
|
+
opacity: +!L
|
|
40
|
+
}, z = C && !!x.assignee || w && !!x.dueDate, B = E && !!x.subtasks?.length, V = x.subtasks?.length ?? 0, H = x.subtasks?.filter((e) => e.done).length ?? 0, U = x.dueDate ? x.dueDate.toLocaleDateString(void 0, {
|
|
40
41
|
day: "2-digit",
|
|
41
42
|
month: "short",
|
|
42
43
|
year: "numeric"
|
|
43
|
-
}) : null,
|
|
44
|
-
|
|
45
|
-
let
|
|
46
|
-
return /* @__PURE__ */
|
|
47
|
-
ref:
|
|
48
|
-
style:
|
|
44
|
+
}) : null, W = /* @__PURE__ */ new Date();
|
|
45
|
+
W.setHours(0, 0, 0, 0);
|
|
46
|
+
let G = T && !!x.dueDate && x.dueDate < W;
|
|
47
|
+
return /* @__PURE__ */ _(a, {
|
|
48
|
+
ref: j ? void 0 : P,
|
|
49
|
+
style: R,
|
|
49
50
|
elevation: 0,
|
|
50
|
-
className: [t.card,
|
|
51
|
+
className: [t.card, L && e.selected].filter(Boolean).join(" "),
|
|
51
52
|
sx: {
|
|
52
53
|
mb: 1,
|
|
53
54
|
border: "1px solid",
|
|
54
|
-
borderColor:
|
|
55
|
-
borderLeft:
|
|
55
|
+
borderColor: G && !x.color ? "error.light" : "divider",
|
|
56
|
+
borderLeft: x.color ? `4px solid ${x.color}` : G ? (e) => `4px solid ${e.palette.error.main}` : void 0,
|
|
56
57
|
userSelect: "none",
|
|
57
|
-
cursor:
|
|
58
|
-
bgcolor: (e) =>
|
|
58
|
+
cursor: j ? "grabbing" : "grab",
|
|
59
|
+
bgcolor: (e) => G ? e.palette.mode === "dark" ? g(e.palette.error.main, .12) : g(e.palette.error.main, .04) : e.palette.mode === "dark" ? e.palette.grey[800] : e.palette.background.paper,
|
|
59
60
|
boxShadow: (e) => e.palette.mode === "dark" ? "0 1px 3px rgba(0,0,0,0.4)" : "0 1px 3px rgba(0,0,0,0.08)",
|
|
60
61
|
transition: "box-shadow 0.15s ease, transform 0.15s ease",
|
|
61
|
-
...!
|
|
62
|
+
...!L && !j && { "&:hover": {
|
|
62
63
|
boxShadow: (e) => e.palette.mode === "dark" ? "0 4px 14px rgba(0,0,0,0.5)" : "0 4px 14px rgba(0,0,0,0.12)",
|
|
63
64
|
transform: "translateY(-1px)"
|
|
64
65
|
} },
|
|
65
66
|
"&:active": { cursor: "grabbing" }
|
|
66
67
|
},
|
|
67
|
-
...
|
|
68
|
-
...
|
|
69
|
-
...
|
|
68
|
+
...j ? {} : {
|
|
69
|
+
...M,
|
|
70
|
+
...N
|
|
70
71
|
},
|
|
71
|
-
onClick: () => !
|
|
72
|
-
"aria-label":
|
|
73
|
-
children: /* @__PURE__ */
|
|
72
|
+
onClick: () => !L && A(x),
|
|
73
|
+
"aria-label": x.title,
|
|
74
|
+
children: /* @__PURE__ */ _(o, {
|
|
74
75
|
component: "div",
|
|
75
76
|
sx: { cursor: "inherit" },
|
|
76
|
-
children: /* @__PURE__ */
|
|
77
|
+
children: /* @__PURE__ */ v(s, {
|
|
77
78
|
sx: {
|
|
78
79
|
p: 1.5,
|
|
79
80
|
"&:last-child": { pb: 1.5 }
|
|
80
81
|
},
|
|
81
|
-
children: [
|
|
82
|
-
|
|
83
|
-
display: "flex",
|
|
84
|
-
alignItems: "flex-start",
|
|
85
|
-
gap: .75,
|
|
86
|
-
mb: +!!N
|
|
87
|
-
},
|
|
88
|
-
children: [v && _.priority && /* @__PURE__ */ p(r, {
|
|
89
|
-
className: t.cardPriorityDot,
|
|
90
|
-
role: "img",
|
|
91
|
-
"aria-label": `Priority: ${_.priority}`,
|
|
82
|
+
children: [
|
|
83
|
+
/* @__PURE__ */ v(i, {
|
|
92
84
|
sx: {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
85
|
+
display: "flex",
|
|
86
|
+
alignItems: "flex-start",
|
|
87
|
+
gap: .75,
|
|
88
|
+
mb: z || B ? 1 : 0
|
|
89
|
+
},
|
|
90
|
+
children: [S && x.priority && /* @__PURE__ */ _(i, {
|
|
91
|
+
className: t.cardPriorityDot,
|
|
92
|
+
role: "img",
|
|
93
|
+
"aria-label": `Priority: ${x.priority}`,
|
|
94
|
+
sx: {
|
|
95
|
+
width: 8,
|
|
96
|
+
height: 8,
|
|
97
|
+
minWidth: 8,
|
|
98
|
+
borderRadius: "50%",
|
|
99
|
+
bgcolor: y[x.priority],
|
|
100
|
+
mt: "5px",
|
|
101
|
+
flexShrink: 0
|
|
102
|
+
}
|
|
103
|
+
}), /* @__PURE__ */ _(f, {
|
|
104
|
+
className: t.cardTitle,
|
|
105
|
+
variant: "body2",
|
|
106
|
+
sx: {
|
|
107
|
+
lineHeight: 1.4,
|
|
108
|
+
fontWeight: 700,
|
|
109
|
+
letterSpacing: "-0.01em"
|
|
110
|
+
},
|
|
111
|
+
children: x.title
|
|
112
|
+
})]
|
|
113
|
+
}),
|
|
114
|
+
z && /* @__PURE__ */ v(i, {
|
|
115
|
+
className: t.cardMeta,
|
|
116
|
+
sx: {
|
|
117
|
+
display: "flex",
|
|
118
|
+
gap: 1,
|
|
119
|
+
flexWrap: "wrap",
|
|
120
|
+
alignItems: "center"
|
|
121
|
+
},
|
|
122
|
+
children: [C && x.assignee && /* @__PURE__ */ _(c, {
|
|
123
|
+
className: t.cardAssignee,
|
|
124
|
+
icon: /* @__PURE__ */ _(h, {}),
|
|
125
|
+
label: x.assignee,
|
|
126
|
+
size: "small",
|
|
127
|
+
variant: O,
|
|
128
|
+
"aria-label": `${k.dialogFieldAssignee}: ${x.assignee}`,
|
|
129
|
+
sx: b
|
|
130
|
+
}), w && U && /* @__PURE__ */ _(c, {
|
|
131
|
+
className: t.cardDueDate,
|
|
132
|
+
icon: /* @__PURE__ */ _(m, {}),
|
|
133
|
+
label: U,
|
|
134
|
+
size: "small",
|
|
135
|
+
variant: O,
|
|
136
|
+
color: G ? "error" : "default",
|
|
137
|
+
"aria-label": `${k.dialogFieldDueDate}: ${U}`,
|
|
138
|
+
sx: b
|
|
139
|
+
})]
|
|
140
|
+
}),
|
|
141
|
+
B && /* @__PURE__ */ v(i, {
|
|
142
|
+
className: t.cardSubtasks,
|
|
104
143
|
sx: {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
144
|
+
display: "flex",
|
|
145
|
+
alignItems: "center",
|
|
146
|
+
gap: 1,
|
|
147
|
+
mt: z ? .75 : 0
|
|
108
148
|
},
|
|
109
|
-
children:
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
149
|
+
children: [
|
|
150
|
+
/* @__PURE__ */ _(u, {
|
|
151
|
+
className: t.cardSubtasksBar,
|
|
152
|
+
variant: "determinate",
|
|
153
|
+
value: H / V * 100,
|
|
154
|
+
sx: {
|
|
155
|
+
flex: 1,
|
|
156
|
+
height: 4,
|
|
157
|
+
borderRadius: 2
|
|
158
|
+
},
|
|
159
|
+
"aria-label": `${H} of ${V} subtasks done`
|
|
160
|
+
}),
|
|
161
|
+
/* @__PURE__ */ v(f, {
|
|
162
|
+
variant: "caption",
|
|
163
|
+
sx: {
|
|
164
|
+
whiteSpace: "nowrap",
|
|
165
|
+
color: "text.secondary",
|
|
166
|
+
fontSize: "0.65rem",
|
|
167
|
+
lineHeight: 1
|
|
168
|
+
},
|
|
169
|
+
children: [
|
|
170
|
+
H,
|
|
171
|
+
" / ",
|
|
172
|
+
V,
|
|
173
|
+
" ✓"
|
|
174
|
+
]
|
|
175
|
+
}),
|
|
176
|
+
D && !j && /* @__PURE__ */ _(d, {
|
|
177
|
+
title: k.cardSubtaskAdd,
|
|
178
|
+
placement: "top",
|
|
179
|
+
arrow: !0,
|
|
180
|
+
children: /* @__PURE__ */ _(l, {
|
|
181
|
+
size: "small",
|
|
182
|
+
"aria-label": k.cardSubtaskAdd,
|
|
183
|
+
onClick: (e) => {
|
|
184
|
+
e.stopPropagation(), A(x);
|
|
185
|
+
},
|
|
186
|
+
sx: {
|
|
187
|
+
p: .25,
|
|
188
|
+
opacity: 0,
|
|
189
|
+
transition: "opacity 0.15s",
|
|
190
|
+
[`.${t.card}:hover &`]: { opacity: 1 }
|
|
191
|
+
},
|
|
192
|
+
children: /* @__PURE__ */ _(r, { sx: { fontSize: "0.85rem" } })
|
|
193
|
+
})
|
|
194
|
+
})
|
|
195
|
+
]
|
|
196
|
+
})
|
|
197
|
+
]
|
|
138
198
|
})
|
|
139
199
|
})
|
|
140
200
|
});
|
|
141
201
|
}
|
|
142
202
|
//#endregion
|
|
143
|
-
export {
|
|
203
|
+
export { x as KanbanBoardCard };
|
|
@@ -13,11 +13,12 @@ type KanbanBoardCardDialogProps = {
|
|
|
13
13
|
state: KanbanDialogState | null;
|
|
14
14
|
columns: KanbanColumn[];
|
|
15
15
|
t: Required<KanbanBoardTranslation>;
|
|
16
|
+
showSubtasks: boolean;
|
|
16
17
|
onSave: (task: KanbanTask) => void;
|
|
17
18
|
onDelete: (taskId: string) => void;
|
|
18
19
|
onClose: () => void;
|
|
19
20
|
/** Switch from edit to delete confirmation — handled in parent. */
|
|
20
21
|
onRequestDelete: (task: KanbanTask) => void;
|
|
21
22
|
};
|
|
22
|
-
export declare function KanbanBoardCardDialog({ state, columns, t, onSave, onDelete, onClose, onRequestDelete }: KanbanBoardCardDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export declare function KanbanBoardCardDialog({ state, columns, t, showSubtasks, onSave, onDelete, onClose, onRequestDelete }: KanbanBoardCardDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
23
24
|
export {};
|
|
@@ -1,120 +1,216 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
1
|
+
import e from "@mui/icons-material/Add";
|
|
2
|
+
import { Box as t, Button as n, Checkbox as r, Dialog as i, DialogActions as a, DialogContent as o, DialogContentText as s, DialogTitle as c, FormControlLabel as l, IconButton as u, InputAdornment as d, MenuItem as f, Stack as p, TextField as m, Typography as h } from "@mui/material";
|
|
3
|
+
import { useState as g } from "react";
|
|
4
|
+
import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
5
|
+
import b from "@mui/icons-material/Close";
|
|
6
|
+
import x from "@mui/icons-material/Delete";
|
|
5
7
|
//#region src/components/kanban-board/KanbanBoardCardDialog.tsx
|
|
6
|
-
function
|
|
7
|
-
let
|
|
8
|
+
function S({ state: S, columns: C, t: w, showSubtasks: T, onSave: E, onDelete: D, onClose: O, onRequestDelete: k }) {
|
|
9
|
+
let A = S?.mode === "add", j = S?.mode === "edit", M = S?.mode === "delete", N = j ? S.task : null, P = M ? S.task : null, F = A ? S.columnId : null, [I, L] = g(() => j && N ? { ...N } : A && F ? {
|
|
8
10
|
id: "",
|
|
9
11
|
title: "",
|
|
10
|
-
status:
|
|
12
|
+
status: F
|
|
11
13
|
} : {
|
|
12
14
|
id: "",
|
|
13
15
|
title: "",
|
|
14
|
-
status:
|
|
15
|
-
});
|
|
16
|
-
function
|
|
17
|
-
let e =
|
|
18
|
-
e
|
|
19
|
-
|
|
16
|
+
status: C[0]?.id ?? ""
|
|
17
|
+
}), [R, z] = g("");
|
|
18
|
+
function B() {
|
|
19
|
+
let e = R.trim();
|
|
20
|
+
if (!e) return;
|
|
21
|
+
let t = {
|
|
22
|
+
id: crypto.randomUUID(),
|
|
23
|
+
title: e,
|
|
24
|
+
done: !1
|
|
25
|
+
};
|
|
26
|
+
L((e) => ({
|
|
27
|
+
...e,
|
|
28
|
+
subtasks: [...e.subtasks ?? [], t]
|
|
29
|
+
})), z("");
|
|
30
|
+
}
|
|
31
|
+
function V(e) {
|
|
32
|
+
L((t) => ({
|
|
33
|
+
...t,
|
|
34
|
+
subtasks: t.subtasks?.map((t) => t.id === e ? {
|
|
35
|
+
...t,
|
|
36
|
+
done: !t.done
|
|
37
|
+
} : t)
|
|
38
|
+
}));
|
|
39
|
+
}
|
|
40
|
+
function H(e) {
|
|
41
|
+
L((t) => ({
|
|
42
|
+
...t,
|
|
43
|
+
subtasks: t.subtasks?.filter((t) => t.id !== e)
|
|
44
|
+
}));
|
|
45
|
+
}
|
|
46
|
+
function U() {
|
|
47
|
+
let e = I.title.trim();
|
|
48
|
+
e && E({
|
|
49
|
+
...I,
|
|
20
50
|
title: e,
|
|
21
|
-
id:
|
|
51
|
+
id: j ? I.id : crypto.randomUUID()
|
|
22
52
|
});
|
|
23
53
|
}
|
|
24
|
-
function
|
|
25
|
-
|
|
54
|
+
function W(e, t) {
|
|
55
|
+
L((n) => ({
|
|
26
56
|
...n,
|
|
27
57
|
[e]: t
|
|
28
58
|
}));
|
|
29
59
|
}
|
|
30
|
-
let
|
|
31
|
-
return /* @__PURE__ */
|
|
32
|
-
open: !!
|
|
33
|
-
onClose:
|
|
60
|
+
let G = A ? w.dialogAddTitle : j ? w.dialogEditTitle : w.dialogDeleteTitle;
|
|
61
|
+
return /* @__PURE__ */ y(i, {
|
|
62
|
+
open: !!S,
|
|
63
|
+
onClose: O,
|
|
34
64
|
maxWidth: "xs",
|
|
35
65
|
fullWidth: !0,
|
|
36
|
-
children: [/* @__PURE__ */
|
|
37
|
-
onClick:
|
|
38
|
-
children:
|
|
39
|
-
}), /* @__PURE__ */
|
|
66
|
+
children: [/* @__PURE__ */ v(c, { children: G }), M && P ? /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(o, { children: /* @__PURE__ */ v(s, { children: w.dialogDeleteConfirm.replace("{title}", P.title) }) }), /* @__PURE__ */ y(a, { children: [/* @__PURE__ */ v(n, {
|
|
67
|
+
onClick: O,
|
|
68
|
+
children: w.dialogCancel
|
|
69
|
+
}), /* @__PURE__ */ v(n, {
|
|
40
70
|
color: "error",
|
|
41
|
-
startIcon: /* @__PURE__ */
|
|
42
|
-
onClick: () =>
|
|
43
|
-
children:
|
|
44
|
-
})] })] }) : /* @__PURE__ */
|
|
71
|
+
startIcon: /* @__PURE__ */ v(x, {}),
|
|
72
|
+
onClick: () => D(P.id),
|
|
73
|
+
children: w.dialogDelete
|
|
74
|
+
})] })] }) : /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(o, { children: /* @__PURE__ */ y(p, {
|
|
45
75
|
spacing: 2,
|
|
46
76
|
sx: { pt: .5 },
|
|
47
77
|
children: [
|
|
48
|
-
/* @__PURE__ */
|
|
49
|
-
label:
|
|
50
|
-
value:
|
|
51
|
-
onChange: (e) =>
|
|
78
|
+
/* @__PURE__ */ v(m, {
|
|
79
|
+
label: w.dialogFieldTitle,
|
|
80
|
+
value: I.title,
|
|
81
|
+
onChange: (e) => W("title", e.target.value),
|
|
52
82
|
required: !0,
|
|
53
83
|
fullWidth: !0,
|
|
54
84
|
size: "small",
|
|
55
85
|
autoFocus: !0,
|
|
56
|
-
onKeyDown: (e) => e.key === "Enter" &&
|
|
86
|
+
onKeyDown: (e) => e.key === "Enter" && U()
|
|
57
87
|
}),
|
|
58
|
-
/* @__PURE__ */
|
|
59
|
-
label:
|
|
60
|
-
value:
|
|
61
|
-
onChange: (e) =>
|
|
88
|
+
/* @__PURE__ */ v(m, {
|
|
89
|
+
label: w.dialogFieldDescription,
|
|
90
|
+
value: I.description ?? "",
|
|
91
|
+
onChange: (e) => W("description", e.target.value || void 0),
|
|
62
92
|
fullWidth: !0,
|
|
63
93
|
size: "small",
|
|
64
94
|
multiline: !0,
|
|
65
95
|
rows: 3
|
|
66
96
|
}),
|
|
67
|
-
/* @__PURE__ */
|
|
68
|
-
label:
|
|
69
|
-
value:
|
|
70
|
-
onChange: (e) =>
|
|
97
|
+
/* @__PURE__ */ v(m, {
|
|
98
|
+
label: w.dialogFieldAssignee,
|
|
99
|
+
value: I.assignee ?? "",
|
|
100
|
+
onChange: (e) => W("assignee", e.target.value || void 0),
|
|
71
101
|
fullWidth: !0,
|
|
72
102
|
size: "small"
|
|
73
103
|
}),
|
|
74
|
-
/* @__PURE__ */
|
|
75
|
-
label:
|
|
104
|
+
/* @__PURE__ */ v(m, {
|
|
105
|
+
label: w.dialogFieldDueDate,
|
|
76
106
|
type: "date",
|
|
77
|
-
value:
|
|
78
|
-
onChange: (e) =>
|
|
107
|
+
value: I.dueDate ? I.dueDate.toISOString().split("T")[0] : "",
|
|
108
|
+
onChange: (e) => W("dueDate", e.target.value ? /* @__PURE__ */ new Date(e.target.value + "T00:00:00") : void 0),
|
|
79
109
|
fullWidth: !0,
|
|
80
110
|
size: "small",
|
|
81
111
|
slotProps: { inputLabel: { shrink: !0 } }
|
|
82
112
|
}),
|
|
83
|
-
/* @__PURE__ */
|
|
113
|
+
/* @__PURE__ */ v(m, {
|
|
84
114
|
select: !0,
|
|
85
|
-
label:
|
|
86
|
-
value:
|
|
87
|
-
onChange: (e) =>
|
|
115
|
+
label: w.dialogFieldStatus,
|
|
116
|
+
value: I.status,
|
|
117
|
+
onChange: (e) => W("status", e.target.value),
|
|
88
118
|
fullWidth: !0,
|
|
89
119
|
size: "small",
|
|
90
|
-
children:
|
|
120
|
+
children: C.map((e) => /* @__PURE__ */ v(f, {
|
|
91
121
|
value: e.id,
|
|
92
122
|
children: e.label
|
|
93
123
|
}, e.id))
|
|
94
|
-
})
|
|
124
|
+
}),
|
|
125
|
+
T && /* @__PURE__ */ y(t, { children: [
|
|
126
|
+
/* @__PURE__ */ v(h, {
|
|
127
|
+
variant: "caption",
|
|
128
|
+
color: "text.secondary",
|
|
129
|
+
sx: {
|
|
130
|
+
display: "block",
|
|
131
|
+
mb: .5
|
|
132
|
+
},
|
|
133
|
+
children: w.dialogFieldSubtasks
|
|
134
|
+
}),
|
|
135
|
+
/* @__PURE__ */ v(p, {
|
|
136
|
+
spacing: .25,
|
|
137
|
+
children: (I.subtasks ?? []).map((e) => /* @__PURE__ */ y(t, {
|
|
138
|
+
sx: {
|
|
139
|
+
display: "flex",
|
|
140
|
+
alignItems: "center"
|
|
141
|
+
},
|
|
142
|
+
children: [/* @__PURE__ */ v(l, {
|
|
143
|
+
sx: {
|
|
144
|
+
flex: 1,
|
|
145
|
+
m: 0
|
|
146
|
+
},
|
|
147
|
+
control: /* @__PURE__ */ v(r, {
|
|
148
|
+
size: "small",
|
|
149
|
+
checked: e.done,
|
|
150
|
+
onChange: () => V(e.id),
|
|
151
|
+
sx: { p: .5 }
|
|
152
|
+
}),
|
|
153
|
+
label: /* @__PURE__ */ v(h, {
|
|
154
|
+
variant: "body2",
|
|
155
|
+
sx: {
|
|
156
|
+
textDecoration: e.done ? "line-through" : "none",
|
|
157
|
+
color: e.done ? "text.disabled" : "text.primary"
|
|
158
|
+
},
|
|
159
|
+
children: e.title
|
|
160
|
+
})
|
|
161
|
+
}), /* @__PURE__ */ v(u, {
|
|
162
|
+
size: "small",
|
|
163
|
+
onClick: () => H(e.id),
|
|
164
|
+
"aria-label": `Remove ${e.title}`,
|
|
165
|
+
children: /* @__PURE__ */ v(b, { fontSize: "small" })
|
|
166
|
+
})]
|
|
167
|
+
}, e.id))
|
|
168
|
+
}),
|
|
169
|
+
/* @__PURE__ */ v(m, {
|
|
170
|
+
size: "small",
|
|
171
|
+
placeholder: w.dialogSubtaskAdd,
|
|
172
|
+
value: R,
|
|
173
|
+
onChange: (e) => z(e.target.value),
|
|
174
|
+
onKeyDown: (e) => {
|
|
175
|
+
e.key === "Enter" && (e.preventDefault(), B());
|
|
176
|
+
},
|
|
177
|
+
fullWidth: !0,
|
|
178
|
+
sx: { mt: 1 },
|
|
179
|
+
slotProps: { input: { endAdornment: /* @__PURE__ */ v(d, {
|
|
180
|
+
position: "end",
|
|
181
|
+
children: /* @__PURE__ */ v(u, {
|
|
182
|
+
size: "small",
|
|
183
|
+
onClick: B,
|
|
184
|
+
disabled: !R.trim(),
|
|
185
|
+
"aria-label": w.dialogSubtaskAdd,
|
|
186
|
+
children: /* @__PURE__ */ v(e, { fontSize: "small" })
|
|
187
|
+
})
|
|
188
|
+
}) } }
|
|
189
|
+
})
|
|
190
|
+
] })
|
|
95
191
|
]
|
|
96
|
-
}) }), /* @__PURE__ */
|
|
97
|
-
sx: { justifyContent:
|
|
98
|
-
children: [
|
|
192
|
+
}) }), /* @__PURE__ */ y(a, {
|
|
193
|
+
sx: { justifyContent: j ? "space-between" : "flex-end" },
|
|
194
|
+
children: [j && N && /* @__PURE__ */ v(n, {
|
|
99
195
|
color: "error",
|
|
100
|
-
startIcon: /* @__PURE__ */
|
|
101
|
-
onClick: () =>
|
|
102
|
-
children:
|
|
103
|
-
}), /* @__PURE__ */
|
|
196
|
+
startIcon: /* @__PURE__ */ v(x, {}),
|
|
197
|
+
onClick: () => k(N),
|
|
198
|
+
children: w.dialogDelete
|
|
199
|
+
}), /* @__PURE__ */ y(p, {
|
|
104
200
|
direction: "row",
|
|
105
201
|
spacing: 1,
|
|
106
|
-
children: [/* @__PURE__ */
|
|
107
|
-
onClick:
|
|
108
|
-
children:
|
|
109
|
-
}), /* @__PURE__ */
|
|
202
|
+
children: [/* @__PURE__ */ v(n, {
|
|
203
|
+
onClick: O,
|
|
204
|
+
children: w.dialogCancel
|
|
205
|
+
}), /* @__PURE__ */ v(n, {
|
|
110
206
|
variant: "contained",
|
|
111
|
-
onClick:
|
|
112
|
-
disabled: !
|
|
113
|
-
children:
|
|
207
|
+
onClick: U,
|
|
208
|
+
disabled: !I.title.trim(),
|
|
209
|
+
children: w.dialogSave
|
|
114
210
|
})]
|
|
115
211
|
})]
|
|
116
212
|
})] })]
|
|
117
213
|
});
|
|
118
214
|
}
|
|
119
215
|
//#endregion
|
|
120
|
-
export {
|
|
216
|
+
export { S as KanbanBoardCardDialog };
|
|
@@ -8,11 +8,15 @@ type KanbanBoardColumnProps = {
|
|
|
8
8
|
showAssignee: boolean;
|
|
9
9
|
showDueDate: boolean;
|
|
10
10
|
showDueDateWarning: boolean;
|
|
11
|
+
showSubtasks: boolean;
|
|
11
12
|
chipVariant: "outlined" | "filled";
|
|
12
13
|
t: Required<KanbanBoardTranslation>;
|
|
13
14
|
enableBuiltinDialogs: boolean;
|
|
15
|
+
enableColumnManagement: boolean;
|
|
14
16
|
onCardClick: (task: KanbanTask) => void;
|
|
15
17
|
onAddClick: (columnId: string) => void;
|
|
18
|
+
onColumnRename: (columnId: string, newLabel: string) => void;
|
|
19
|
+
onColumnDeleteRequest: (columnId: string) => void;
|
|
16
20
|
};
|
|
17
|
-
export declare function KanbanBoardColumn({ column, tasks, totalCount, showPriority, showAssignee, showDueDate, showDueDateWarning, chipVariant, t, enableBuiltinDialogs, onCardClick, onAddClick, }: KanbanBoardColumnProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export declare function KanbanBoardColumn({ column, tasks, totalCount, showPriority, showAssignee, showDueDate, showDueDateWarning, showSubtasks, chipVariant, t, enableBuiltinDialogs, enableColumnManagement, onCardClick, onAddClick, onColumnRename, onColumnDeleteRequest, }: KanbanBoardColumnProps): import("react/jsx-runtime").JSX.Element;
|
|
18
22
|
export {};
|