@burdenoff/microfe-planmagnet 2026.927.4 → 2026.927.6
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/generated/global-types.d.ts +9 -1
- package/dist/generated/global-types.d.ts.map +1 -1
- package/dist/generated/wspace-operations.d.ts +0 -12
- package/dist/generated/wspace-operations.d.ts.map +1 -1
- package/dist/planmagnet/PlanMagnetRoutes.d.ts.map +1 -1
- package/dist/planmagnet/PlanMagnetRoutes.js +14 -10
- package/dist/planmagnet/PlanMagnetRoutes.js.map +1 -1
- package/dist/planmagnet/admin/PlanMagnetAdminRoot.d.ts.map +1 -1
- package/dist/planmagnet/admin/PlanMagnetAdminRoot.js +149 -127
- package/dist/planmagnet/admin/PlanMagnetAdminRoot.js.map +1 -1
- package/dist/planmagnet/board/ProjectBoard.d.ts +2 -0
- package/dist/planmagnet/board/ProjectBoard.d.ts.map +1 -1
- package/dist/planmagnet/board/ProjectBoard.js +492 -225
- package/dist/planmagnet/board/ProjectBoard.js.map +1 -1
- package/dist/planmagnet/controls/FeatureControls.d.ts.map +1 -1
- package/dist/planmagnet/controls/FeatureControls.js +142 -139
- package/dist/planmagnet/controls/FeatureControls.js.map +1 -1
- package/dist/planmagnet/controls/FeatureTriage.d.ts +21 -0
- package/dist/planmagnet/controls/FeatureTriage.d.ts.map +1 -0
- package/dist/planmagnet/controls/FeatureTriage.js +398 -0
- package/dist/planmagnet/controls/FeatureTriage.js.map +1 -0
- package/dist/planmagnet/controls/MilestoneControls.d.ts.map +1 -1
- package/dist/planmagnet/controls/MilestoneControls.js +76 -73
- package/dist/planmagnet/controls/MilestoneControls.js.map +1 -1
- package/dist/planmagnet/controls/ProjectControls.d.ts.map +1 -1
- package/dist/planmagnet/controls/ProjectControls.js +47 -44
- package/dist/planmagnet/controls/ProjectControls.js.map +1 -1
- package/dist/planmagnet/controls/ReleaseControls.d.ts.map +1 -1
- package/dist/planmagnet/controls/ReleaseControls.js +47 -44
- package/dist/planmagnet/controls/ReleaseControls.js.map +1 -1
- package/dist/planmagnet/controls/WorkItemControls.d.ts.map +1 -1
- package/dist/planmagnet/controls/WorkItemControls.js +68 -65
- package/dist/planmagnet/controls/WorkItemControls.js.map +1 -1
- package/dist/planmagnet/hooks/useCounts.d.ts +39 -0
- package/dist/planmagnet/hooks/useCounts.d.ts.map +1 -0
- package/dist/planmagnet/hooks/useCounts.js +209 -0
- package/dist/planmagnet/hooks/useCounts.js.map +1 -0
- package/dist/planmagnet/import/exportColumns.d.ts +52 -0
- package/dist/planmagnet/import/exportColumns.d.ts.map +1 -0
- package/dist/planmagnet/import/exportColumns.js +81 -0
- package/dist/planmagnet/import/exportColumns.js.map +1 -0
- package/dist/planmagnet/pages/AnalyticsAnalyticsPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/AnalyticsAnalyticsPagePage.js +255 -242
- package/dist/planmagnet/pages/AnalyticsAnalyticsPagePage.js.map +1 -1
- package/dist/planmagnet/pages/DashboardDashboardPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/DashboardDashboardPagePage.js +199 -160
- package/dist/planmagnet/pages/DashboardDashboardPagePage.js.map +1 -1
- package/dist/planmagnet/pages/DocsDocDetailPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/DocsDocDetailPagePage.js +147 -144
- package/dist/planmagnet/pages/DocsDocDetailPagePage.js.map +1 -1
- package/dist/planmagnet/pages/GoalsGoalsPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/GoalsGoalsPagePage.js +2 -7
- package/dist/planmagnet/pages/GoalsGoalsPagePage.js.map +1 -1
- package/dist/planmagnet/pages/GoalsObjectiveDetailPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/GoalsObjectiveDetailPagePage.js +173 -173
- package/dist/planmagnet/pages/GoalsObjectiveDetailPagePage.js.map +1 -1
- package/dist/planmagnet/pages/ProductsEditProductPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/ProductsEditProductPagePage.js +120 -117
- package/dist/planmagnet/pages/ProductsEditProductPagePage.js.map +1 -1
- package/dist/planmagnet/pages/ProductsFeatureAnalyticsPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/ProductsFeatureAnalyticsPagePage.js +97 -117
- package/dist/planmagnet/pages/ProductsFeatureAnalyticsPagePage.js.map +1 -1
- package/dist/planmagnet/pages/ProductsFeatureDetailPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/ProductsFeatureDetailPagePage.js +168 -103
- package/dist/planmagnet/pages/ProductsFeatureDetailPagePage.js.map +1 -1
- package/dist/planmagnet/pages/ProductsFeaturesPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/ProductsFeaturesPagePage.js +117 -103
- package/dist/planmagnet/pages/ProductsFeaturesPagePage.js.map +1 -1
- package/dist/planmagnet/pages/ProductsProductDetailPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/ProductsProductDetailPagePage.js +4 -8
- package/dist/planmagnet/pages/ProductsProductDetailPagePage.js.map +1 -1
- package/dist/planmagnet/pages/ProductsProductsPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/ProductsProductsPagePage.js +85 -90
- package/dist/planmagnet/pages/ProductsProductsPagePage.js.map +1 -1
- package/dist/planmagnet/pages/ProductsReleaseDetailPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/ProductsReleaseDetailPagePage.js +12 -2
- package/dist/planmagnet/pages/ProductsReleaseDetailPagePage.js.map +1 -1
- package/dist/planmagnet/pages/ProductsReleasesPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/ProductsReleasesPagePage.js +2 -2
- package/dist/planmagnet/pages/ProductsReleasesPagePage.js.map +1 -1
- package/dist/planmagnet/pages/ProductsRoadmapAnalyticsPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/ProductsRoadmapAnalyticsPagePage.js +48 -71
- package/dist/planmagnet/pages/ProductsRoadmapAnalyticsPagePage.js.map +1 -1
- package/dist/planmagnet/pages/ProductsRoadmapsPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/ProductsRoadmapsPagePage.js +17 -13
- package/dist/planmagnet/pages/ProductsRoadmapsPagePage.js.map +1 -1
- package/dist/planmagnet/pages/ProjectsActiveProjectsPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/ProjectsActiveProjectsPagePage.js +1 -1
- package/dist/planmagnet/pages/ProjectsActiveProjectsPagePage.js.map +1 -1
- package/dist/planmagnet/pages/ProjectsEditProjectPagePage.js +6 -6
- package/dist/planmagnet/pages/ProjectsPlanningDetailPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/ProjectsPlanningDetailPagePage.js +11 -8
- package/dist/planmagnet/pages/ProjectsPlanningDetailPagePage.js.map +1 -1
- package/dist/planmagnet/pages/ProjectsPlanningEditPagePage.js +4 -4
- package/dist/planmagnet/pages/ProjectsPlanningPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/ProjectsPlanningPagePage.js +1 -1
- package/dist/planmagnet/pages/ProjectsPlanningPagePage.js.map +1 -1
- package/dist/planmagnet/pages/ProjectsProjectDetailPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/ProjectsProjectDetailPagePage.js +152 -139
- package/dist/planmagnet/pages/ProjectsProjectDetailPagePage.js.map +1 -1
- package/dist/planmagnet/pages/ProjectsProjectsPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/ProjectsProjectsPagePage.js +75 -74
- package/dist/planmagnet/pages/ProjectsProjectsPagePage.js.map +1 -1
- package/dist/planmagnet/pages/ReportsReportsPagePage.d.ts +7 -0
- package/dist/planmagnet/pages/ReportsReportsPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/ReportsReportsPagePage.js +39 -201
- package/dist/planmagnet/pages/ReportsReportsPagePage.js.map +1 -1
- package/dist/planmagnet/pages/SprintsStartSprintPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/SprintsStartSprintPagePage.js +118 -99
- package/dist/planmagnet/pages/SprintsStartSprintPagePage.js.map +1 -1
- package/dist/planmagnet/pages/TasksImportPagePage.d.ts +2 -0
- package/dist/planmagnet/pages/TasksImportPagePage.d.ts.map +1 -0
- package/dist/planmagnet/pages/TasksImportPagePage.js +309 -0
- package/dist/planmagnet/pages/TasksImportPagePage.js.map +1 -0
- package/dist/planmagnet/pages/TasksTasksPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/TasksTasksPagePage.js +110 -104
- package/dist/planmagnet/pages/TasksTasksPagePage.js.map +1 -1
- package/dist/planmagnet/pages/TeamTeamPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/TeamTeamPagePage.js +99 -177
- package/dist/planmagnet/pages/TeamTeamPagePage.js.map +1 -1
- package/dist/planmagnet/pages/analytics/DeliveryHealthCards.d.ts.map +1 -1
- package/dist/planmagnet/pages/analytics/DeliveryHealthCards.js +8 -4
- package/dist/planmagnet/pages/analytics/DeliveryHealthCards.js.map +1 -1
- package/dist/planmagnet/releases/ReleaseWorkItemsCard.d.ts.map +1 -1
- package/dist/planmagnet/releases/ReleaseWorkItemsCard.js +10 -4
- package/dist/planmagnet/releases/ReleaseWorkItemsCard.js.map +1 -1
- package/dist/planmagnet/roadmaps/RoadmapControls.d.ts.map +1 -1
- package/dist/planmagnet/roadmaps/RoadmapControls.js +151 -138
- package/dist/planmagnet/roadmaps/RoadmapControls.js.map +1 -1
- package/dist/planmagnet/sprints/SprintControls.d.ts.map +1 -1
- package/dist/planmagnet/sprints/SprintControls.js +32 -30
- package/dist/planmagnet/sprints/SprintControls.js.map +1 -1
- package/dist/planmagnet/utils/mutationResult.d.ts +10 -0
- package/dist/planmagnet/utils/mutationResult.d.ts.map +1 -1
- package/dist/planmagnet/utils/mutationResult.js +2 -1
- package/dist/planmagnet/utils/mutationResult.js.map +1 -1
- package/dist/planmagnet/utils/rowNavigation.d.ts +2 -0
- package/dist/planmagnet/utils/rowNavigation.d.ts.map +1 -1
- package/dist/planmagnet/utils/rowNavigation.js +9 -8
- package/dist/planmagnet/utils/rowNavigation.js.map +1 -1
- package/package.json +1 -1
|
@@ -4,11 +4,11 @@ import { throwOnError as r } from "../utils/mutationResult.js";
|
|
|
4
4
|
import { useState as i } from "react";
|
|
5
5
|
import { ChevronLeft as a, ChevronRight as o, LayoutGrid as s, Pencil as c, Plus as l } from "lucide-react";
|
|
6
6
|
import { gql as u } from "@apollo/client";
|
|
7
|
-
import {
|
|
8
|
-
import { jsx as
|
|
9
|
-
import { AlertDialog as
|
|
7
|
+
import { useApolloClient as d, useMutation as f, useQuery as p } from "@apollo/client/react";
|
|
8
|
+
import { jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
9
|
+
import { AlertDialog as g, AlertDialogAction as _, AlertDialogCancel as v, AlertDialogContent as y, AlertDialogDescription as b, AlertDialogFooter as x, AlertDialogHeader as ee, AlertDialogTitle as S, AlertDialogTrigger as C, Button as w, Card as T, CardContent as E, Input as D, ResponsiveDialog as te, ResponsiveDialogContent as O, ResponsiveDialogDescription as k, ResponsiveDialogFooter as ne, ResponsiveDialogHeader as re, ResponsiveDialogTitle as A, ResponsiveDialogTrigger as j } from "@burdenoff/fe-libs/ui";
|
|
10
10
|
//#region src/planmagnet/board/ProjectBoard.tsx
|
|
11
|
-
var
|
|
11
|
+
var M = [
|
|
12
12
|
"BACKLOG",
|
|
13
13
|
"TODO",
|
|
14
14
|
"IN_PROGRESS",
|
|
@@ -16,7 +16,7 @@ var te = [
|
|
|
16
16
|
"TESTING",
|
|
17
17
|
"DONE",
|
|
18
18
|
"CANCELLED"
|
|
19
|
-
],
|
|
19
|
+
], N = (e) => e.charAt(0) + e.slice(1).toLowerCase().replace(/_/g, " "), P = 100, F = u`
|
|
20
20
|
query ProjectBoards($workspaceId: ID!, $projectId: String) {
|
|
21
21
|
planmagnetBoards(
|
|
22
22
|
workspaceId: $workspaceId
|
|
@@ -30,7 +30,30 @@ var te = [
|
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
|
-
`,
|
|
33
|
+
`, I = u`
|
|
34
|
+
query ProjectBoardColumnPage($boardId: ID!, $columnId: ID!, $after: String) {
|
|
35
|
+
planmagnetBoardColumnCards(
|
|
36
|
+
boardId: $boardId
|
|
37
|
+
columnId: $columnId
|
|
38
|
+
pagination: { first: 100, after: $after }
|
|
39
|
+
) {
|
|
40
|
+
pageInfo {
|
|
41
|
+
hasNextPage
|
|
42
|
+
endCursor
|
|
43
|
+
}
|
|
44
|
+
items {
|
|
45
|
+
id
|
|
46
|
+
key
|
|
47
|
+
title
|
|
48
|
+
status
|
|
49
|
+
priority
|
|
50
|
+
storyPoints
|
|
51
|
+
assigneeId
|
|
52
|
+
statusSince
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
`, ie = u`
|
|
34
57
|
query ProjectBoard($id: ID!) {
|
|
35
58
|
planmagnetBoard(id: $id) {
|
|
36
59
|
id
|
|
@@ -44,6 +67,10 @@ var te = [
|
|
|
44
67
|
sortOrder
|
|
45
68
|
cards(pagination: { first: 100 }) {
|
|
46
69
|
totalCount
|
|
70
|
+
pageInfo {
|
|
71
|
+
hasNextPage
|
|
72
|
+
endCursor
|
|
73
|
+
}
|
|
47
74
|
items {
|
|
48
75
|
id
|
|
49
76
|
key
|
|
@@ -52,434 +79,674 @@ var te = [
|
|
|
52
79
|
priority
|
|
53
80
|
storyPoints
|
|
54
81
|
assigneeId
|
|
82
|
+
statusSince
|
|
55
83
|
}
|
|
56
84
|
}
|
|
57
85
|
}
|
|
58
86
|
}
|
|
59
87
|
}
|
|
60
|
-
`,
|
|
88
|
+
`, L = u`
|
|
61
89
|
mutation ProjectBoardMoveCard($boardId: ID!, $input: PlanmagnetMoveCardInput!) {
|
|
62
90
|
planmagnetMoveCard(boardId: $boardId, input: $input) {
|
|
63
91
|
id
|
|
64
92
|
}
|
|
65
93
|
}
|
|
66
|
-
`,
|
|
94
|
+
`, R = u`
|
|
67
95
|
mutation ProjectBoardCreate($input: PlanmagnetCreateBoardInput!) {
|
|
68
96
|
planmagnetCreateBoard(input: $input) {
|
|
69
97
|
id
|
|
70
98
|
}
|
|
71
99
|
}
|
|
72
|
-
`,
|
|
100
|
+
`, z = u`
|
|
73
101
|
mutation ProjectBoardCreateColumn($input: PlanmagnetCreateBoardColumnInput!) {
|
|
74
102
|
planmagnetCreateBoardColumn(input: $input) {
|
|
75
103
|
id
|
|
76
104
|
}
|
|
77
105
|
}
|
|
78
|
-
`,
|
|
106
|
+
`, B = u`
|
|
79
107
|
mutation ProjectBoardUpdateColumn($id: ID!, $input: PlanmagnetUpdateBoardColumnInput!) {
|
|
80
108
|
planmagnetUpdateBoardColumn(id: $id, input: $input) {
|
|
81
109
|
id
|
|
82
110
|
}
|
|
83
111
|
}
|
|
84
|
-
`,
|
|
112
|
+
`, V = u`
|
|
85
113
|
mutation ProjectBoardDeleteColumn($id: ID!) {
|
|
86
114
|
planmagnetDeleteBoardColumn(id: $id)
|
|
87
115
|
}
|
|
88
|
-
`,
|
|
116
|
+
`, H = u`
|
|
89
117
|
mutation ProjectBoardReorder($boardId: ID!, $input: PlanmagnetReorderColumnsInput!) {
|
|
90
118
|
planmagnetReorderColumns(boardId: $boardId, input: $input) {
|
|
91
119
|
id
|
|
92
120
|
}
|
|
93
121
|
}
|
|
94
|
-
`,
|
|
122
|
+
`, U = [
|
|
95
123
|
"ProjectBoard",
|
|
96
124
|
"ProjectBoards",
|
|
97
125
|
"GetWorkItems",
|
|
98
126
|
"GetWorkItemCounts",
|
|
99
127
|
"GetDashboardData"
|
|
100
|
-
],
|
|
101
|
-
|
|
102
|
-
|
|
128
|
+
], W = [
|
|
129
|
+
"CRITICAL",
|
|
130
|
+
"HIGH",
|
|
131
|
+
"MEDIUM",
|
|
132
|
+
"LOW",
|
|
133
|
+
"NONE"
|
|
134
|
+
], G = 864e5;
|
|
135
|
+
function K(e, t) {
|
|
136
|
+
return e ? Math.max(0, Math.floor((t - new Date(e).getTime()) / G)) : null;
|
|
137
|
+
}
|
|
138
|
+
function q(e) {
|
|
139
|
+
return e >= 14 ? "text-destructive font-medium" : e >= 7 ? "text-status-warning-text" : "text-muted-foreground";
|
|
140
|
+
}
|
|
141
|
+
function J(e, t) {
|
|
142
|
+
return t === "assignee" ? e.assigneeId ?? "" : t === "priority" ? e.priority || "NONE" : "";
|
|
143
|
+
}
|
|
144
|
+
var Y = (e, t) => e instanceof Error ? e.message : t;
|
|
145
|
+
function X({ message: e }) {
|
|
146
|
+
return /* @__PURE__ */ m("p", {
|
|
103
147
|
role: "alert",
|
|
104
148
|
className: "text-sm text-destructive",
|
|
105
149
|
children: e
|
|
106
150
|
});
|
|
107
151
|
}
|
|
108
|
-
function
|
|
109
|
-
let { workspaceId: a } = e(),
|
|
152
|
+
function ae({ projectId: t, projectName: n }) {
|
|
153
|
+
let { workspaceId: a } = e(), o = d(), [c, u] = i(null), [g, _] = i(null), [v] = i(() => Date.now()), [y, b] = i("none"), [x, ee] = i({
|
|
154
|
+
key: null,
|
|
155
|
+
byColumn: {}
|
|
156
|
+
}), [S, C] = i(null), { data: D, loading: te } = p(F, {
|
|
110
157
|
variables: {
|
|
111
158
|
workspaceId: a,
|
|
112
159
|
projectId: t
|
|
113
160
|
},
|
|
114
161
|
skip: !a
|
|
115
|
-
}),
|
|
116
|
-
variables: { id:
|
|
117
|
-
skip: !
|
|
118
|
-
}),
|
|
119
|
-
|
|
162
|
+
}), O = D?.planmagnetBoards.items ?? [], k = (c && O.some((e) => e.id === c) ? c : null) ?? O.find((e) => e.isDefault)?.id ?? O[0]?.id ?? null, { data: ne, loading: re } = p(ie, {
|
|
163
|
+
variables: { id: k },
|
|
164
|
+
skip: !k
|
|
165
|
+
}), A = ne?.planmagnetBoard ?? null, j = x.key === A ? x.byColumn : {}, M = (e) => {
|
|
166
|
+
let t = j[e.id];
|
|
167
|
+
return {
|
|
168
|
+
items: t ? [...e.cards.items, ...t.items] : e.cards.items,
|
|
169
|
+
pageInfo: t ? t.pageInfo : e.cards.pageInfo,
|
|
170
|
+
totalCount: e.cards.totalCount
|
|
171
|
+
};
|
|
172
|
+
}, N = async (e) => {
|
|
173
|
+
let t = M(e).pageInfo.endCursor;
|
|
174
|
+
if (!(!A || !t)) {
|
|
175
|
+
_(null), C(e.id);
|
|
176
|
+
try {
|
|
177
|
+
let n = await o.query({
|
|
178
|
+
query: I,
|
|
179
|
+
variables: {
|
|
180
|
+
boardId: A.id,
|
|
181
|
+
columnId: e.id,
|
|
182
|
+
after: t
|
|
183
|
+
},
|
|
184
|
+
fetchPolicy: "network-only"
|
|
185
|
+
}), r = n.data?.planmagnetBoardColumnCards;
|
|
186
|
+
if (!r) throw Error(n.error?.message ?? "The next cards could not be loaded.");
|
|
187
|
+
let i = j[e.id]?.items ?? [];
|
|
188
|
+
ee({
|
|
189
|
+
key: A,
|
|
190
|
+
byColumn: {
|
|
191
|
+
...j,
|
|
192
|
+
[e.id]: {
|
|
193
|
+
items: [...i, ...r.items],
|
|
194
|
+
pageInfo: r.pageInfo
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
});
|
|
198
|
+
} catch (e) {
|
|
199
|
+
_(Y(e, "The next cards could not be loaded."));
|
|
200
|
+
} finally {
|
|
201
|
+
C(null);
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}, [P, z] = f(R, {
|
|
205
|
+
refetchQueries: U,
|
|
120
206
|
awaitRefetchQueries: !0
|
|
121
|
-
}), [
|
|
122
|
-
refetchQueries:
|
|
207
|
+
}), [B, V] = f(L, {
|
|
208
|
+
refetchQueries: U,
|
|
123
209
|
awaitRefetchQueries: !0
|
|
124
|
-
}), [
|
|
125
|
-
refetchQueries:
|
|
210
|
+
}), [W] = f(H, {
|
|
211
|
+
refetchQueries: U,
|
|
126
212
|
awaitRefetchQueries: !0
|
|
127
|
-
}),
|
|
128
|
-
|
|
213
|
+
}), G = async (e, t) => {
|
|
214
|
+
_(null);
|
|
129
215
|
try {
|
|
130
216
|
await r(e());
|
|
131
217
|
} catch (e) {
|
|
132
|
-
|
|
218
|
+
_(Y(e, t));
|
|
133
219
|
}
|
|
134
|
-
},
|
|
135
|
-
boardId:
|
|
220
|
+
}, K = (e, t) => G(() => B({ variables: {
|
|
221
|
+
boardId: k,
|
|
136
222
|
input: {
|
|
137
223
|
workItemId: e,
|
|
138
224
|
targetColumnId: t
|
|
139
225
|
}
|
|
140
|
-
} }), "The card could not be moved."),
|
|
141
|
-
if (!
|
|
142
|
-
let n =
|
|
143
|
-
if (!(r < 0 || r >= n.length)) return [n[e], n[r]] = [n[r], n[e]],
|
|
144
|
-
boardId:
|
|
226
|
+
} }), "The card could not be moved."), q = (e, t) => {
|
|
227
|
+
if (!A) return;
|
|
228
|
+
let n = A.columns.map((e) => e.id), r = e + t;
|
|
229
|
+
if (!(r < 0 || r >= n.length)) return [n[e], n[r]] = [n[r], n[e]], G(() => W({ variables: {
|
|
230
|
+
boardId: k,
|
|
145
231
|
input: { columnIds: n }
|
|
146
232
|
} }), "The columns could not be reordered.");
|
|
147
233
|
};
|
|
148
|
-
return
|
|
234
|
+
return te && !D ? /* @__PURE__ */ m("p", {
|
|
149
235
|
className: "text-sm text-muted-foreground p-4",
|
|
150
236
|
children: "Loading board…"
|
|
151
|
-
}) :
|
|
237
|
+
}) : k ? /* @__PURE__ */ h("div", {
|
|
152
238
|
className: "space-y-3",
|
|
153
239
|
"data-testid": "project-board",
|
|
154
240
|
children: [
|
|
155
|
-
/* @__PURE__ */
|
|
241
|
+
/* @__PURE__ */ h("div", {
|
|
156
242
|
className: "flex flex-wrap items-center gap-3",
|
|
157
243
|
children: [
|
|
158
|
-
|
|
244
|
+
O.length > 1 && /* @__PURE__ */ m("select", {
|
|
159
245
|
"aria-label": "Board",
|
|
160
246
|
className: "rounded-md border border-input bg-background px-2 py-1 text-sm",
|
|
161
|
-
value:
|
|
162
|
-
onChange: (e) =>
|
|
163
|
-
children:
|
|
247
|
+
value: k,
|
|
248
|
+
onChange: (e) => u(e.target.value),
|
|
249
|
+
children: O.map((e) => /* @__PURE__ */ m("option", {
|
|
164
250
|
value: e.id,
|
|
165
251
|
children: e.name
|
|
166
252
|
}, e.id))
|
|
167
253
|
}),
|
|
168
|
-
|
|
254
|
+
A && /* @__PURE__ */ h("label", {
|
|
255
|
+
className: "flex items-center gap-1 text-sm",
|
|
256
|
+
children: [/* @__PURE__ */ m("span", {
|
|
257
|
+
className: "text-muted-foreground",
|
|
258
|
+
children: "Swimlanes"
|
|
259
|
+
}), /* @__PURE__ */ h("select", {
|
|
260
|
+
"aria-label": "Swimlanes",
|
|
261
|
+
"data-testid": "board-lanes",
|
|
262
|
+
className: "rounded-md border border-input bg-background px-2 py-1 text-sm",
|
|
263
|
+
value: y,
|
|
264
|
+
onChange: (e) => b(e.target.value),
|
|
265
|
+
children: [
|
|
266
|
+
/* @__PURE__ */ m("option", {
|
|
267
|
+
value: "none",
|
|
268
|
+
children: "None"
|
|
269
|
+
}),
|
|
270
|
+
/* @__PURE__ */ m("option", {
|
|
271
|
+
value: "assignee",
|
|
272
|
+
children: "By assignee"
|
|
273
|
+
}),
|
|
274
|
+
/* @__PURE__ */ m("option", {
|
|
275
|
+
value: "priority",
|
|
276
|
+
children: "By priority"
|
|
277
|
+
})
|
|
278
|
+
]
|
|
279
|
+
})]
|
|
280
|
+
}),
|
|
281
|
+
A && A.unplacedCount > 0 && /* @__PURE__ */ h("p", {
|
|
169
282
|
className: "text-xs text-muted-foreground",
|
|
170
283
|
"data-testid": "board-unplaced",
|
|
171
284
|
children: [
|
|
172
|
-
|
|
285
|
+
A.unplacedCount,
|
|
173
286
|
" work item",
|
|
174
|
-
|
|
287
|
+
A.unplacedCount === 1 ? " is" : "s are",
|
|
175
288
|
" not on this board: ",
|
|
176
|
-
|
|
289
|
+
A.unplacedCount === 1 ? "its status has" : "their status has",
|
|
177
290
|
" no column."
|
|
178
291
|
]
|
|
179
292
|
}),
|
|
180
|
-
|
|
293
|
+
A && /* @__PURE__ */ m("div", {
|
|
181
294
|
className: "ml-auto",
|
|
182
|
-
children: /* @__PURE__ */
|
|
295
|
+
children: /* @__PURE__ */ m(ce, { boardId: A.id })
|
|
183
296
|
})
|
|
184
297
|
]
|
|
185
298
|
}),
|
|
186
|
-
|
|
187
|
-
|
|
299
|
+
g && /* @__PURE__ */ m(X, { message: g }),
|
|
300
|
+
re && !A ? /* @__PURE__ */ m("p", {
|
|
188
301
|
className: "text-sm text-muted-foreground p-4",
|
|
189
302
|
children: "Loading board…"
|
|
190
|
-
}) : /* @__PURE__ */ m(
|
|
303
|
+
}) : A && y !== "none" ? /* @__PURE__ */ m(oe, {
|
|
304
|
+
board: A,
|
|
305
|
+
laneBy: y,
|
|
306
|
+
cardsOf: M,
|
|
307
|
+
now: v,
|
|
308
|
+
busy: V.loading,
|
|
309
|
+
loadingMore: S,
|
|
310
|
+
onLoadMore: (e) => void N(e),
|
|
311
|
+
onMove: K
|
|
312
|
+
}) : /* @__PURE__ */ h("div", {
|
|
191
313
|
className: "flex gap-3 overflow-x-auto pb-2",
|
|
192
|
-
children: [
|
|
193
|
-
boardId:
|
|
314
|
+
children: [A?.columns.map((e, t) => /* @__PURE__ */ m(se, {
|
|
315
|
+
boardId: A.id,
|
|
194
316
|
column: e,
|
|
195
|
-
columns:
|
|
317
|
+
columns: A.columns,
|
|
318
|
+
cards: M(e),
|
|
196
319
|
isFirst: t === 0,
|
|
197
|
-
isLast: t ===
|
|
198
|
-
busy:
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
320
|
+
isLast: t === A.columns.length - 1,
|
|
321
|
+
busy: V.loading,
|
|
322
|
+
now: v,
|
|
323
|
+
loadingMore: S === e.id,
|
|
324
|
+
onLoadMore: () => void N(e),
|
|
325
|
+
onMove: K,
|
|
326
|
+
onShift: (e) => q(t, e)
|
|
327
|
+
}, e.id)), A && A.columns.length === 0 && /* @__PURE__ */ m("p", {
|
|
202
328
|
className: "text-sm text-muted-foreground p-4",
|
|
203
329
|
children: "This board has no columns. Add one to start placing work."
|
|
204
330
|
})]
|
|
205
331
|
})
|
|
206
332
|
]
|
|
207
|
-
}) : /* @__PURE__ */
|
|
333
|
+
}) : /* @__PURE__ */ m(T, { children: /* @__PURE__ */ h(E, {
|
|
208
334
|
className: "p-8 text-center space-y-3",
|
|
209
335
|
"data-testid": "board-empty",
|
|
210
336
|
children: [
|
|
211
|
-
/* @__PURE__ */
|
|
212
|
-
/* @__PURE__ */
|
|
337
|
+
/* @__PURE__ */ m(s, { className: "h-8 w-8 mx-auto text-muted-foreground" }),
|
|
338
|
+
/* @__PURE__ */ h("p", {
|
|
213
339
|
className: "text-sm text-muted-foreground",
|
|
214
340
|
children: [n, " has no board yet."]
|
|
215
341
|
}),
|
|
216
|
-
/* @__PURE__ */
|
|
342
|
+
/* @__PURE__ */ h(w, {
|
|
217
343
|
size: "sm",
|
|
218
|
-
disabled:
|
|
219
|
-
onClick: () =>
|
|
344
|
+
disabled: z.loading,
|
|
345
|
+
onClick: () => G(() => P({ variables: { input: {
|
|
220
346
|
projectId: t,
|
|
221
347
|
name: `${n} board`,
|
|
222
348
|
type: "KANBAN",
|
|
223
349
|
isDefault: !0,
|
|
224
350
|
withDefaultColumns: !0
|
|
225
351
|
} } }), "The board could not be created."),
|
|
226
|
-
children: [/* @__PURE__ */
|
|
352
|
+
children: [/* @__PURE__ */ m(l, { className: "mr-1 h-4 w-4" }), z.loading ? "Creating…" : "Create board"]
|
|
227
353
|
}),
|
|
228
|
-
/* @__PURE__ */
|
|
354
|
+
/* @__PURE__ */ m("p", {
|
|
229
355
|
className: "text-xs text-muted-foreground",
|
|
230
356
|
children: "Starts with one column per status: Backlog, To Do, In Progress, In Review, Testing, Done."
|
|
231
357
|
}),
|
|
232
|
-
|
|
358
|
+
g && /* @__PURE__ */ m(X, { message: g })
|
|
233
359
|
]
|
|
234
360
|
}) });
|
|
235
361
|
}
|
|
236
|
-
function
|
|
237
|
-
let
|
|
362
|
+
function Z({ card: e, column: r, columns: i, busy: a, now: o, onMove: s }) {
|
|
363
|
+
let c = t(), l = K(e.statusSince, o);
|
|
364
|
+
return /* @__PURE__ */ h("li", {
|
|
365
|
+
draggable: !0,
|
|
366
|
+
onDragStart: (t) => {
|
|
367
|
+
t.dataTransfer.setData("text/plain", e.id), t.dataTransfer.effectAllowed = "move";
|
|
368
|
+
},
|
|
369
|
+
className: "rounded-md border bg-background p-2 space-y-1 cursor-grab",
|
|
370
|
+
"data-testid": "board-card",
|
|
371
|
+
children: [
|
|
372
|
+
/* @__PURE__ */ m("button", {
|
|
373
|
+
type: "button",
|
|
374
|
+
className: "text-left text-sm font-medium leading-tight hover:underline",
|
|
375
|
+
onClick: () => c(`/tasks/task-detail-page?taskId=${encodeURIComponent(e.id)}`),
|
|
376
|
+
children: e.title
|
|
377
|
+
}),
|
|
378
|
+
/* @__PURE__ */ h("div", {
|
|
379
|
+
className: "flex items-center justify-between text-[11px] text-muted-foreground",
|
|
380
|
+
children: [
|
|
381
|
+
/* @__PURE__ */ m("span", { children: e.key }),
|
|
382
|
+
l !== null && /* @__PURE__ */ m("span", {
|
|
383
|
+
"data-testid": "card-age",
|
|
384
|
+
className: q(l),
|
|
385
|
+
title: `In ${N(e.status)} since ${new Date(e.statusSince ?? "").toLocaleDateString()}`,
|
|
386
|
+
children: l === 0 ? "today" : `${l}d in status`
|
|
387
|
+
}),
|
|
388
|
+
/* @__PURE__ */ h("span", { children: [e.storyPoints ?? 0, " pts"] })
|
|
389
|
+
]
|
|
390
|
+
}),
|
|
391
|
+
/* @__PURE__ */ h("div", {
|
|
392
|
+
className: "flex items-center justify-between gap-1 text-[11px] text-muted-foreground",
|
|
393
|
+
children: [/* @__PURE__ */ m("span", {
|
|
394
|
+
className: "truncate",
|
|
395
|
+
children: e.assigneeId ? /* @__PURE__ */ m(n, { id: e.assigneeId }) : "Unassigned"
|
|
396
|
+
}), /* @__PURE__ */ h("select", {
|
|
397
|
+
"aria-label": `Move ${e.key} to column`,
|
|
398
|
+
className: "rounded border border-input bg-background px-1 py-0.5 text-[11px]",
|
|
399
|
+
value: "",
|
|
400
|
+
disabled: a,
|
|
401
|
+
onChange: (t) => t.target.value && s(e.id, t.target.value),
|
|
402
|
+
children: [/* @__PURE__ */ m("option", {
|
|
403
|
+
value: "",
|
|
404
|
+
children: "Move…"
|
|
405
|
+
}), i.filter((e) => e.id !== r.id).map((e) => /* @__PURE__ */ m("option", {
|
|
406
|
+
value: e.id,
|
|
407
|
+
children: e.name
|
|
408
|
+
}, e.id))]
|
|
409
|
+
})]
|
|
410
|
+
})
|
|
411
|
+
]
|
|
412
|
+
});
|
|
413
|
+
}
|
|
414
|
+
function Q({ column: e, onMove: t, className: n, children: r, label: a }) {
|
|
415
|
+
let [o, s] = i(!1);
|
|
238
416
|
return /* @__PURE__ */ m("section", {
|
|
239
|
-
"aria-label":
|
|
240
|
-
"
|
|
241
|
-
className: `min-w-[240px] w-[240px] shrink-0 rounded-md border bg-muted/30 ${g ? "ring-2 ring-primary" : ""}`,
|
|
417
|
+
"aria-label": a,
|
|
418
|
+
className: `${n} ${o ? "ring-2 ring-primary" : ""}`,
|
|
242
419
|
onDragOver: (e) => {
|
|
243
|
-
e.preventDefault(),
|
|
420
|
+
e.preventDefault(), s(!0);
|
|
244
421
|
},
|
|
245
|
-
onDragLeave: () =>
|
|
246
|
-
onDrop: (
|
|
247
|
-
|
|
248
|
-
let
|
|
249
|
-
|
|
422
|
+
onDragLeave: () => s(!1),
|
|
423
|
+
onDrop: (n) => {
|
|
424
|
+
n.preventDefault(), s(!1);
|
|
425
|
+
let r = n.dataTransfer.getData("text/plain");
|
|
426
|
+
r && t(r, e.id);
|
|
250
427
|
},
|
|
428
|
+
children: r
|
|
429
|
+
});
|
|
430
|
+
}
|
|
431
|
+
function $({ cards: e, loading: t, onLoadMore: n }) {
|
|
432
|
+
let r = e.totalCount - e.items.length;
|
|
433
|
+
return r <= 0 || !e.pageInfo.hasNextPage ? null : /* @__PURE__ */ h("div", {
|
|
434
|
+
className: "px-2 pb-2 space-y-1",
|
|
435
|
+
children: [/* @__PURE__ */ h("p", {
|
|
436
|
+
className: "text-xs text-muted-foreground",
|
|
437
|
+
children: [
|
|
438
|
+
"Showing ",
|
|
439
|
+
e.items.length,
|
|
440
|
+
" of ",
|
|
441
|
+
e.totalCount
|
|
442
|
+
]
|
|
443
|
+
}), /* @__PURE__ */ m(w, {
|
|
444
|
+
size: "sm",
|
|
445
|
+
variant: "outline",
|
|
446
|
+
className: "w-full",
|
|
447
|
+
"data-testid": "board-column-more",
|
|
448
|
+
disabled: t,
|
|
449
|
+
onClick: n,
|
|
450
|
+
children: t ? "Loading…" : `Show ${Math.min(r, P)} more`
|
|
451
|
+
})]
|
|
452
|
+
});
|
|
453
|
+
}
|
|
454
|
+
function oe({ board: e, laneBy: t, cardsOf: r, now: i, busy: a, loadingMore: o, onLoadMore: s, onMove: c }) {
|
|
455
|
+
let l = e.columns.map((e) => ({
|
|
456
|
+
column: e,
|
|
457
|
+
cards: r(e)
|
|
458
|
+
})), u = [...new Set(l.flatMap(({ cards: e }) => e.items.map((e) => J(e, t))))].sort((e, n) => t === "priority" ? W.indexOf(e) - W.indexOf(n) : e === "" ? 1 : n === "" ? -1 : e.localeCompare(n)), d = (e) => t === "priority" ? N(e) : e ? /* @__PURE__ */ m(n, { id: e }) : "Unassigned";
|
|
459
|
+
return /* @__PURE__ */ h("div", {
|
|
460
|
+
className: "overflow-x-auto pb-2 space-y-3",
|
|
461
|
+
"data-testid": "board-swimlanes",
|
|
251
462
|
children: [
|
|
252
|
-
/* @__PURE__ */
|
|
253
|
-
className: "
|
|
254
|
-
children: [
|
|
255
|
-
|
|
256
|
-
|
|
463
|
+
/* @__PURE__ */ h("p", {
|
|
464
|
+
className: "text-xs text-muted-foreground",
|
|
465
|
+
children: [
|
|
466
|
+
"Dragging moves a card between columns. Its lane follows its",
|
|
467
|
+
" ",
|
|
468
|
+
t === "priority" ? "priority" : "assignee",
|
|
469
|
+
"."
|
|
470
|
+
]
|
|
471
|
+
}),
|
|
472
|
+
/* @__PURE__ */ m("div", {
|
|
473
|
+
className: "flex gap-3",
|
|
474
|
+
children: l.map(({ column: e, cards: t }) => /* @__PURE__ */ m("div", {
|
|
475
|
+
className: "min-w-[240px] w-[240px] shrink-0 px-2",
|
|
476
|
+
children: /* @__PURE__ */ h("h3", {
|
|
257
477
|
className: "text-sm font-medium truncate",
|
|
258
|
-
children: r.name
|
|
259
|
-
}), /* @__PURE__ */ p("span", {
|
|
260
|
-
"data-testid": `board-column-count-${r.name}`,
|
|
261
|
-
className: `text-xs rounded-full px-1.5 ${y ? "bg-status-warning-subtle text-status-warning" : "bg-muted"}`,
|
|
262
|
-
title: r.wipLimit ? `WIP limit ${r.wipLimit}` : void 0,
|
|
263
|
-
children: r.wipLimit ? `${v} / ${r.wipLimit}` : v
|
|
264
|
-
})]
|
|
265
|
-
}), /* @__PURE__ */ m("div", {
|
|
266
|
-
className: "flex items-center justify-between gap-1",
|
|
267
|
-
children: [/* @__PURE__ */ p("span", {
|
|
268
|
-
className: "text-[11px] text-muted-foreground",
|
|
269
|
-
children: r.mappedStatus ? `Sets status: ${P(r.mappedStatus)}` : "No status"
|
|
270
|
-
}), /* @__PURE__ */ m("span", {
|
|
271
|
-
className: "flex",
|
|
272
478
|
children: [
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
className: "
|
|
277
|
-
|
|
278
|
-
disabled: c,
|
|
279
|
-
onClick: () => f(-1),
|
|
280
|
-
children: /* @__PURE__ */ p(a, { className: "h-3.5 w-3.5" })
|
|
281
|
-
}),
|
|
282
|
-
/* @__PURE__ */ p(w, {
|
|
283
|
-
size: "icon",
|
|
284
|
-
variant: "ghost",
|
|
285
|
-
className: "h-6 w-6",
|
|
286
|
-
"aria-label": `Move ${r.name} column right`,
|
|
287
|
-
disabled: l,
|
|
288
|
-
onClick: () => f(1),
|
|
289
|
-
children: /* @__PURE__ */ p(o, { className: "h-3.5 w-3.5" })
|
|
290
|
-
}),
|
|
291
|
-
/* @__PURE__ */ p(Y, {
|
|
292
|
-
boardId: e,
|
|
293
|
-
column: r
|
|
479
|
+
e.name,
|
|
480
|
+
" ",
|
|
481
|
+
/* @__PURE__ */ m("span", {
|
|
482
|
+
className: "text-xs text-muted-foreground",
|
|
483
|
+
children: e.wipLimit ? `${t.totalCount} / ${e.wipLimit}` : t.totalCount
|
|
294
484
|
})
|
|
295
485
|
]
|
|
296
|
-
})
|
|
297
|
-
})
|
|
486
|
+
})
|
|
487
|
+
}, e.id))
|
|
298
488
|
}),
|
|
299
|
-
/* @__PURE__ */ m("
|
|
300
|
-
className: "
|
|
301
|
-
children:
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
489
|
+
u.length === 0 && /* @__PURE__ */ m("p", {
|
|
490
|
+
className: "text-sm text-muted-foreground p-4",
|
|
491
|
+
children: "No cards on this board yet."
|
|
492
|
+
}),
|
|
493
|
+
u.map((n) => /* @__PURE__ */ h("div", {
|
|
494
|
+
"data-testid": "board-lane",
|
|
495
|
+
className: "space-y-1",
|
|
496
|
+
children: [/* @__PURE__ */ h("p", {
|
|
497
|
+
className: "text-xs font-medium",
|
|
308
498
|
children: [
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
children:
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
}),
|
|
319
|
-
/* @__PURE__ */ m("div", {
|
|
320
|
-
className: "flex items-center justify-between gap-1 text-[11px] text-muted-foreground",
|
|
321
|
-
children: [/* @__PURE__ */ p("span", {
|
|
322
|
-
className: "truncate",
|
|
323
|
-
children: e.assigneeId ? /* @__PURE__ */ p(n, { id: e.assigneeId }) : "Unassigned"
|
|
324
|
-
}), /* @__PURE__ */ m("select", {
|
|
325
|
-
"aria-label": `Move ${e.key} to column`,
|
|
326
|
-
className: "rounded border border-input bg-background px-1 py-0.5 text-[11px]",
|
|
327
|
-
value: "",
|
|
328
|
-
disabled: u,
|
|
329
|
-
onChange: (t) => t.target.value && d(e.id, t.target.value),
|
|
330
|
-
children: [/* @__PURE__ */ p("option", {
|
|
331
|
-
value: "",
|
|
332
|
-
children: "Move…"
|
|
333
|
-
}), s.filter((e) => e.id !== r.id).map((e) => /* @__PURE__ */ p("option", {
|
|
334
|
-
value: e.id,
|
|
335
|
-
children: e.name
|
|
336
|
-
}, e.id))]
|
|
337
|
-
})]
|
|
499
|
+
d(n),
|
|
500
|
+
" ",
|
|
501
|
+
/* @__PURE__ */ h("span", {
|
|
502
|
+
className: "text-muted-foreground",
|
|
503
|
+
children: [
|
|
504
|
+
"(",
|
|
505
|
+
l.reduce((e, { cards: r }) => e + r.items.filter((e) => J(e, t) === n).length, 0),
|
|
506
|
+
")"
|
|
507
|
+
]
|
|
338
508
|
})
|
|
339
509
|
]
|
|
340
|
-
}
|
|
341
|
-
className: "
|
|
342
|
-
children:
|
|
510
|
+
}), /* @__PURE__ */ m("div", {
|
|
511
|
+
className: "flex gap-3",
|
|
512
|
+
children: l.map(({ column: r, cards: o }) => /* @__PURE__ */ m(Q, {
|
|
513
|
+
column: r,
|
|
514
|
+
onMove: c,
|
|
515
|
+
label: `${r.name} column`,
|
|
516
|
+
className: "min-w-[240px] w-[240px] shrink-0 rounded-md border bg-muted/30",
|
|
517
|
+
children: /* @__PURE__ */ m("ul", {
|
|
518
|
+
className: "p-2 space-y-2 min-h-[48px]",
|
|
519
|
+
children: o.items.filter((e) => J(e, t) === n).map((t) => /* @__PURE__ */ m(Z, {
|
|
520
|
+
card: t,
|
|
521
|
+
column: r,
|
|
522
|
+
columns: e.columns,
|
|
523
|
+
busy: a,
|
|
524
|
+
now: i,
|
|
525
|
+
onMove: c
|
|
526
|
+
}, t.id))
|
|
527
|
+
})
|
|
528
|
+
}, r.id))
|
|
343
529
|
})]
|
|
344
|
-
}),
|
|
345
|
-
|
|
346
|
-
className: "
|
|
347
|
-
children:
|
|
348
|
-
"
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
530
|
+
}, n || "none")),
|
|
531
|
+
/* @__PURE__ */ m("div", {
|
|
532
|
+
className: "flex gap-3",
|
|
533
|
+
children: l.map(({ column: e, cards: t }) => /* @__PURE__ */ m("div", {
|
|
534
|
+
className: "min-w-[240px] w-[240px] shrink-0",
|
|
535
|
+
children: /* @__PURE__ */ m($, {
|
|
536
|
+
cards: t,
|
|
537
|
+
loading: o === e.id,
|
|
538
|
+
onLoadMore: () => s(e)
|
|
539
|
+
})
|
|
540
|
+
}, e.id))
|
|
354
541
|
})
|
|
355
542
|
]
|
|
356
543
|
});
|
|
357
544
|
}
|
|
358
|
-
function
|
|
359
|
-
let
|
|
360
|
-
|
|
545
|
+
function se({ boardId: e, column: t, columns: n, cards: r, isFirst: i, isLast: s, busy: c, now: l, loadingMore: u, onLoadMore: d, onMove: f, onShift: p }) {
|
|
546
|
+
let g = r.totalCount, _ = t.wipLimit != null && t.wipLimit > 0 && g >= t.wipLimit;
|
|
547
|
+
return /* @__PURE__ */ m(Q, {
|
|
548
|
+
column: t,
|
|
549
|
+
onMove: f,
|
|
550
|
+
label: `${t.name} column`,
|
|
551
|
+
className: "min-w-[240px] w-[240px] shrink-0 rounded-md border bg-muted/30",
|
|
552
|
+
children: /* @__PURE__ */ h("div", {
|
|
553
|
+
"data-testid": `board-column-${t.name}`,
|
|
554
|
+
children: [
|
|
555
|
+
/* @__PURE__ */ h("header", {
|
|
556
|
+
className: "p-2 border-b space-y-1",
|
|
557
|
+
children: [/* @__PURE__ */ h("div", {
|
|
558
|
+
className: "flex items-center justify-between gap-1",
|
|
559
|
+
children: [/* @__PURE__ */ m("h3", {
|
|
560
|
+
className: "text-sm font-medium truncate",
|
|
561
|
+
children: t.name
|
|
562
|
+
}), /* @__PURE__ */ m("span", {
|
|
563
|
+
"data-testid": `board-column-count-${t.name}`,
|
|
564
|
+
className: `text-xs rounded-full px-1.5 ${_ ? "bg-status-warning-subtle text-status-warning" : "bg-muted"}`,
|
|
565
|
+
title: t.wipLimit ? `WIP limit ${t.wipLimit}` : void 0,
|
|
566
|
+
children: t.wipLimit ? `${g} / ${t.wipLimit}` : g
|
|
567
|
+
})]
|
|
568
|
+
}), /* @__PURE__ */ h("div", {
|
|
569
|
+
className: "flex items-center justify-between gap-1",
|
|
570
|
+
children: [/* @__PURE__ */ m("span", {
|
|
571
|
+
className: "text-[11px] text-muted-foreground",
|
|
572
|
+
children: t.mappedStatus ? `Sets status: ${N(t.mappedStatus)}` : "No status"
|
|
573
|
+
}), /* @__PURE__ */ h("span", {
|
|
574
|
+
className: "flex",
|
|
575
|
+
children: [
|
|
576
|
+
/* @__PURE__ */ m(w, {
|
|
577
|
+
size: "icon",
|
|
578
|
+
variant: "ghost",
|
|
579
|
+
className: "h-6 w-6",
|
|
580
|
+
"aria-label": `Move ${t.name} column left`,
|
|
581
|
+
disabled: i,
|
|
582
|
+
onClick: () => p(-1),
|
|
583
|
+
children: /* @__PURE__ */ m(a, { className: "h-3.5 w-3.5" })
|
|
584
|
+
}),
|
|
585
|
+
/* @__PURE__ */ m(w, {
|
|
586
|
+
size: "icon",
|
|
587
|
+
variant: "ghost",
|
|
588
|
+
className: "h-6 w-6",
|
|
589
|
+
"aria-label": `Move ${t.name} column right`,
|
|
590
|
+
disabled: s,
|
|
591
|
+
onClick: () => p(1),
|
|
592
|
+
children: /* @__PURE__ */ m(o, { className: "h-3.5 w-3.5" })
|
|
593
|
+
}),
|
|
594
|
+
/* @__PURE__ */ m(ce, {
|
|
595
|
+
boardId: e,
|
|
596
|
+
column: t
|
|
597
|
+
})
|
|
598
|
+
]
|
|
599
|
+
})]
|
|
600
|
+
})]
|
|
601
|
+
}),
|
|
602
|
+
/* @__PURE__ */ h("ul", {
|
|
603
|
+
className: "p-2 space-y-2 min-h-[80px]",
|
|
604
|
+
children: [r.items.map((e) => /* @__PURE__ */ m(Z, {
|
|
605
|
+
card: e,
|
|
606
|
+
column: t,
|
|
607
|
+
columns: n,
|
|
608
|
+
busy: c,
|
|
609
|
+
now: l,
|
|
610
|
+
onMove: f
|
|
611
|
+
}, e.id)), g === 0 && /* @__PURE__ */ m("li", {
|
|
612
|
+
className: "text-xs text-muted-foreground text-center py-4",
|
|
613
|
+
children: "Empty"
|
|
614
|
+
})]
|
|
615
|
+
}),
|
|
616
|
+
/* @__PURE__ */ m($, {
|
|
617
|
+
cards: r,
|
|
618
|
+
loading: u,
|
|
619
|
+
onLoadMore: d
|
|
620
|
+
})
|
|
621
|
+
]
|
|
622
|
+
})
|
|
623
|
+
});
|
|
624
|
+
}
|
|
625
|
+
function ce({ boardId: e, column: t }) {
|
|
626
|
+
let n = t !== void 0, [a, o] = i(!1), [s, u] = i(t?.name ?? ""), [d, p] = i(t?.mappedStatus ?? ""), [T, E] = i(t?.wipLimit ? String(t.wipLimit) : ""), [P, F] = i(null), I = {
|
|
627
|
+
refetchQueries: U,
|
|
361
628
|
awaitRefetchQueries: !0
|
|
362
|
-
}, [
|
|
363
|
-
u(t?.name ?? ""),
|
|
364
|
-
},
|
|
365
|
-
|
|
629
|
+
}, [ie, L] = f(z, I), [R, H] = f(B, I), [W, G] = f(V, I), K = L.loading || H.loading || G.loading, q = T.trim() === "" ? null : Number(T), J = q !== null && (!Number.isInteger(q) || q < 1), ae = s.trim() !== "" && !J && !K, Z = () => {
|
|
630
|
+
u(t?.name ?? ""), p(t?.mappedStatus ?? ""), E(t?.wipLimit ? String(t.wipLimit) : ""), F(null);
|
|
631
|
+
}, Q = async () => {
|
|
632
|
+
F(null);
|
|
366
633
|
let i = {
|
|
367
634
|
name: s.trim(),
|
|
368
|
-
mappedStatus:
|
|
369
|
-
wipLimit:
|
|
635
|
+
mappedStatus: d || null,
|
|
636
|
+
wipLimit: q
|
|
370
637
|
};
|
|
371
638
|
try {
|
|
372
|
-
n ? await r(
|
|
639
|
+
n ? await r(R({ variables: {
|
|
373
640
|
id: t.id,
|
|
374
641
|
input: i
|
|
375
|
-
} })) : await r(
|
|
642
|
+
} })) : await r(ie({ variables: { input: {
|
|
376
643
|
boardId: e,
|
|
377
644
|
type: "CUSTOM",
|
|
378
645
|
...i
|
|
379
646
|
} } })), o(!1);
|
|
380
647
|
} catch (e) {
|
|
381
|
-
|
|
648
|
+
F(Y(e, "The column could not be saved."));
|
|
382
649
|
}
|
|
383
650
|
}, $ = n ? `column-${t.id}` : "new-column";
|
|
384
|
-
return /* @__PURE__ */
|
|
651
|
+
return /* @__PURE__ */ h(te, {
|
|
385
652
|
open: a,
|
|
386
653
|
onOpenChange: (e) => {
|
|
387
|
-
o(e), e &&
|
|
654
|
+
o(e), e && Z();
|
|
388
655
|
},
|
|
389
|
-
children: [/* @__PURE__ */
|
|
656
|
+
children: [/* @__PURE__ */ m(j, {
|
|
390
657
|
asChild: !0,
|
|
391
|
-
children: n ? /* @__PURE__ */
|
|
658
|
+
children: n ? /* @__PURE__ */ m(w, {
|
|
392
659
|
size: "icon",
|
|
393
660
|
variant: "ghost",
|
|
394
661
|
className: "h-6 w-6",
|
|
395
662
|
"aria-label": `Edit ${t.name} column`,
|
|
396
|
-
children: /* @__PURE__ */
|
|
397
|
-
}) : /* @__PURE__ */
|
|
663
|
+
children: /* @__PURE__ */ m(c, { className: "h-3.5 w-3.5" })
|
|
664
|
+
}) : /* @__PURE__ */ h(w, {
|
|
398
665
|
size: "sm",
|
|
399
666
|
variant: "outline",
|
|
400
|
-
children: [/* @__PURE__ */
|
|
667
|
+
children: [/* @__PURE__ */ m(l, { className: "mr-1 h-4 w-4" }), "Add column"]
|
|
401
668
|
})
|
|
402
|
-
}), /* @__PURE__ */
|
|
669
|
+
}), /* @__PURE__ */ h(O, {
|
|
403
670
|
className: "max-w-md",
|
|
404
671
|
children: [
|
|
405
|
-
/* @__PURE__ */
|
|
406
|
-
/* @__PURE__ */
|
|
672
|
+
/* @__PURE__ */ h(re, { children: [/* @__PURE__ */ m(A, { children: n ? `Edit ${t.name}` : "Add column" }), /* @__PURE__ */ m(k, { children: "Moving a card into a column that sets a status changes the work item's status." })] }),
|
|
673
|
+
/* @__PURE__ */ h("div", {
|
|
407
674
|
className: "space-y-3",
|
|
408
675
|
children: [
|
|
409
|
-
/* @__PURE__ */
|
|
676
|
+
/* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
|
|
410
677
|
htmlFor: `${$}-name`,
|
|
411
678
|
className: "text-sm font-medium",
|
|
412
679
|
children: "Name"
|
|
413
|
-
}), /* @__PURE__ */
|
|
680
|
+
}), /* @__PURE__ */ m(D, {
|
|
414
681
|
id: `${$}-name`,
|
|
415
682
|
className: "mt-1",
|
|
416
683
|
value: s,
|
|
417
684
|
onChange: (e) => u(e.target.value)
|
|
418
685
|
})] }),
|
|
419
|
-
/* @__PURE__ */
|
|
686
|
+
/* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
|
|
420
687
|
htmlFor: `${$}-status`,
|
|
421
688
|
className: "text-sm font-medium",
|
|
422
689
|
children: "Sets status"
|
|
423
|
-
}), /* @__PURE__ */
|
|
690
|
+
}), /* @__PURE__ */ h("select", {
|
|
424
691
|
id: `${$}-status`,
|
|
425
692
|
className: "mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm",
|
|
426
|
-
value:
|
|
427
|
-
onChange: (e) =>
|
|
428
|
-
children: [/* @__PURE__ */
|
|
693
|
+
value: d,
|
|
694
|
+
onChange: (e) => p(e.target.value),
|
|
695
|
+
children: [/* @__PURE__ */ m("option", {
|
|
429
696
|
value: "",
|
|
430
697
|
children: "No status (cards keep theirs)"
|
|
431
|
-
}),
|
|
698
|
+
}), M.map((e) => /* @__PURE__ */ m("option", {
|
|
432
699
|
value: e,
|
|
433
|
-
children:
|
|
700
|
+
children: N(e)
|
|
434
701
|
}, e))]
|
|
435
702
|
})] }),
|
|
436
|
-
/* @__PURE__ */
|
|
437
|
-
/* @__PURE__ */
|
|
703
|
+
/* @__PURE__ */ h("div", { children: [
|
|
704
|
+
/* @__PURE__ */ m("label", {
|
|
438
705
|
htmlFor: `${$}-wip`,
|
|
439
706
|
className: "text-sm font-medium",
|
|
440
707
|
children: "WIP limit (blank for none)"
|
|
441
708
|
}),
|
|
442
|
-
/* @__PURE__ */
|
|
709
|
+
/* @__PURE__ */ m(D, {
|
|
443
710
|
id: `${$}-wip`,
|
|
444
711
|
type: "number",
|
|
445
712
|
min: 1,
|
|
446
713
|
className: "mt-1",
|
|
447
|
-
value:
|
|
448
|
-
onChange: (e) =>
|
|
714
|
+
value: T,
|
|
715
|
+
onChange: (e) => E(e.target.value)
|
|
449
716
|
}),
|
|
450
|
-
|
|
717
|
+
J && /* @__PURE__ */ m(X, { message: "The WIP limit must be a whole number, 1 or more." })
|
|
451
718
|
] })
|
|
452
719
|
]
|
|
453
720
|
}),
|
|
454
|
-
|
|
455
|
-
/* @__PURE__ */
|
|
721
|
+
P && /* @__PURE__ */ m(X, { message: P }),
|
|
722
|
+
/* @__PURE__ */ h(ne, {
|
|
456
723
|
className: "gap-2",
|
|
457
|
-
children: [n && /* @__PURE__ */
|
|
724
|
+
children: [n && /* @__PURE__ */ h(g, { children: [/* @__PURE__ */ m(C, {
|
|
458
725
|
asChild: !0,
|
|
459
|
-
children: /* @__PURE__ */
|
|
726
|
+
children: /* @__PURE__ */ m(w, {
|
|
460
727
|
variant: "outline",
|
|
461
|
-
disabled:
|
|
728
|
+
disabled: K,
|
|
462
729
|
children: "Delete column"
|
|
463
730
|
})
|
|
464
|
-
}), /* @__PURE__ */
|
|
731
|
+
}), /* @__PURE__ */ h(y, { children: [/* @__PURE__ */ h(ee, { children: [/* @__PURE__ */ h(S, { children: [
|
|
465
732
|
"Delete ",
|
|
466
733
|
t.name,
|
|
467
734
|
"?"
|
|
468
|
-
] }), /* @__PURE__ */
|
|
735
|
+
] }), /* @__PURE__ */ m(b, { children: "Its cards are not deleted: each goes back to the column for its status, or off the board if no column sets that status." })] }), /* @__PURE__ */ h(x, { children: [/* @__PURE__ */ m(v, { children: "Keep it" }), /* @__PURE__ */ m(_, {
|
|
469
736
|
className: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
470
737
|
onClick: async () => {
|
|
471
738
|
try {
|
|
472
|
-
await r(
|
|
739
|
+
await r(W({ variables: { id: t.id } })), o(!1);
|
|
473
740
|
} catch (e) {
|
|
474
|
-
|
|
741
|
+
F(Y(e, "The column could not be deleted."));
|
|
475
742
|
}
|
|
476
743
|
},
|
|
477
744
|
children: "Delete column"
|
|
478
|
-
})] })] })] }), /* @__PURE__ */
|
|
479
|
-
onClick:
|
|
480
|
-
disabled: !
|
|
745
|
+
})] })] })] }), /* @__PURE__ */ m(w, {
|
|
746
|
+
onClick: Q,
|
|
747
|
+
disabled: !ae,
|
|
481
748
|
"data-testid": `${$}-save`,
|
|
482
|
-
children:
|
|
749
|
+
children: K ? "Saving…" : n ? "Save" : "Add column"
|
|
483
750
|
})]
|
|
484
751
|
})
|
|
485
752
|
]
|
|
@@ -487,6 +754,6 @@ function Y({ boardId: e, column: t }) {
|
|
|
487
754
|
});
|
|
488
755
|
}
|
|
489
756
|
//#endregion
|
|
490
|
-
export {
|
|
757
|
+
export { ae as ProjectBoard };
|
|
491
758
|
|
|
492
759
|
//# sourceMappingURL=ProjectBoard.js.map
|