@industry-theme/backlogmd-kanban-panel 1.0.44 → 1.1.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/mocks/panelContext.d.ts +7 -17
- package/dist/mocks/panelContext.d.ts.map +1 -1
- package/dist/panels/KanbanPanel.d.ts.map +1 -1
- package/dist/panels/TaskDetailPanel.d.ts.map +1 -1
- package/dist/panels/kanban/hooks/useKanbanData.d.ts +2 -2
- package/dist/panels/kanban/hooks/useKanbanData.d.ts.map +1 -1
- package/dist/panels/milestone/hooks/useMilestoneData.d.ts +2 -2
- package/dist/panels/milestone/hooks/useMilestoneData.d.ts.map +1 -1
- package/dist/panels.bundle.js +130 -129
- package/dist/panels.bundle.js.map +1 -1
- package/dist/types/index.d.ts +27 -2
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,19 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { PanelComponentProps, PanelContextValue,
|
|
3
|
-
/**
|
|
4
|
-
* Create a mock file system adapter for Storybook
|
|
5
|
-
* Stores files in memory and logs operations
|
|
6
|
-
*/
|
|
7
|
-
export declare const createMockFileSystemAdapter: () => {
|
|
8
|
-
exists: (path: string) => Promise<boolean>;
|
|
9
|
-
readFile: (path: string) => Promise<string>;
|
|
10
|
-
writeFile: (path: string, content: string) => Promise<void>;
|
|
11
|
-
deleteFile: (path: string) => Promise<void>;
|
|
12
|
-
createDir: (path: string) => Promise<void>;
|
|
13
|
-
readDir: (path: string) => Promise<string[]>;
|
|
14
|
-
isDirectory: (path: string) => Promise<boolean>;
|
|
15
|
-
_files: Map<string, string>;
|
|
16
|
-
};
|
|
2
|
+
import type { PanelComponentProps, PanelContextValue, KanbanPanelActions, PanelEventEmitter, DataSlice } from '../types';
|
|
17
3
|
/**
|
|
18
4
|
* Options for creating mock context
|
|
19
5
|
*/
|
|
@@ -29,8 +15,12 @@ interface MockContextOptions {
|
|
|
29
15
|
export declare const createMockContext: (options?: MockContextOptions | Partial<PanelContextValue>) => PanelContextValue;
|
|
30
16
|
/**
|
|
31
17
|
* Mock Panel Actions for Storybook
|
|
18
|
+
*
|
|
19
|
+
* Actions are the primary interface for panel-initiated operations:
|
|
20
|
+
* - File operations (read, write, delete, createDir)
|
|
21
|
+
* - Host commands (openFile, openGitDiff, navigateToPanel)
|
|
32
22
|
*/
|
|
33
|
-
export declare const createMockActions: (overrides?: Partial<
|
|
23
|
+
export declare const createMockActions: (overrides?: Partial<KanbanPanelActions>) => KanbanPanelActions;
|
|
34
24
|
/**
|
|
35
25
|
* Mock Event Emitter for Storybook
|
|
36
26
|
*/
|
|
@@ -42,7 +32,7 @@ export declare const createMockEvents: () => PanelEventEmitter;
|
|
|
42
32
|
export declare const MockPanelProvider: React.FC<{
|
|
43
33
|
children: (props: PanelComponentProps) => React.ReactNode;
|
|
44
34
|
contextOverrides?: Partial<PanelContextValue>;
|
|
45
|
-
actionsOverrides?: Partial<
|
|
35
|
+
actionsOverrides?: Partial<KanbanPanelActions>;
|
|
46
36
|
}>;
|
|
47
37
|
export {};
|
|
48
38
|
//# sourceMappingURL=panelContext.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"panelContext.d.ts","sourceRoot":"","sources":["../../src/mocks/panelContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EACV,mBAAmB,EACnB,iBAAiB,EACjB,
|
|
1
|
+
{"version":3,"file":"panelContext.d.ts","sourceRoot":"","sources":["../../src/mocks/panelContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EACV,mBAAmB,EACnB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EAGjB,SAAS,EACV,MAAM,UAAU,CAAC;AA+BlB;;GAEG;AACH,UAAU,kBAAkB;IAC1B,sCAAsC;IACtC,SAAS,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,CAAC;IACvC,wCAAwC;IACxC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;CACpC;AAED;;GAEG;AACH,eAAO,MAAM,iBAAiB,GAC5B,UAAU,kBAAkB,GAAG,OAAO,CAAC,iBAAiB,CAAC,KACxD,iBAsHF,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,GAC5B,YAAY,OAAO,CAAC,kBAAkB,CAAC,KACtC,kBAkDF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,QAAO,iBAwCnC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC;IACvC,QAAQ,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,KAAK,CAAC,SAAS,CAAC;IAC1D,gBAAgB,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAC9C,gBAAgB,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC,CAAC;CAChD,CAMA,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KanbanPanel.d.ts","sourceRoot":"","sources":["../../src/panels/KanbanPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6E,MAAM,OAAO,CAAC;AAelG,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAiBtD;;;;;;;GAOG;AACH,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,
|
|
1
|
+
{"version":3,"file":"KanbanPanel.d.ts","sourceRoot":"","sources":["../../src/panels/KanbanPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6E,MAAM,OAAO,CAAC;AAelG,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAiBtD;;;;;;;GAOG;AACH,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAi4CvD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TaskDetailPanel.d.ts","sourceRoot":"","sources":["../../src/panels/TaskDetailPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAMxE,OAAO,KAAK,EAAE,yBAAyB,EAAqB,MAAM,UAAU,CAAC;AAsG7E;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAqB,SAAQ,yBAAyB;IACrE,MAAM,CAAC,EAAE,qBAAqB,CAAC;CAChC;
|
|
1
|
+
{"version":3,"file":"TaskDetailPanel.d.ts","sourceRoot":"","sources":["../../src/panels/TaskDetailPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAMxE,OAAO,KAAK,EAAE,yBAAyB,EAAqB,MAAM,UAAU,CAAC;AAsG7E;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAqB,SAAQ,yBAAyB;IACrE,MAAM,CAAC,EAAE,qBAAqB,CAAC;CAChC;AAiDD;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAgvB1D,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Core, type Task, DEFAULT_TASK_STATUSES } from '@backlog-md/core';
|
|
2
|
-
import type { KanbanPanelContext,
|
|
2
|
+
import type { KanbanPanelContext, KanbanPanelActions, PanelEventEmitter } from '../../../types';
|
|
3
3
|
import type { PanelContextValue } from '@principal-ade/panel-framework-core';
|
|
4
4
|
/** Per-column pagination state */
|
|
5
5
|
export interface ColumnState {
|
|
@@ -57,7 +57,7 @@ export interface UseKanbanDataResult {
|
|
|
57
57
|
}
|
|
58
58
|
interface UseKanbanDataOptions {
|
|
59
59
|
context?: PanelContextValue<KanbanPanelContext>;
|
|
60
|
-
actions?:
|
|
60
|
+
actions?: KanbanPanelActions;
|
|
61
61
|
/** Number of tasks to load per page (default: 20) */
|
|
62
62
|
tasksLimit?: number;
|
|
63
63
|
/** Event emitter for panel events */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useKanbanData.d.ts","sourceRoot":"","sources":["../../../../src/panels/kanban/hooks/useKanbanData.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,KAAK,IAAI,EAAwB,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAEhG,OAAO,KAAK,EAAE,kBAAkB,EAAE,
|
|
1
|
+
{"version":3,"file":"useKanbanData.d.ts","sourceRoot":"","sources":["../../../../src/panels/kanban/hooks/useKanbanData.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,KAAK,IAAI,EAAwB,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAEhG,OAAO,KAAK,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAChG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAG7E,kCAAkC;AAClC,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;IACjB,aAAa,EAAE,OAAO,CAAC;CACxB;AAED;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,OAAO,qBAAqB,CAAC,MAAM,OAAO,qBAAqB,CAAC,CAAC;AAE5F,gDAAgD;AAChD,eAAO,MAAM,cAAc,EAAE,YAAY,EAIxC,CAAC;AAEF,4DAA4D;AAC5D,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf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OAAO,CAAC,EAAE,iBAAiB,CAAC,kBAAkB,CAAC,CAAC;IAChD,OAAO,CAAC,EAAE,kBAAkB,CAAC;IAC7B,qDAAqD;IACrD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,qCAAqC;IACrC,MAAM,CAAC,EAAE,iBAAiB,CAAC;CAC5B;AAID;;;;;GAKG;AACH,wBAAgB,aAAa,CAC3B,OAAO,CAAC,EAAE,oBAAoB,GAC7B,mBAAmB,CA2gBrB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Core, type Milestone, type Task } from '@backlog-md/core';
|
|
2
|
-
import type { KanbanPanelContext,
|
|
2
|
+
import type { KanbanPanelContext, KanbanPanelActions } from '../../../types';
|
|
3
3
|
import type { PanelContextValue } from '@principal-ade/panel-framework-core';
|
|
4
4
|
/** State for a single milestone with its tasks */
|
|
5
5
|
export interface MilestoneState {
|
|
@@ -28,7 +28,7 @@ export interface UseMilestoneDataResult {
|
|
|
28
28
|
}
|
|
29
29
|
interface UseMilestoneDataOptions {
|
|
30
30
|
context?: PanelContextValue<KanbanPanelContext>;
|
|
31
|
-
actions?:
|
|
31
|
+
actions?: KanbanPanelActions;
|
|
32
32
|
}
|
|
33
33
|
/**
|
|
34
34
|
* Hook for managing milestone data with lazy task loading
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMilestoneData.d.ts","sourceRoot":"","sources":["../../../../src/panels/milestone/hooks/useMilestoneData.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,KAAK,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAEnE,OAAO,KAAK,EAAE,kBAAkB,EAAE,
|
|
1
|
+
{"version":3,"file":"useMilestoneData.d.ts","sourceRoot":"","sources":["../../../../src/panels/milestone/hooks/useMilestoneData.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,KAAK,IAAI,EAAE,MAAM,kBAAkB,C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ef.current = actions;
|
|
8734
8734
|
}, [context2, actions]);
|
|
8735
8735
|
const fetchFileContent = useCallback(async (path2) => {
|
|
8736
|
-
var _a;
|
|
8737
|
-
const currentContext = contextRef.current;
|
|
8738
8736
|
const currentActions = actionsRef.current;
|
|
8739
|
-
if (!currentActions
|
|
8740
|
-
throw new Error("
|
|
8737
|
+
if (!(currentActions == null ? void 0 : currentActions.readFile)) {
|
|
8738
|
+
throw new Error("actions.readFile not available");
|
|
8741
8739
|
}
|
|
8742
8740
|
if (activeFilePathRef.current === path2) {
|
|
8743
8741
|
await new Promise((resolve) => setTimeout(resolve, 100));
|
|
8744
8742
|
}
|
|
8745
8743
|
activeFilePathRef.current = path2;
|
|
8746
8744
|
try {
|
|
8747
|
-
|
|
8748
|
-
return await currentContext.adapters.readFile(path2);
|
|
8749
|
-
}
|
|
8750
|
-
throw new Error("No file reading capability available (adapters.readFile not configured)");
|
|
8745
|
+
return await currentActions.readFile(path2);
|
|
8751
8746
|
} finally {
|
|
8752
8747
|
activeFilePathRef.current = null;
|
|
8753
8748
|
}
|
|
@@ -8812,12 +8807,15 @@ function useKanbanData(options) {
|
|
|
8812
8807
|
const files = fileTreeSlice.data.allFiles;
|
|
8813
8808
|
const filePaths = files.map((f) => f.path);
|
|
8814
8809
|
return withSpan(span, async () => {
|
|
8815
|
-
var _a2;
|
|
8816
8810
|
try {
|
|
8817
8811
|
const fs = new PanelFileSystemAdapter({
|
|
8818
8812
|
fetchFile: fetchFileContent,
|
|
8819
8813
|
filePaths,
|
|
8820
|
-
hostFileSystem:
|
|
8814
|
+
hostFileSystem: {
|
|
8815
|
+
writeFile: actions.writeFile,
|
|
8816
|
+
createDir: actions.createDir,
|
|
8817
|
+
deleteFile: actions.deleteFile
|
|
8818
|
+
}
|
|
8821
8819
|
});
|
|
8822
8820
|
const core2 = new Core({
|
|
8823
8821
|
projectRoot: "",
|
|
@@ -10549,28 +10547,23 @@ function useMilestoneData(options) {
|
|
|
10549
10547
|
actionsRef.current = actions;
|
|
10550
10548
|
}, [context2, actions]);
|
|
10551
10549
|
const fetchFileContent = useCallback(async (path2) => {
|
|
10552
|
-
var _a;
|
|
10553
|
-
const currentContext = contextRef.current;
|
|
10554
10550
|
const currentActions = actionsRef.current;
|
|
10555
|
-
if (!currentActions
|
|
10556
|
-
throw new Error("
|
|
10551
|
+
if (!(currentActions == null ? void 0 : currentActions.readFile)) {
|
|
10552
|
+
throw new Error("actions.readFile not available");
|
|
10557
10553
|
}
|
|
10558
10554
|
if (activeFilePathRef.current === path2) {
|
|
10559
10555
|
await new Promise((resolve) => setTimeout(resolve, 100));
|
|
10560
10556
|
}
|
|
10561
10557
|
activeFilePathRef.current = path2;
|
|
10562
10558
|
try {
|
|
10563
|
-
|
|
10564
|
-
return await currentContext.adapters.readFile(path2);
|
|
10565
|
-
}
|
|
10566
|
-
throw new Error("No file reading capability available (adapters.readFile not configured)");
|
|
10559
|
+
return await currentActions.readFile(path2);
|
|
10567
10560
|
} finally {
|
|
10568
10561
|
activeFilePathRef.current = null;
|
|
10569
10562
|
}
|
|
10570
10563
|
}, []);
|
|
10571
10564
|
const fileTreeVersionRef = useRef(null);
|
|
10572
10565
|
const loadMilestoneData = useCallback(async () => {
|
|
10573
|
-
var _a, _b
|
|
10566
|
+
var _a, _b;
|
|
10574
10567
|
if (!context2 || !actions) {
|
|
10575
10568
|
console.log("[useMilestoneData] No context provided");
|
|
10576
10569
|
setIsBacklogProject(false);
|
|
@@ -10608,7 +10601,11 @@ function useMilestoneData(options) {
|
|
|
10608
10601
|
const fs = new PanelFileSystemAdapter({
|
|
10609
10602
|
fetchFile: fetchFileContent,
|
|
10610
10603
|
filePaths,
|
|
10611
|
-
hostFileSystem:
|
|
10604
|
+
hostFileSystem: {
|
|
10605
|
+
writeFile: actions.writeFile,
|
|
10606
|
+
createDir: actions.createDir,
|
|
10607
|
+
deleteFile: actions.deleteFile
|
|
10608
|
+
}
|
|
10612
10609
|
});
|
|
10613
10610
|
const core2 = new Core({
|
|
10614
10611
|
projectRoot: "",
|
|
@@ -11069,7 +11066,7 @@ const KanbanPanel = ({
|
|
|
11069
11066
|
actions,
|
|
11070
11067
|
events: events2
|
|
11071
11068
|
}) => {
|
|
11072
|
-
var _a
|
|
11069
|
+
var _a;
|
|
11073
11070
|
const { theme: theme2 } = useTheme();
|
|
11074
11071
|
const [selectedTaskId, setSelectedTaskId] = useState(null);
|
|
11075
11072
|
const [selectedTab, setSelectedTab] = useState(DEFAULT_TASK_STATUSES.TODO);
|
|
@@ -11187,10 +11184,10 @@ const KanbanPanel = ({
|
|
|
11187
11184
|
const filtered = /* @__PURE__ */ new Map();
|
|
11188
11185
|
for (const [status, state] of tasksByStatus) {
|
|
11189
11186
|
const filteredTasks = state.tasks.filter((task) => {
|
|
11190
|
-
var _a2,
|
|
11187
|
+
var _a2, _b, _c, _d;
|
|
11191
11188
|
if (task.title.toLowerCase().includes(query)) return true;
|
|
11192
11189
|
if ((_a2 = task.description) == null ? void 0 : _a2.toLowerCase().includes(query)) return true;
|
|
11193
|
-
if ((
|
|
11190
|
+
if ((_b = task.labels) == null ? void 0 : _b.some((label) => label.toLowerCase().includes(query))) return true;
|
|
11194
11191
|
if ((_c = task.assignee) == null ? void 0 : _c.some((a) => a.toLowerCase().includes(query))) return true;
|
|
11195
11192
|
if ((_d = task.milestone) == null ? void 0 : _d.toLowerCase().includes(query)) return true;
|
|
11196
11193
|
return false;
|
|
@@ -11286,14 +11283,13 @@ const KanbanPanel = ({
|
|
|
11286
11283
|
});
|
|
11287
11284
|
}
|
|
11288
11285
|
};
|
|
11289
|
-
const fileSystem = (_a = context2.adapters) == null ? void 0 : _a.fileSystem;
|
|
11290
11286
|
const canInitialize = Boolean(
|
|
11291
|
-
|
|
11287
|
+
actions.writeFile && actions.createDir && ((_a = context2.currentScope.repository) == null ? void 0 : _a.path)
|
|
11292
11288
|
);
|
|
11293
11289
|
const handleInitialize = useCallback(async () => {
|
|
11294
|
-
var _a2,
|
|
11295
|
-
if (!
|
|
11296
|
-
throw new Error("File
|
|
11290
|
+
var _a2, _b;
|
|
11291
|
+
if (!actions.writeFile || !actions.createDir) {
|
|
11292
|
+
throw new Error("File operations not available on actions");
|
|
11297
11293
|
}
|
|
11298
11294
|
const repoPath = (_a2 = context2.currentScope.repository) == null ? void 0 : _a2.path;
|
|
11299
11295
|
if (!repoPath) {
|
|
@@ -11305,22 +11301,29 @@ const KanbanPanel = ({
|
|
|
11305
11301
|
const fsAdapter = {
|
|
11306
11302
|
// Used by initProject
|
|
11307
11303
|
exists: async (path2) => {
|
|
11304
|
+
var _a3;
|
|
11305
|
+
if (actions.exists) {
|
|
11306
|
+
return actions.exists(path2);
|
|
11307
|
+
}
|
|
11308
11308
|
try {
|
|
11309
|
-
await
|
|
11309
|
+
await ((_a3 = actions.readFile) == null ? void 0 : _a3.call(actions, path2));
|
|
11310
11310
|
return true;
|
|
11311
11311
|
} catch {
|
|
11312
11312
|
return false;
|
|
11313
11313
|
}
|
|
11314
11314
|
},
|
|
11315
11315
|
writeFile: async (path2, content2) => {
|
|
11316
|
-
await
|
|
11316
|
+
await actions.writeFile(path2, content2);
|
|
11317
11317
|
},
|
|
11318
11318
|
createDir: async (path2, _options) => {
|
|
11319
|
-
await
|
|
11319
|
+
await actions.createDir(path2);
|
|
11320
11320
|
},
|
|
11321
11321
|
join: (...paths) => paths.join("/").replace(/\/+/g, "/"),
|
|
11322
11322
|
// Not used by initProject - stubs
|
|
11323
|
-
readFile: async (path2) =>
|
|
11323
|
+
readFile: async (path2) => {
|
|
11324
|
+
var _a3;
|
|
11325
|
+
return ((_a3 = actions.readFile) == null ? void 0 : _a3.call(actions, path2)) ?? Promise.reject(new Error("readFile not available"));
|
|
11326
|
+
},
|
|
11324
11327
|
deleteFile: async () => notImplemented(),
|
|
11325
11328
|
readDir: async () => [],
|
|
11326
11329
|
isDirectory: async () => false,
|
|
@@ -11342,10 +11345,10 @@ const KanbanPanel = ({
|
|
|
11342
11345
|
projectRoot: repoPath,
|
|
11343
11346
|
adapters: { fs: fsAdapter }
|
|
11344
11347
|
});
|
|
11345
|
-
const projectName = ((
|
|
11348
|
+
const projectName = ((_b = context2.currentScope.repository) == null ? void 0 : _b.name) || "Backlog";
|
|
11346
11349
|
await core22.initProject({ projectName });
|
|
11347
11350
|
await refreshData();
|
|
11348
|
-
}, [
|
|
11351
|
+
}, [actions, context2.currentScope.repository, refreshData]);
|
|
11349
11352
|
const taskSaveCompletedRef = useRef(false);
|
|
11350
11353
|
const taskModalSpanRef = useRef(null);
|
|
11351
11354
|
const handleOpenNewTask = useCallback(() => {
|
|
@@ -12059,8 +12062,8 @@ const KanbanPanel = ({
|
|
|
12059
12062
|
const totalTasks = milestoneState.milestone.tasks.length;
|
|
12060
12063
|
const doneTasks = milestoneState.tasks.filter(
|
|
12061
12064
|
(t) => {
|
|
12062
|
-
var _a2,
|
|
12063
|
-
return ((_a2 = t.status) == null ? void 0 : _a2.toLowerCase().includes("done")) || ((
|
|
12065
|
+
var _a2, _b;
|
|
12066
|
+
return ((_a2 = t.status) == null ? void 0 : _a2.toLowerCase().includes("done")) || ((_b = t.status) == null ? void 0 : _b.toLowerCase().includes("complete"));
|
|
12064
12067
|
}
|
|
12065
12068
|
).length;
|
|
12066
12069
|
const progress = totalTasks > 0 ? Math.round(doneTasks / totalTasks * 100) : 0;
|
|
@@ -12197,14 +12200,14 @@ const KanbanPanel = ({
|
|
|
12197
12200
|
const inProgressCount = tasks.filter((t) => t.status === "In Progress").length;
|
|
12198
12201
|
const doneCount = tasks.filter(
|
|
12199
12202
|
(t) => {
|
|
12200
|
-
var _a2,
|
|
12201
|
-
return ((_a2 = t.status) == null ? void 0 : _a2.toLowerCase().includes("done")) || ((
|
|
12203
|
+
var _a2, _b;
|
|
12204
|
+
return ((_a2 = t.status) == null ? void 0 : _a2.toLowerCase().includes("done")) || ((_b = t.status) == null ? void 0 : _b.toLowerCase().includes("complete"));
|
|
12202
12205
|
}
|
|
12203
12206
|
).length;
|
|
12204
12207
|
const filteredTasks = milestoneStatusFilter ? tasks.filter((t) => {
|
|
12205
|
-
var _a2,
|
|
12208
|
+
var _a2, _b;
|
|
12206
12209
|
if (milestoneStatusFilter === "Done") {
|
|
12207
|
-
return ((_a2 = t.status) == null ? void 0 : _a2.toLowerCase().includes("done")) || ((
|
|
12210
|
+
return ((_a2 = t.status) == null ? void 0 : _a2.toLowerCase().includes("done")) || ((_b = t.status) == null ? void 0 : _b.toLowerCase().includes("complete"));
|
|
12208
12211
|
}
|
|
12209
12212
|
return t.status === milestoneStatusFilter;
|
|
12210
12213
|
}) : tasks;
|
|
@@ -56436,6 +56439,7 @@ const getPriorityStyles = (theme2, priority) => {
|
|
|
56436
56439
|
const baseStyles2 = {
|
|
56437
56440
|
padding: "2px 8px",
|
|
56438
56441
|
borderRadius: theme2.radii[1],
|
|
56442
|
+
fontFamily: theme2.fonts.body,
|
|
56439
56443
|
fontSize: theme2.fontSizes[0],
|
|
56440
56444
|
fontWeight: theme2.fontWeights.medium
|
|
56441
56445
|
};
|
|
@@ -56458,7 +56462,8 @@ const StatusBadge = ({ status }) => {
|
|
|
56458
56462
|
style: {
|
|
56459
56463
|
padding: "4px 12px",
|
|
56460
56464
|
borderRadius: theme2.radii[2],
|
|
56461
|
-
|
|
56465
|
+
fontFamily: theme2.fonts.body,
|
|
56466
|
+
fontSize: theme2.fontSizes[0],
|
|
56462
56467
|
fontWeight: theme2.fontWeights.medium,
|
|
56463
56468
|
background: `${theme2.colors.primary}20`,
|
|
56464
56469
|
color: theme2.colors.primary,
|
|
@@ -56706,43 +56711,96 @@ const TaskDetailPanel = ({ context: context2, events: events2, config }) => {
|
|
|
56706
56711
|
style: {
|
|
56707
56712
|
fontFamily: theme2.fonts.monospace,
|
|
56708
56713
|
fontSize: theme2.fontSizes[0],
|
|
56714
|
+
fontWeight: theme2.fontWeights.medium,
|
|
56709
56715
|
color: theme2.colors.textMuted
|
|
56710
56716
|
},
|
|
56711
56717
|
children: selectedTask.id
|
|
56712
56718
|
}
|
|
56713
56719
|
),
|
|
56714
|
-
selectedTask.priority && /* @__PURE__ */
|
|
56720
|
+
selectedTask.priority && /* @__PURE__ */ jsxs("span", { style: getPriorityStyles(theme2, selectedTask.priority), children: [
|
|
56721
|
+
"Priority: ",
|
|
56722
|
+
selectedTask.priority
|
|
56723
|
+
] }),
|
|
56715
56724
|
/* @__PURE__ */ jsx(StatusBadge, { status: selectedTask.status })
|
|
56716
56725
|
] }),
|
|
56717
|
-
/* @__PURE__ */
|
|
56718
|
-
"
|
|
56719
|
-
|
|
56720
|
-
|
|
56721
|
-
|
|
56722
|
-
|
|
56723
|
-
|
|
56724
|
-
|
|
56725
|
-
|
|
56726
|
-
|
|
56727
|
-
|
|
56728
|
-
|
|
56729
|
-
|
|
56730
|
-
|
|
56731
|
-
|
|
56732
|
-
|
|
56733
|
-
|
|
56734
|
-
|
|
56735
|
-
e
|
|
56736
|
-
|
|
56737
|
-
|
|
56738
|
-
|
|
56739
|
-
e
|
|
56740
|
-
|
|
56741
|
-
|
|
56742
|
-
|
|
56743
|
-
|
|
56744
|
-
|
|
56745
|
-
|
|
56726
|
+
/* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
|
|
56727
|
+
deleteState.status === "idle" && /* @__PURE__ */ jsx(
|
|
56728
|
+
"button",
|
|
56729
|
+
{
|
|
56730
|
+
onClick: () => setIsDeleteModalOpen(true),
|
|
56731
|
+
style: {
|
|
56732
|
+
display: "flex",
|
|
56733
|
+
alignItems: "center",
|
|
56734
|
+
justifyContent: "center",
|
|
56735
|
+
width: "32px",
|
|
56736
|
+
height: "32px",
|
|
56737
|
+
border: `1px solid ${theme2.colors.error}`,
|
|
56738
|
+
borderRadius: theme2.radii[1],
|
|
56739
|
+
background: "transparent",
|
|
56740
|
+
cursor: "pointer",
|
|
56741
|
+
color: theme2.colors.error,
|
|
56742
|
+
transition: "all 0.2s ease"
|
|
56743
|
+
},
|
|
56744
|
+
onMouseEnter: (e) => {
|
|
56745
|
+
e.currentTarget.style.background = theme2.colors.error;
|
|
56746
|
+
e.currentTarget.style.color = theme2.colors.background;
|
|
56747
|
+
},
|
|
56748
|
+
onMouseLeave: (e) => {
|
|
56749
|
+
e.currentTarget.style.background = "transparent";
|
|
56750
|
+
e.currentTarget.style.color = theme2.colors.error;
|
|
56751
|
+
},
|
|
56752
|
+
title: "Delete task",
|
|
56753
|
+
children: /* @__PURE__ */ jsx(Trash2, { size: 16 })
|
|
56754
|
+
}
|
|
56755
|
+
),
|
|
56756
|
+
deleteState.status === "success" && /* @__PURE__ */ jsx(
|
|
56757
|
+
"div",
|
|
56758
|
+
{
|
|
56759
|
+
style: {
|
|
56760
|
+
display: "flex",
|
|
56761
|
+
alignItems: "center",
|
|
56762
|
+
justifyContent: "center",
|
|
56763
|
+
width: "32px",
|
|
56764
|
+
height: "32px",
|
|
56765
|
+
border: `1px solid ${theme2.colors.success}`,
|
|
56766
|
+
borderRadius: theme2.radii[1],
|
|
56767
|
+
background: `${theme2.colors.success}15`,
|
|
56768
|
+
color: theme2.colors.success
|
|
56769
|
+
},
|
|
56770
|
+
title: "Task deleted",
|
|
56771
|
+
children: /* @__PURE__ */ jsx(CircleCheckBig, { size: 16 })
|
|
56772
|
+
}
|
|
56773
|
+
),
|
|
56774
|
+
/* @__PURE__ */ jsx(
|
|
56775
|
+
"button",
|
|
56776
|
+
{
|
|
56777
|
+
onClick: handleBack,
|
|
56778
|
+
style: {
|
|
56779
|
+
display: "flex",
|
|
56780
|
+
alignItems: "center",
|
|
56781
|
+
justifyContent: "center",
|
|
56782
|
+
width: "32px",
|
|
56783
|
+
height: "32px",
|
|
56784
|
+
border: `1px solid ${theme2.colors.border}`,
|
|
56785
|
+
borderRadius: theme2.radii[1],
|
|
56786
|
+
background: theme2.colors.surface,
|
|
56787
|
+
cursor: "pointer",
|
|
56788
|
+
color: theme2.colors.textSecondary,
|
|
56789
|
+
transition: "all 0.2s ease"
|
|
56790
|
+
},
|
|
56791
|
+
onMouseEnter: (e) => {
|
|
56792
|
+
e.currentTarget.style.background = theme2.colors.backgroundSecondary;
|
|
56793
|
+
e.currentTarget.style.color = theme2.colors.text;
|
|
56794
|
+
},
|
|
56795
|
+
onMouseLeave: (e) => {
|
|
56796
|
+
e.currentTarget.style.background = theme2.colors.surface;
|
|
56797
|
+
e.currentTarget.style.color = theme2.colors.textSecondary;
|
|
56798
|
+
},
|
|
56799
|
+
title: "Close",
|
|
56800
|
+
children: /* @__PURE__ */ jsx(X, { size: 16 })
|
|
56801
|
+
}
|
|
56802
|
+
)
|
|
56803
|
+
] })
|
|
56746
56804
|
]
|
|
56747
56805
|
}
|
|
56748
56806
|
),
|
|
@@ -56910,64 +56968,6 @@ const TaskDetailPanel = ({ context: context2, events: events2, config }) => {
|
|
|
56910
56968
|
)
|
|
56911
56969
|
]
|
|
56912
56970
|
}
|
|
56913
|
-
),
|
|
56914
|
-
deleteState.status === "idle" && /* @__PURE__ */ jsxs(
|
|
56915
|
-
"button",
|
|
56916
|
-
{
|
|
56917
|
-
onClick: () => setIsDeleteModalOpen(true),
|
|
56918
|
-
style: {
|
|
56919
|
-
flex: 1,
|
|
56920
|
-
display: "flex",
|
|
56921
|
-
alignItems: "center",
|
|
56922
|
-
justifyContent: "center",
|
|
56923
|
-
gap: "6px",
|
|
56924
|
-
padding: "6px 12px",
|
|
56925
|
-
border: `1px solid ${theme2.colors.error}`,
|
|
56926
|
-
borderRadius: theme2.radii[1],
|
|
56927
|
-
background: "transparent",
|
|
56928
|
-
cursor: "pointer",
|
|
56929
|
-
color: theme2.colors.error,
|
|
56930
|
-
fontSize: theme2.fontSizes[1],
|
|
56931
|
-
fontWeight: theme2.fontWeights.medium,
|
|
56932
|
-
transition: "all 0.2s ease"
|
|
56933
|
-
},
|
|
56934
|
-
onMouseEnter: (e) => {
|
|
56935
|
-
e.currentTarget.style.background = theme2.colors.error;
|
|
56936
|
-
e.currentTarget.style.color = theme2.colors.background;
|
|
56937
|
-
},
|
|
56938
|
-
onMouseLeave: (e) => {
|
|
56939
|
-
e.currentTarget.style.background = "transparent";
|
|
56940
|
-
e.currentTarget.style.color = theme2.colors.error;
|
|
56941
|
-
},
|
|
56942
|
-
title: "Delete task",
|
|
56943
|
-
children: [
|
|
56944
|
-
/* @__PURE__ */ jsx(Trash2, { size: 14 }),
|
|
56945
|
-
"Delete"
|
|
56946
|
-
]
|
|
56947
|
-
}
|
|
56948
|
-
),
|
|
56949
|
-
deleteState.status === "success" && /* @__PURE__ */ jsxs(
|
|
56950
|
-
"div",
|
|
56951
|
-
{
|
|
56952
|
-
style: {
|
|
56953
|
-
flex: 1,
|
|
56954
|
-
display: "flex",
|
|
56955
|
-
alignItems: "center",
|
|
56956
|
-
justifyContent: "center",
|
|
56957
|
-
gap: "6px",
|
|
56958
|
-
padding: "6px 12px",
|
|
56959
|
-
border: `1px solid ${theme2.colors.success}`,
|
|
56960
|
-
borderRadius: theme2.radii[1],
|
|
56961
|
-
background: `${theme2.colors.success}15`,
|
|
56962
|
-
color: theme2.colors.success,
|
|
56963
|
-
fontSize: theme2.fontSizes[1],
|
|
56964
|
-
fontWeight: theme2.fontWeights.medium
|
|
56965
|
-
},
|
|
56966
|
-
children: [
|
|
56967
|
-
/* @__PURE__ */ jsx(CircleCheckBig, { size: 14 }),
|
|
56968
|
-
"Task deleted"
|
|
56969
|
-
]
|
|
56970
|
-
}
|
|
56971
56971
|
)
|
|
56972
56972
|
] }),
|
|
56973
56973
|
/* @__PURE__ */ jsx("style", { children: `
|
|
@@ -56980,6 +56980,7 @@ const TaskDetailPanel = ({ context: context2, events: events2, config }) => {
|
|
|
56980
56980
|
{
|
|
56981
56981
|
style: {
|
|
56982
56982
|
margin: "0 0 16px 0",
|
|
56983
|
+
fontFamily: theme2.fonts.body,
|
|
56983
56984
|
fontSize: theme2.fontSizes[5],
|
|
56984
56985
|
fontWeight: theme2.fontWeights.bold,
|
|
56985
56986
|
color: theme2.colors.text,
|