@allbluecn/web-app 0.19.4 → 0.20.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/LICENSE +661 -0
- package/package.json +35 -37
- package/public/fonts/Trap-font/Trap-Black.otf +0 -0
- package/public/fonts/Trap-font/Trap-Bold.otf +0 -0
- package/public/fonts/Trap-font/Trap-ExtraBold.otf +0 -0
- package/public/fonts/Trap-font/Trap-Light.otf +0 -0
- package/public/fonts/Trap-font/Trap-Medium.otf +0 -0
- package/public/fonts/Trap-font/Trap-Regular.otf +0 -0
- package/public/fonts/Trap-font/Trap-SemiBold.otf +0 -0
- package/public/fonts/buttersans-Rounded.otf +0 -0
- package/src/components/bug/__tests__/board-subgroups.test.tsx +1 -1
- package/src/components/bug/__tests__/board-view.test.tsx +1 -1
- package/src/components/bug/__tests__/comment-reactions.test.tsx +1 -1
- package/src/components/bug/__tests__/create-bug-dialog.test.tsx +2 -2
- package/src/components/bug/__tests__/filters-compat.test.tsx +1 -1
- package/src/components/bug/__tests__/fix-request-race.test.tsx +1 -1
- package/src/components/bug/__tests__/peek-modes.test.tsx +1 -1
- package/src/components/bug/__tests__/use-paged-bug-groups.test.tsx +1 -1
- package/src/components/bug/__tests__/view-type.test.tsx +1 -1
- package/src/components/bug/bug-list-view.tsx +2 -2
- package/src/components/bug/bug-toolbar.tsx +1 -1
- package/src/components/bug/create-bug-dialog.tsx +3 -3
- package/src/components/bug/detail/__tests__/activity-timeline.test.tsx +1 -1
- package/src/components/bug/detail/__tests__/bug-detail-collab.test.tsx +1 -1
- package/src/components/bug/detail/__tests__/repro-report-card.test.tsx +1 -1
- package/src/components/bug/detail/activity-tabs.tsx +1 -1
- package/src/components/bug/detail/activity-timeline.tsx +1 -1
- package/src/components/bug/detail/bug-detail-body.tsx +3 -3
- package/src/components/bug/detail/comment-input.tsx +1 -1
- package/src/components/bug/detail/comment-item.tsx +1 -1
- package/src/components/bug/detail/comment-reactions.tsx +1 -1
- package/src/components/bug/detail/comment-thread.tsx +1 -1
- package/src/components/bug/detail/props-section.tsx +2 -2
- package/src/components/bug/detail/repro-report-card.tsx +1 -1
- package/src/components/bug/detail/reproduce-steps-view.tsx +1 -1
- package/src/components/bug/display/use-paged-bug-groups.ts +2 -2
- package/src/components/bug/filters/field-configs.tsx +1 -1
- package/src/components/bug/inline-editors/assignee-editor.tsx +1 -1
- package/src/components/bug/peek-panel.tsx +2 -2
- package/src/components/bug/reproduce-steps-editor.tsx +1 -1
- package/src/components/bug/story-bugs-panel.tsx +2 -1
- package/src/components/bug/views/board-view.tsx +2 -2
- package/src/components/bug/views/bug-list/batch-toolbar.tsx +1 -1
- package/src/components/bug/views/bug-list/group.tsx +1 -1
- package/src/components/bug/views/bug-list/index.tsx +1 -1
- package/src/components/bug/views/bug-list/inline-bug-creator.tsx +1 -1
- package/src/components/bug/views/bug-list/row.tsx +2 -2
- package/src/components/bug/views/create-view-dialog.tsx +1 -1
- package/src/components/iteration/iteration-progress-bar.tsx +2 -2
- package/src/components/knowledge/public/legal-compliance-editor.tsx +1 -1
- package/src/components/layout/sidebar-03/nav-knowledge.tsx +1 -1
- package/src/components/layout/sidebar-03/nav-workspace.tsx +1 -1
- package/src/components/shared-kit/list-kit/kanban/__tests__/instance-key.test.ts +1 -1
- package/src/components/story/__tests__/constants.test.ts +1 -1
- package/src/components/story/__tests__/dependency-type-badge.test.ts +1 -1
- package/src/components/story/__tests__/peek-panel-patch-sync.test.tsx +1 -1
- package/src/components/story/__tests__/story-list-view-peek-sync.test.tsx +1 -1
- package/src/components/story/ai/story-ai-panel.tsx +1 -1
- package/src/components/story/ai/story-ai-preview-list.tsx +2 -2
- package/src/components/story/columns.tsx +2 -2
- package/src/components/story/create-story-dialog.tsx +4 -4
- package/src/components/story/detail/__tests__/activity-timeline.test.tsx +1 -1
- package/src/components/story/detail/__tests__/associated-attachments-panel.test.tsx +1 -1
- package/src/components/story/detail/__tests__/story-collab.test.tsx +1 -1
- package/src/components/story/detail/activity-tabs.tsx +1 -1
- package/src/components/story/detail/activity-timeline.tsx +2 -2
- package/src/components/story/detail/comment-input.tsx +1 -1
- package/src/components/story/detail/comment-item.tsx +1 -1
- package/src/components/story/detail/comment-thread.tsx +1 -1
- package/src/components/story/detail/reaction-bar.tsx +1 -1
- package/src/components/story/detail/story-detail-body.tsx +4 -4
- package/src/components/story/detail/story-detail-toolbar/associated-attachments-panel.tsx +2 -2
- package/src/components/story/detail/story-detail-toolbar/children.tsx +1 -1
- package/src/components/story/detail/story-detail-toolbar/dependency-panel.tsx +3 -3
- package/src/components/story/detail/story-detail-toolbar/index.tsx +8 -8
- package/src/components/story/detail/story-detail-toolbar/related-test-cases.tsx +2 -2
- package/src/components/story/detail/story-properties.tsx +2 -2
- package/src/components/story/display/__tests__/flatten-story-groups.test.ts +1 -1
- package/src/components/story/display/__tests__/group-fields.test.ts +1 -1
- package/src/components/story/display/__tests__/group-resolver.test.ts +2 -2
- package/src/components/story/display/__tests__/order-resolver.test.ts +1 -1
- package/src/components/story/display/__tests__/use-grouped-stories.test.ts +1 -1
- package/src/components/story/display/__tests__/use-paged-story-groups.test.ts +1 -1
- package/src/components/story/display/flatten-story-groups.ts +1 -1
- package/src/components/story/display/group-fields.ts +2 -2
- package/src/components/story/display/group-resolver.tsx +2 -2
- package/src/components/story/display/order-resolver.ts +2 -2
- package/src/components/story/display/types.ts +1 -1
- package/src/components/story/display/use-grouped-stories.ts +1 -1
- package/src/components/story/display/use-paged-story-groups.ts +2 -2
- package/src/components/story/entity-overlay.ts +24 -0
- package/src/components/story/filters/field-configs.tsx +2 -2
- package/src/components/story/inline-editors/assignee-editor.tsx +1 -1
- package/src/components/story/inline-editors/dependency-type-select.tsx +1 -1
- package/src/components/story/inline-editors/parent-story-editor.tsx +2 -2
- package/src/components/story/inline-editors/priority-editor.tsx +2 -2
- package/src/components/story/inline-editors/state-editor.tsx +2 -2
- package/src/components/story/inline-editors/story-select-dialog.tsx +2 -2
- package/src/components/story/peek-panel.tsx +3 -3
- package/src/components/story/priority-icon.tsx +2 -2
- package/src/components/story/relations/__tests__/attachment-manage-dialog.test.tsx +1 -1
- package/src/components/story/relations/__tests__/design-select-dialog.test.tsx +1 -1
- package/src/components/story/relations/__tests__/knowledge-select-dialog.test.tsx +1 -1
- package/src/components/story/relations/__tests__/link-manage-dialog.test.tsx +1 -1
- package/src/components/story/relations/attachment-manage-dialog.tsx +4 -4
- package/src/components/story/relations/design-select-dialog.tsx +2 -2
- package/src/components/story/relations/knowledge-select-dialog.tsx +2 -2
- package/src/components/story/relations/link-manage-dialog.tsx +2 -2
- package/src/components/story/relations/story-ref-row.tsx +3 -3
- package/src/components/story/story-list-table.tsx +1 -1
- package/src/components/story/story-list-view.tsx +1 -1
- package/src/components/story/story-toolbar.tsx +1 -1
- package/src/components/story/views/__tests__/calendar-view.test.tsx +1 -1
- package/src/components/story/views/__tests__/kanban-drop-subgroup.test.ts +1 -1
- package/src/components/story/views/__tests__/kanban-peek-sync.test.tsx +2 -2
- package/src/components/story/views/__tests__/kanban-view-membership-sync.test.tsx +1 -1
- package/src/components/story/views/__tests__/timeline-view.test.tsx +1 -1
- package/src/components/story/views/calendar/__tests__/mappers.test.ts +1 -1
- package/src/components/story/views/calendar/mappers.ts +1 -1
- package/src/components/story/views/calendar-view.tsx +1 -1
- package/src/components/story/views/create-view-dialog.tsx +1 -1
- package/src/components/story/views/kanban-view.tsx +2 -2
- package/src/components/story/views/story-list/batch-preview-dialog.tsx +2 -2
- package/src/components/story/views/story-list/batch-toolbar.tsx +2 -2
- package/src/components/story/views/story-list/group.tsx +2 -2
- package/src/components/story/views/story-list/index.tsx +2 -2
- package/src/components/story/views/story-list/inline-story-creator.tsx +2 -2
- package/src/components/story/views/story-list/row.tsx +2 -2
- package/src/components/story/views/story-list/use-flat-rows.ts +1 -1
- package/src/components/story/views/timeline/__tests__/mappers.test.ts +2 -2
- package/src/components/story/views/timeline/mappers.ts +2 -2
- package/src/components/story/views/timeline/use-date-commit.ts +1 -1
- package/src/components/story/views/timeline-view.tsx +2 -2
- package/src/components/testcase/__tests__/case-row.test.tsx +1 -1
- package/src/components/testcase/__tests__/create-dialog-scope.test.tsx +1 -1
- package/src/components/testcase/__tests__/display-options.test.tsx +1 -1
- package/src/components/testcase/__tests__/export-entry.test.tsx +1 -1
- package/src/components/testcase/__tests__/list-view.test.tsx +1 -1
- package/src/components/testcase/__tests__/step-editor.test.tsx +1 -1
- package/src/components/testcase/__tests__/toolbar.test.tsx +1 -1
- package/src/components/testcase/create-testcase-dialog.tsx +1 -1
- package/src/components/testcase/detail/case-detail-body.tsx +1 -1
- package/src/components/testcase/detail/properties.tsx +1 -1
- package/src/components/testcase/display/display-dropdown.tsx +2 -2
- package/src/components/testcase/display/use-testcase-display-options.ts +1 -1
- package/src/components/testcase/filters/field-configs.tsx +1 -1
- package/src/components/testcase/inline-editors/assignee-editor.tsx +1 -1
- package/src/components/testcase/list/case-row.tsx +1 -1
- package/src/components/testcase/list/grouped-list.tsx +1 -1
- package/src/components/testcase/list-view.tsx +2 -2
- package/src/components/testcase/runs/convert-bug-button.tsx +2 -2
- package/src/components/testcase/testcase-toolbar.tsx +2 -2
- package/src/components/testcase/views/batch-toolbar.tsx +1 -1
- package/src/components/testcase/views/board-view.tsx +2 -2
- package/src/lib/changelog/sdk-versions.ts +2 -2
- package/src/lib/collections/knowledge/knowledge-bases-collection.ts +2 -1
- package/src/lib/collections/query-keys.ts +18 -0
- package/src/lib/collections/reference/users-brief-collection.ts +2 -1
- package/src/lib/collections/reference/workspaces-collection.ts +2 -1
- package/src/lib/story/__tests__/activity-grouper.test.ts +1 -1
- package/src/lib/story/activity-grouper.ts +1 -1
- package/src/paraglide/.gitignore +3 -0
- package/src/paraglide/.prettierignore +3 -0
- package/src/paraglide/README.md +162 -0
- package/src/paraglide/messages/_index.js +88192 -0
- package/src/paraglide/messages/en.js +28230 -0
- package/src/paraglide/messages/zh.js +28228 -0
- package/src/paraglide/messages.js +4 -0
- package/src/paraglide/registry.js +46 -0
- package/src/paraglide/runtime.js +2311 -0
- package/src/paraglide/server.js +294 -0
- package/src/routes/_nav/bugs/$bugId/route.lazy.tsx +2 -2
- package/src/routes/_nav/projects/$projectId/iterations/$iterationId/route.lazy.tsx +1 -1
- package/src/routes/_nav/route.tsx +1 -2
- package/src/routes/_nav/stories/$storyId/route.lazy.tsx +2 -2
- package/src/routes/_nav/stories/$storyId/route.tsx +1 -1
- package/src/routes/api/design/prototype/__tests__/route.test.ts +4 -1
- package/src/server/__tests__/task-executor.test.ts +7 -0
- package/src/server/serverFns/__tests__/legal-code-canonical.test.ts +169 -0
- package/src/server/serverFns/__tests__/story-tree.test.ts +0 -1
- package/src/server/serverFns/__tests__/update-bug-guard.test.ts +1 -1
- package/src/server/serverFns/bug/__tests__/bug-comments.test.ts +1 -1
- package/src/server/serverFns/bug/__tests__/bug-groups.test.ts +1 -1
- package/src/server/serverFns/bug/bug-activities.ts +2 -2
- package/src/server/serverFns/bug/bug-comments.ts +3 -3
- package/src/server/serverFns/bug/bug-crud/detail-select.ts +1 -1
- package/src/server/serverFns/bug/bug-crud/detail.ts +2 -2
- package/src/server/serverFns/bug/bug-crud.ts +1 -1
- package/src/server/serverFns/bug/bug-group-query.ts +1 -1
- package/src/server/serverFns/bug/bug-groups.ts +2 -2
- package/src/server/serverFns/bug/bug-story-utils.ts +1 -1
- package/src/server/serverFns/iteration/iteration-crud.ts +1 -1
- package/src/server/serverFns/knowledge/public/legal/create.ts +3 -0
- package/src/server/serverFns/knowledge/public/legal/update.ts +8 -8
- package/src/server/serverFns/story/link-preview.ts +3 -2
- package/src/server/serverFns/story/story-children.ts +1 -1
- package/src/server/serverFns/story/story-comments.ts +1 -1
- package/src/server/serverFns/story/story-crud/bulk.ts +1 -1
- package/src/server/serverFns/story/story-crud.ts +1 -1
- package/src/server/serverFns/story/story-dependencies.ts +1 -1
- package/src/server/serverFns/story/story-groups.ts +1 -1
- package/src/server/serverFns/testcase/__tests__/testcase-groups.test.ts +1 -1
- package/src/server/serverFns/testcase/testcase-board.ts +1 -1
- package/src/server/serverFns/testcase/testcase-crud.ts +1 -1
- package/src/server/serverFns/testcase/testcase-display-options.ts +1 -1
- package/src/server/serverFns/testcase/testcase-filter-views.ts +1 -1
- package/src/server/serverFns/testcase/types.ts +1 -1
- package/src/server/story/types.ts +2 -2
- package/src/shared/bug/__tests__/constants.test.ts +1 -1
- package/src/{components → shared}/bug/types.ts +4 -3
- package/src/{components → shared}/story/constants.ts +1 -1
- package/src/{components → shared}/story/types.ts +1 -7
- /package/src/{components/testcase/display → shared/testcase}/field-configs.ts +0 -0
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
import { useState } from "react";
|
|
19
19
|
import { Check } from "lucide-react";
|
|
20
20
|
import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover";
|
|
21
|
-
import { STORY_STATES, STATE_LABEL, STATE_COLOR, STATE_ICON } from "
|
|
22
|
-
import type { StoryState } from "
|
|
21
|
+
import { STORY_STATES, STATE_LABEL, STATE_COLOR, STATE_ICON } from "@/shared/story/constants";
|
|
22
|
+
import type { StoryState } from "@/shared/story/constants";
|
|
23
23
|
import { cn } from "@/lib/utils";
|
|
24
24
|
import { InlineTrigger } from "./inline-trigger";
|
|
25
25
|
import { m } from "@/paraglide/messages.js";
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
DialogTitle,
|
|
38
38
|
} from "@/components/ui/dialog";
|
|
39
39
|
import { toast } from "@/components/ui/toast";
|
|
40
|
-
import type { ActivityItem } from "
|
|
40
|
+
import type { ActivityItem } from "@/shared/story/types";
|
|
41
41
|
import {
|
|
42
42
|
listProjectStoriesFn,
|
|
43
43
|
transferStoryAsChildFn,
|
|
@@ -51,7 +51,7 @@ import {
|
|
|
51
51
|
STORY_PRIORITIES,
|
|
52
52
|
type StoryState,
|
|
53
53
|
type DependencyTypeOption,
|
|
54
|
-
} from "
|
|
54
|
+
} from "@/shared/story/constants";
|
|
55
55
|
import { FilterCheckPopover } from "../filters/filter-check-popover";
|
|
56
56
|
import { PriorityIcon } from "../priority-icon";
|
|
57
57
|
import { DependencyTypeSelect } from "./dependency-type-select";
|
|
@@ -35,13 +35,13 @@ import {
|
|
|
35
35
|
getLinkedDocsFn,
|
|
36
36
|
} from "@/server/serverFns/story";
|
|
37
37
|
import { listIterationsFn } from "@/server/serverFns/iteration";
|
|
38
|
-
import type { StoryDetail, UserBrief, CommentWithReplies, ActivityItem, RelationsData } from "
|
|
38
|
+
import type { StoryDetail, UserBrief, CommentWithReplies, ActivityItem, RelationsData } from "@/shared/story/types";
|
|
39
39
|
import { applyStoryPatchToItem, type StoryPatch } from "./display/group-fields";
|
|
40
|
-
import type { StoryState } from "
|
|
40
|
+
import type { StoryState } from "@/shared/story/constants";
|
|
41
41
|
import { StoryDetailBody } from "./detail/story-detail-body";
|
|
42
42
|
import { TestCasePeekPanel } from "@/components/testcase/peek-panel";
|
|
43
43
|
import { BugPeekPanel } from "@/components/bug/peek-panel";
|
|
44
|
-
import type { StoryEntityOverlay } from "./
|
|
44
|
+
import type { StoryEntityOverlay } from "./entity-overlay";
|
|
45
45
|
import { StoryPanelHeader } from "./story-panel-header";
|
|
46
46
|
import type { PeekRelationKind, PeekBreadcrumbItem } from "./story-panel-header";
|
|
47
47
|
import type { PeekMode } from "@/components/shared-kit/peek/peek-mode";
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
17
17
|
|
|
18
18
|
import { cn } from "@/lib/utils";
|
|
19
|
-
import { PRIORITY_ICON } from "
|
|
20
|
-
import type { StoryPriority } from "
|
|
19
|
+
import { PRIORITY_ICON } from "@/shared/story/constants";
|
|
20
|
+
import type { StoryPriority } from "@/shared/story/constants";
|
|
21
21
|
|
|
22
22
|
export const PRIORITY_COLOR: Record<StoryPriority, string> = {
|
|
23
23
|
urgent: "text-red-600 dark:text-red-400",
|
|
@@ -46,7 +46,7 @@ function uploadResponse(body: Record<string, unknown>) {
|
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
import { AttachmentManageDialog } from "../attachment-manage-dialog";
|
|
49
|
-
import type { StoryAttachmentItem } from "
|
|
49
|
+
import type { StoryAttachmentItem } from "@/shared/story/types";
|
|
50
50
|
|
|
51
51
|
const ATTS: StoryAttachmentItem[] = [
|
|
52
52
|
{ id: "a1", fileName: "设计稿.png", fileSize: 2048, mimeType: "image/png", storageUrl: "/mock-storage/1" },
|
|
@@ -41,7 +41,7 @@ vi.mock("@/components/ui/toast", () => ({
|
|
|
41
41
|
;
|
|
42
42
|
|
|
43
43
|
import { DesignSelectDialog } from "../design-select-dialog";
|
|
44
|
-
import type { DesignBrief } from "
|
|
44
|
+
import type { DesignBrief } from "@/shared/story/types";
|
|
45
45
|
|
|
46
46
|
const design = (id: string, title: string, icon = "file"): DesignBrief => ({ id, title, icon });
|
|
47
47
|
|
|
@@ -43,7 +43,7 @@ vi.mock("@/components/ui/toast", () => ({
|
|
|
43
43
|
;
|
|
44
44
|
|
|
45
45
|
import { KnowledgeSelectDialog } from "../knowledge-select-dialog";
|
|
46
|
-
import type { DocBrief } from "
|
|
46
|
+
import type { DocBrief } from "@/shared/story/types";
|
|
47
47
|
|
|
48
48
|
const doc = (id: string, title: string, parentId: string | null = null): DocBrief => ({
|
|
49
49
|
id,
|
|
@@ -41,7 +41,7 @@ vi.mock("@/components/ui/toast", () => ({
|
|
|
41
41
|
;
|
|
42
42
|
|
|
43
43
|
import { LinkManageDialog } from "../link-manage-dialog";
|
|
44
|
-
import type { StoryLinkItem } from "
|
|
44
|
+
import type { StoryLinkItem } from "@/shared/story/types";
|
|
45
45
|
|
|
46
46
|
const LINKS: StoryLinkItem[] = [
|
|
47
47
|
{ id: "l1", url: "https://a.com", title: "站点A", description: null },
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
import { Textarea } from "@/components/ui/textarea";
|
|
29
29
|
import { getFileTypeIcon } from "./format";
|
|
30
30
|
import { FilePreview } from "./file-preview";
|
|
31
|
-
import type { StoryAttachmentItem } from "
|
|
31
|
+
import type { StoryAttachmentItem } from "@/shared/story/types";
|
|
32
32
|
import { m } from "@/paraglide/messages.js";
|
|
33
33
|
import { toastError } from "@/lib/toast-error";
|
|
34
34
|
|
|
@@ -49,7 +49,7 @@ export interface AttachmentManageDialogProps {
|
|
|
49
49
|
data: StoryAttachmentItem[];
|
|
50
50
|
onUpdate: (attachments: StoryAttachmentItem[]) => void;
|
|
51
51
|
/** 上传附件产生的活动,供时间线即时追加 */
|
|
52
|
-
onActivity?: (activity: import("
|
|
52
|
+
onActivity?: (activity: import("@/shared/story/types").ActivityItem) => void;
|
|
53
53
|
/** 编辑模式:预填充现有附件,隐藏继续上传按钮和上传区 */
|
|
54
54
|
editItem?: StoryAttachmentItem | null;
|
|
55
55
|
}
|
|
@@ -242,7 +242,7 @@ export function AttachmentManageDialog({
|
|
|
242
242
|
if (staged.length === 0 || uploading) return;
|
|
243
243
|
setUploading(true);
|
|
244
244
|
const desc = description.trim();
|
|
245
|
-
const added: Array<StoryAttachmentItem & { activity?: import("
|
|
245
|
+
const added: Array<StoryAttachmentItem & { activity?: import("@/shared/story/types").ActivityItem }> = [];
|
|
246
246
|
for (const item of staged) {
|
|
247
247
|
// 跳过重复文件
|
|
248
248
|
if (duplicateIndexes.has(staged.indexOf(item))) continue;
|
|
@@ -263,7 +263,7 @@ export function AttachmentManageDialog({
|
|
|
263
263
|
}
|
|
264
264
|
const json = await res.json() as Record<string, unknown>;
|
|
265
265
|
if ((json.duplicated as boolean | undefined) === true) continue;
|
|
266
|
-
added.push(json as unknown as StoryAttachmentItem & { activity?: import("
|
|
266
|
+
added.push(json as unknown as StoryAttachmentItem & { activity?: import("@/shared/story/types").ActivityItem });
|
|
267
267
|
} catch (err) {
|
|
268
268
|
toastError(err, m.story_attachmentDialog_removeFailed());
|
|
269
269
|
}
|
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
} from "@/server/serverFns/story";
|
|
42
42
|
import { LucideIconByName } from "@/components/shared-kit/icons/lucide-icon-picker/lucide-icon-by-name";
|
|
43
43
|
import { useLinkedSelection } from "./use-linked-selection";
|
|
44
|
-
import type { DesignBrief } from "
|
|
44
|
+
import type { DesignBrief } from "@/shared/story/types";
|
|
45
45
|
import { m } from "@/paraglide/messages.js";
|
|
46
46
|
import { toastError } from "@/lib/toast-error";
|
|
47
47
|
|
|
@@ -56,7 +56,7 @@ export interface DesignSelectDialogProps {
|
|
|
56
56
|
linkedDesigns: DesignBrief[];
|
|
57
57
|
onUpdate: (designs: DesignBrief[]) => void;
|
|
58
58
|
/** 关联/解联产生的活动,供时间线即时追加 */
|
|
59
|
-
onActivity?: (activity: import("
|
|
59
|
+
onActivity?: (activity: import("@/shared/story/types").ActivityItem) => void;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
function dialogTitle(mode: DesignSelectMode): string {
|
|
@@ -41,7 +41,7 @@ import { GENERAL_GROUPS, type GeneralGroup } from "@/server/serverFns/story/kb-g
|
|
|
41
41
|
import { generalGroupLabel } from "./general-groups";
|
|
42
42
|
import { useLinkedSelection } from "./use-linked-selection";
|
|
43
43
|
import { KbFilterPopover, type KbFilter } from "@/components/knowledge/kb-filter-popover";
|
|
44
|
-
import type { DocBrief } from "
|
|
44
|
+
import type { DocBrief } from "@/shared/story/types";
|
|
45
45
|
import { m } from "@/paraglide/messages.js";
|
|
46
46
|
import { toastError } from "@/lib/toast-error";
|
|
47
47
|
|
|
@@ -65,7 +65,7 @@ export interface KnowledgeSelectDialogProps {
|
|
|
65
65
|
linkedDocs: DocBrief[];
|
|
66
66
|
onUpdate: (docs: DocBrief[]) => void;
|
|
67
67
|
/** 关联知识库文档产生的活动,供时间线即时追加 */
|
|
68
|
-
onActivity?: (activity: import("
|
|
68
|
+
onActivity?: (activity: import("@/shared/story/types").ActivityItem) => void;
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
export function KnowledgeSelectDialog({
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
DialogTitle,
|
|
29
29
|
} from "@/components/ui/dialog";
|
|
30
30
|
import { addLinkFn, updateLinkFn } from "@/server/serverFns/story";
|
|
31
|
-
import type { StoryLinkItem } from "
|
|
31
|
+
import type { StoryLinkItem } from "@/shared/story/types";
|
|
32
32
|
import { m } from "@/paraglide/messages.js";
|
|
33
33
|
import { toastError } from "@/lib/toast-error";
|
|
34
34
|
|
|
@@ -39,7 +39,7 @@ export interface LinkManageDialogProps {
|
|
|
39
39
|
data: StoryLinkItem[];
|
|
40
40
|
onUpdate: (links: StoryLinkItem[]) => void;
|
|
41
41
|
/** 添加链接产生的活动,供时间线即时追加 */
|
|
42
|
-
onActivity?: (activity: import("
|
|
42
|
+
onActivity?: (activity: import("@/shared/story/types").ActivityItem) => void;
|
|
43
43
|
/** 非空时进入编辑态(由合并面板「编辑」触发) */
|
|
44
44
|
initialEdit?: StoryLinkItem | null;
|
|
45
45
|
}
|
|
@@ -39,7 +39,7 @@ import { PriorityEditor, StateEditor, AssigneeEditor, DateEditor, LabelsEditor,
|
|
|
39
39
|
import { NameConfirmDialog } from "@/components/shared-kit/dialogs/name-confirm-dialog";
|
|
40
40
|
import { cn } from "@/lib/utils";
|
|
41
41
|
import { LucideIconByName } from "@/components/shared-kit/icons/lucide-icon-picker/lucide-icon-by-name";
|
|
42
|
-
import { dependencyTypeOption } from "
|
|
42
|
+
import { dependencyTypeOption } from "@/shared/story/constants";
|
|
43
43
|
import type { DisplayProperty } from "../display/types";
|
|
44
44
|
import type { StoryPatch } from "../display/group-fields";
|
|
45
45
|
import type {
|
|
@@ -47,8 +47,8 @@ import type {
|
|
|
47
47
|
UserBrief,
|
|
48
48
|
DependencyEdgeType,
|
|
49
49
|
DependencyGroup,
|
|
50
|
-
} from "
|
|
51
|
-
import type { DependencyTypeOption } from "
|
|
50
|
+
} from "@/shared/story/types";
|
|
51
|
+
import type { DependencyTypeOption } from "@/shared/story/constants";
|
|
52
52
|
import { m } from "@/paraglide/messages.js";
|
|
53
53
|
import { toastError } from "@/lib/toast-error";
|
|
54
54
|
|
|
@@ -20,7 +20,7 @@ import { flexRender, useTable, type SortingState } from "@tanstack/react-table";
|
|
|
20
20
|
import { useVirtualizer } from "@tanstack/react-virtual";
|
|
21
21
|
import { ArrowDown, ArrowUp, ChevronDown } from "lucide-react";
|
|
22
22
|
import { createStoryColumns, storyTableFeatures } from "./columns";
|
|
23
|
-
import type { StoryListItem } from "
|
|
23
|
+
import type { StoryListItem } from "@/shared/story/types";
|
|
24
24
|
import { ALL_DISPLAY_PROPERTIES } from "./display/types";
|
|
25
25
|
import type { DisplayProperty, OrderKey } from "./display/types";
|
|
26
26
|
import { InfiniteScrollSentinel } from "@/components/infinite-scroll-sentinel";
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
buildDefaultView, DEFAULT_VIEW_ID, type SavedView,
|
|
37
37
|
} from "./views/view-types";
|
|
38
38
|
import { isStoryView, type StoryView } from "./views/view-switcher";
|
|
39
|
-
import type { UserBrief, StoryListItem } from "
|
|
39
|
+
import type { UserBrief, StoryListItem } from "@/shared/story/types";
|
|
40
40
|
import type { DisplayOptions } from "./display/types";
|
|
41
41
|
import { applyStoryPatchToItem, type StoryPatch } from "./display/group-fields";
|
|
42
42
|
import { useDisplayOptions } from "./display/use-display-options";
|
|
@@ -39,7 +39,7 @@ import type { DisplayOptions } from "./display/types";
|
|
|
39
39
|
import { StoryFilterToggle, StoryFilterRow, AppliedFilters, type FilterCondition } from "./filters";
|
|
40
40
|
import { LucideIconByName } from "@/components/shared-kit/icons/lucide-icon-picker/lucide-icon-by-name";
|
|
41
41
|
import { CreateProjectDialog } from "@/components/project/create-project-dialog";
|
|
42
|
-
import type { UserBrief } from "
|
|
42
|
+
import type { UserBrief } from "@/shared/story/types";
|
|
43
43
|
import { m } from "@/paraglide/messages.js";
|
|
44
44
|
import { useToolbarSearch } from "@/hooks/use-toolbar-search";
|
|
45
45
|
import { cn } from "@/lib/utils";
|
|
@@ -22,7 +22,7 @@ import { CalendarView } from "../calendar-view";
|
|
|
22
22
|
import { resolveDragBlockedToast } from "../calendar/drag-blocked";
|
|
23
23
|
import { formatDateLocal } from "@/lib/datetime";
|
|
24
24
|
import { m } from "@/paraglide/messages.js";
|
|
25
|
-
import type { StoryListItem } from "
|
|
25
|
+
import type { StoryListItem } from "@/shared/story/types";
|
|
26
26
|
|
|
27
27
|
function story(
|
|
28
28
|
id: string,
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
// 原分区」而不发 patch,表现为拖到「已取消-高」却落进「已取消-低」。
|
|
21
21
|
import { describe, expect, it } from "vitest";
|
|
22
22
|
import { resolveDropSubKey, resolveSubKeyForDrop } from "../kanban-view";
|
|
23
|
-
import type { StoryListItem } from "
|
|
23
|
+
import type { StoryListItem } from "@/shared/story/types";
|
|
24
24
|
|
|
25
25
|
const card = (id: string) => ({ id }) as StoryListItem;
|
|
26
26
|
|
|
@@ -35,9 +35,9 @@ import { render, screen, waitFor } from "@testing-library/react";
|
|
|
35
35
|
import userEvent from "@testing-library/user-event";
|
|
36
36
|
import { TooltipProvider } from "@/components/ui/tooltip";
|
|
37
37
|
import { KanbanView } from "../kanban-view";
|
|
38
|
-
import { PRIORITY_LABEL } from "
|
|
38
|
+
import { PRIORITY_LABEL } from "@/shared/story/constants";
|
|
39
39
|
import type { DisplayOptions, GroupNode } from "../../display/types";
|
|
40
|
-
import type { StoryListItem } from "
|
|
40
|
+
import type { StoryListItem } from "@/shared/story/types";
|
|
41
41
|
|
|
42
42
|
vi.mock("@tanstack/react-start", () => ({
|
|
43
43
|
useServerFn: (fn: unknown) => fn,
|
|
@@ -33,7 +33,7 @@ import { act, render } from "@testing-library/react";
|
|
|
33
33
|
import { TooltipProvider } from "@/components/ui/tooltip";
|
|
34
34
|
import { KanbanView } from "../kanban-view";
|
|
35
35
|
import type { DisplayOptions, GroupNode } from "../../display/types";
|
|
36
|
-
import type { StoryListItem } from "
|
|
36
|
+
import type { StoryListItem } from "@/shared/story/types";
|
|
37
37
|
|
|
38
38
|
vi.mock("@tanstack/react-start", () => ({
|
|
39
39
|
useServerFn: (fn: unknown) => fn,
|
|
@@ -60,7 +60,7 @@ vi.mock("@/server/serverFns/iteration", () => ({
|
|
|
60
60
|
import { TimelineView } from "../timeline-view";
|
|
61
61
|
import { formatDateLocal } from "@/lib/datetime";
|
|
62
62
|
import type { GroupKey } from "../../display/types";
|
|
63
|
-
import type { StoryListItem } from "
|
|
63
|
+
import type { StoryListItem } from "@/shared/story/types";
|
|
64
64
|
|
|
65
65
|
function story(
|
|
66
66
|
id: string,
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
fromGanttRangeToStoryDates,
|
|
23
23
|
} from "../mappers";
|
|
24
24
|
import { parseDate } from "@/lib/datetime";
|
|
25
|
-
import type { StoryListItem } from "
|
|
25
|
+
import type { StoryListItem } from "@/shared/story/types";
|
|
26
26
|
|
|
27
27
|
/** 需求样本工厂:固定 id/identifier/name/state,其余按需覆盖 */
|
|
28
28
|
const mkStory = (over: Partial<StoryListItem> = {}): StoryListItem => ({
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
import { addDays, startOfDay } from "date-fns";
|
|
38
38
|
import { parseDate } from "@/lib/datetime";
|
|
39
39
|
import type { CalendarEvent } from "@/components/reui/event-calendar/event-calendar-types";
|
|
40
|
-
import type { StoryListItem } from "
|
|
40
|
+
import type { StoryListItem } from "@/shared/story/types";
|
|
41
41
|
// 甘特导出单一事实源(禁止复制定义——复制即两份漂移)
|
|
42
42
|
import { STORY_STATE_GANTT_COLOR } from "../timeline/mappers";
|
|
43
43
|
|
|
@@ -78,7 +78,7 @@ import type {
|
|
|
78
78
|
EventCalendarViewSettings,
|
|
79
79
|
} from "@/components/reui/event-calendar/event-calendar-types";
|
|
80
80
|
import type { WeekStartsOn } from "@/components/reui/event-calendar/event-calendar-lib";
|
|
81
|
-
import type { StoryListItem } from "
|
|
81
|
+
import type { StoryListItem } from "@/shared/story/types";
|
|
82
82
|
import { applyOrder } from "../display/order-resolver";
|
|
83
83
|
import type { OrderKey } from "../display/types";
|
|
84
84
|
import {
|
|
@@ -38,7 +38,7 @@ import { StoryFilterRow } from "../filters";
|
|
|
38
38
|
import { createDefaultCondition, type FilterCondition } from "../filters/field-configs";
|
|
39
39
|
import { VIEW_ICONS, type SavedView, type ViewProjectInfo } from "./view-types";
|
|
40
40
|
import { ViewIcon } from "@/components/shared-kit/views/view-icon";
|
|
41
|
-
import type { UserBrief } from "
|
|
41
|
+
import type { UserBrief } from "@/shared/story/types";
|
|
42
42
|
import { m } from "@/paraglide/messages.js";
|
|
43
43
|
|
|
44
44
|
export interface CreateViewDialogPayload {
|
|
@@ -59,13 +59,13 @@ import { toast } from "@/components/ui/toast";
|
|
|
59
59
|
import { toastError } from "@/lib/toast-error";
|
|
60
60
|
import { m } from "@/paraglide/messages.js";
|
|
61
61
|
import { updateStoryFn, reorderStoriesFn } from "@/server/serverFns/story";
|
|
62
|
-
import type { StoryListItem, UserBrief } from "
|
|
62
|
+
import type { StoryListItem, UserBrief } from "@/shared/story/types";
|
|
63
63
|
import { GROUP_FIELD, toGroupFieldPatch, type StoryPatch } from "../display/group-fields";
|
|
64
64
|
import { buildGroupMeta, groupUniverse, resolveColumnTint } from "../display/group-resolver";
|
|
65
65
|
import { COLLAPSED_SUBGROUPS_KEY } from "../display/use-collapsed-subgroups";
|
|
66
66
|
import { useFitCount } from "../display/use-fit-count";
|
|
67
67
|
import { DateEditor, PriorityEditor, StateEditor } from "../inline-editors";
|
|
68
|
-
import { PRIORITY_LABEL, STATE_LABEL, STATE_ICON, STATE_COLOR } from "
|
|
68
|
+
import { PRIORITY_LABEL, STATE_LABEL, STATE_ICON, STATE_COLOR } from "@/shared/story/constants";
|
|
69
69
|
import { PriorityIcon } from "../priority-icon";
|
|
70
70
|
import type {
|
|
71
71
|
DisplayOptions,
|
|
@@ -40,10 +40,10 @@ import {
|
|
|
40
40
|
STORY_STATES,
|
|
41
41
|
STORY_PRIORITIES,
|
|
42
42
|
type StoryState,
|
|
43
|
-
} from "
|
|
43
|
+
} from "@/shared/story/constants";
|
|
44
44
|
import { FilterCheckPopover } from "../../filters/filter-check-popover";
|
|
45
45
|
import { PriorityIcon } from "../../priority-icon";
|
|
46
|
-
import type { StoryListItem } from "
|
|
46
|
+
import type { StoryListItem } from "@/shared/story/types";
|
|
47
47
|
import { m } from "@/paraglide/messages.js";
|
|
48
48
|
|
|
49
49
|
type BatchPreviewMode = "archive" | "delete";
|
|
@@ -28,9 +28,9 @@ import {
|
|
|
28
28
|
DateEditor,
|
|
29
29
|
LabelsEditor,
|
|
30
30
|
} from "../../inline-editors";
|
|
31
|
-
import type { UserBrief } from "
|
|
31
|
+
import type { UserBrief } from "@/shared/story/types";
|
|
32
32
|
import type { StoryPatch } from "../../display/group-fields";
|
|
33
|
-
import type { StoryListItem } from "
|
|
33
|
+
import type { StoryListItem } from "@/shared/story/types";
|
|
34
34
|
import { BatchPreviewDialog } from "./batch-preview-dialog";
|
|
35
35
|
import { TransferStoryPopover } from "../../transfer-story-popover";
|
|
36
36
|
import { m } from "@/paraglide/messages.js";
|
|
@@ -19,8 +19,8 @@ import { memo, useEffect, useState } from "react";
|
|
|
19
19
|
import { ChevronDown, ChevronRight, Plus, Loader2, ChevronsDown } from "lucide-react";
|
|
20
20
|
import { Button } from "@/components/ui/button";
|
|
21
21
|
import { Checkbox } from "@/components/ui/checkbox";
|
|
22
|
-
import type { UserBrief } from "
|
|
23
|
-
import { STORY_STATES, STORY_PRIORITIES, type StoryState, type StoryPriority } from "
|
|
22
|
+
import type { UserBrief } from "@/shared/story/types";
|
|
23
|
+
import { STORY_STATES, STORY_PRIORITIES, type StoryState, type StoryPriority } from "@/shared/story/constants";
|
|
24
24
|
import type { GroupNode, GroupKey } from "../../display/types";
|
|
25
25
|
import { cn } from "@/lib/utils";
|
|
26
26
|
import { InlineStoryCreator } from "./inline-story-creator";
|
|
@@ -26,8 +26,8 @@ import {
|
|
|
26
26
|
reorderStoriesFn,
|
|
27
27
|
} from "@/server/serverFns/story";
|
|
28
28
|
import { toast } from "@/components/ui/toast";
|
|
29
|
-
import type { UserBrief } from "
|
|
30
|
-
import type { StoryState, StoryPriority } from "
|
|
29
|
+
import type { UserBrief } from "@/shared/story/types";
|
|
30
|
+
import type { StoryState, StoryPriority } from "@/shared/story/constants";
|
|
31
31
|
import type { DisplayOptions } from "../../display/types";
|
|
32
32
|
import type { PagedGroupNode } from "../../display/use-paged-story-groups";
|
|
33
33
|
import { BUTTON_ROW_HEIGHT, useFlatRows } from "./use-flat-rows";
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
import { memo, useEffect, useRef, useMemo } from "react";
|
|
19
19
|
import { Loader2, CalendarCheck, CalendarPlus2, Check, X, Trees } from "lucide-react";
|
|
20
20
|
import { LucideIconByName } from "@/components/shared-kit/icons/lucide-icon-picker/lucide-icon-by-name";
|
|
21
|
-
import type { UserBrief } from "
|
|
22
|
-
import type { StoryState, StoryPriority } from "
|
|
21
|
+
import type { UserBrief } from "@/shared/story/types";
|
|
22
|
+
import type { StoryState, StoryPriority } from "@/shared/story/constants";
|
|
23
23
|
import { PriorityEditor, StateEditor, AssigneeEditor, DateEditor, LabelsEditor } from "../../inline-editors";
|
|
24
24
|
import { m } from "@/paraglide/messages.js";
|
|
25
25
|
|
|
@@ -20,8 +20,8 @@ import { useServerFn } from "@tanstack/react-start";
|
|
|
20
20
|
import { CalendarCheck, CalendarPlus2 } from "lucide-react";
|
|
21
21
|
import { Checkbox } from "@/components/ui/checkbox";
|
|
22
22
|
import { updateStoryFn } from "@/server/serverFns/story";
|
|
23
|
-
import type { StoryListItem, UserBrief } from "
|
|
24
|
-
import type { StoryState, StoryPriority } from "
|
|
23
|
+
import type { StoryListItem, UserBrief } from "@/shared/story/types";
|
|
24
|
+
import type { StoryState, StoryPriority } from "@/shared/story/constants";
|
|
25
25
|
import type { DisplayProperty } from "../../display/types";
|
|
26
26
|
import { PriorityEditor, StateEditor, AssigneeEditor, DateEditor, LabelsEditor } from "../../inline-editors";
|
|
27
27
|
import { cn } from "@/lib/utils";
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
17
17
|
|
|
18
18
|
import { useMemo } from "react";
|
|
19
|
-
import type { StoryListItem } from "
|
|
19
|
+
import type { StoryListItem } from "@/shared/story/types";
|
|
20
20
|
import type { GroupNode } from "../../display/types";
|
|
21
21
|
|
|
22
22
|
/** 组尾「显示更多」/「添加需求」组合行高 */
|
|
@@ -30,9 +30,9 @@ import {
|
|
|
30
30
|
type IterationBaseline,
|
|
31
31
|
} from "../mappers";
|
|
32
32
|
import { STATE_COLUMN_TINT, PRIORITY_COLUMN_TINT, resolveGroupColor } from "../../../display/group-resolver";
|
|
33
|
-
import { STORY_STATES, STATE_LABEL, PRIORITY_LABEL, type StoryState } from "
|
|
33
|
+
import { STORY_STATES, STATE_LABEL, PRIORITY_LABEL, type StoryState } from "@/shared/story/constants";
|
|
34
34
|
import { parseDate } from "@/lib/datetime";
|
|
35
|
-
import type { StoryListItem } from "
|
|
35
|
+
import type { StoryListItem } from "@/shared/story/types";
|
|
36
36
|
import type { GroupContext } from "../../../display/types";
|
|
37
37
|
import type { GanttEvent, GanttResource } from "@/components/reui/gantt/gantt-types";
|
|
38
38
|
import { m } from "@/paraglide/messages.js";
|
|
@@ -35,8 +35,8 @@ import type {
|
|
|
35
35
|
GanttEvent,
|
|
36
36
|
GanttResource,
|
|
37
37
|
} from "@/components/reui/gantt/gantt-types";
|
|
38
|
-
import { STORY_STATES, type StoryState, type StoryPriority } from "
|
|
39
|
-
import type { StoryListItem } from "
|
|
38
|
+
import { STORY_STATES, type StoryState, type StoryPriority } from "@/shared/story/constants";
|
|
39
|
+
import type { StoryListItem } from "@/shared/story/types";
|
|
40
40
|
import type { GroupContext, GroupKey, GroupNode } from "../../display/types";
|
|
41
41
|
// 分组语义单一来源:priority/assignee/labels/createdBy/project 的桶划分与
|
|
42
42
|
// 标签/颜色解析全部复用 display/group-resolver(禁止重写分组语义)。
|
|
@@ -36,7 +36,7 @@ import { toast } from "@/components/ui/toast";
|
|
|
36
36
|
import { toastError } from "@/lib/toast-error";
|
|
37
37
|
import { m } from "@/paraglide/messages.js";
|
|
38
38
|
import { fromGanttRangeToStoryDates } from "./mappers";
|
|
39
|
-
import type { StoryState } from "
|
|
39
|
+
import type { StoryState } from "@/shared/story/constants";
|
|
40
40
|
|
|
41
41
|
/** 乐观覆盖:storyId → 覆盖后的两个日期(targetDate null = 保持无截止) */
|
|
42
42
|
export interface StoryDateOverride {
|
|
@@ -70,12 +70,12 @@ import type {
|
|
|
70
70
|
GanttResource,
|
|
71
71
|
GanttScale,
|
|
72
72
|
} from "@/components/reui/gantt/gantt-types";
|
|
73
|
-
import { STATE_COLOR, STATE_LABEL } from "
|
|
73
|
+
import { STATE_COLOR, STATE_LABEL } from "@/shared/story/constants";
|
|
74
74
|
import {
|
|
75
75
|
TIMELINE_GROUP_KEYS,
|
|
76
76
|
type TimelineGroupKey,
|
|
77
77
|
} from "../display/constants";
|
|
78
|
-
import type { StoryListItem, UserBrief } from "
|
|
78
|
+
import type { StoryListItem, UserBrief } from "@/shared/story/types";
|
|
79
79
|
import { applyOrder } from "../display/order-resolver";
|
|
80
80
|
import type { GroupContext, GroupKey, OrderKey } from "../display/types";
|
|
81
81
|
import {
|
|
@@ -84,7 +84,7 @@ class MockIntersectionObserver {
|
|
|
84
84
|
import { CaseRow } from "../list/case-row";
|
|
85
85
|
import { GroupedList, type TestCaseGroupBy, type TestCaseGroupInfo } from "../list/grouped-list";
|
|
86
86
|
import type { TestCaseSummary } from "@/server/serverFns/testcase/types";
|
|
87
|
-
import type { UserBrief } from "@/
|
|
87
|
+
import type { UserBrief } from "@/shared/story/types";
|
|
88
88
|
import type { FolderNodeDto } from "../folder-tree";
|
|
89
89
|
|
|
90
90
|
const makeUser = (id: string, username: string): UserBrief => ({
|
|
@@ -50,7 +50,7 @@ vi.mock("@/components/story/inline-editors/story-select-dialog", () => ({
|
|
|
50
50
|
|
|
51
51
|
import { CreateTestCaseDialog } from "../create-testcase-dialog";
|
|
52
52
|
import type { TestCaseSummary } from "@/server/serverFns/testcase/types";
|
|
53
|
-
import type { UserBrief } from "@/
|
|
53
|
+
import type { UserBrief } from "@/shared/story/types";
|
|
54
54
|
import type { FolderNodeDto } from "../folder-tree";
|
|
55
55
|
|
|
56
56
|
const makeUser = (id: string, username: string): UserBrief => ({
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
DEFAULT_TESTCASE_DISPLAY_OPTIONS,
|
|
37
37
|
TESTCASE_DISPLAY_PROPERTIES,
|
|
38
38
|
type TestCaseDisplayOptions,
|
|
39
|
-
} from "
|
|
39
|
+
} from "@/shared/testcase/field-configs";
|
|
40
40
|
|
|
41
41
|
const OPTIONS: TestCaseDisplayOptions = {
|
|
42
42
|
...DEFAULT_TESTCASE_DISPLAY_OPTIONS,
|
|
@@ -64,7 +64,7 @@ vi.mock("@/components/ui/toast", () => ({
|
|
|
64
64
|
vi.mock("@/lib/toast-error", () => ({ toastError: H.toastErrorFn }));
|
|
65
65
|
|
|
66
66
|
import { TestCaseToolbar } from "../testcase-toolbar";
|
|
67
|
-
import type { TestCaseDisplayOptions } from "
|
|
67
|
+
import type { TestCaseDisplayOptions } from "@/shared/testcase/field-configs";
|
|
68
68
|
import type { TestcaseFilterCondition } from "../filters";
|
|
69
69
|
|
|
70
70
|
const CSV = "\uFEFF编号,标题,类型,优先级,状态,负责人\r\nWEB-TC1,登录成功,functional,p1,approved,";
|
|
@@ -180,7 +180,7 @@ class MockIntersectionObserver {
|
|
|
180
180
|
import { TestCaseListView } from "../list-view";
|
|
181
181
|
import type { TestCaseSummary } from "@/server/serverFns/testcase/types";
|
|
182
182
|
import type { TestCaseFilterViewDTO } from "@/server/serverFns/testcase/testcase-filter-views";
|
|
183
|
-
import { DEFAULT_TESTCASE_DISPLAY_OPTIONS, type TestCaseDisplayOptions } from "
|
|
183
|
+
import { DEFAULT_TESTCASE_DISPLAY_OPTIONS, type TestCaseDisplayOptions } from "@/shared/testcase/field-configs";
|
|
184
184
|
import { listTestCaseBoardColumnsFn } from "@/server/serverFns/testcase/testcase-board";
|
|
185
185
|
import { serializeFilters } from "../filters";
|
|
186
186
|
|
|
@@ -71,7 +71,7 @@ import { useState } from "react";
|
|
|
71
71
|
import { StepEditor, type StepDraft } from "../step-editor";
|
|
72
72
|
import { CreateTestCaseDialog } from "../create-testcase-dialog";
|
|
73
73
|
import type { TestCaseSummary } from "@/server/serverFns/testcase/types";
|
|
74
|
-
import type { UserBrief } from "@/
|
|
74
|
+
import type { UserBrief } from "@/shared/story/types";
|
|
75
75
|
import type { FolderNodeDto } from "../folder-tree";
|
|
76
76
|
import { toast } from "@/components/ui/toast";
|
|
77
77
|
|
|
@@ -60,7 +60,7 @@ vi.mock("@/server/serverFns/testcase/testcase-export", () => ({
|
|
|
60
60
|
}));
|
|
61
61
|
|
|
62
62
|
import { TestCaseToolbar } from "../testcase-toolbar";
|
|
63
|
-
import type { TestCaseDisplayOptions } from "
|
|
63
|
+
import type { TestCaseDisplayOptions } from "@/shared/testcase/field-configs";
|
|
64
64
|
|
|
65
65
|
afterEach(() => {
|
|
66
66
|
cleanup();
|
|
@@ -47,7 +47,7 @@ import { toast } from "@/components/ui/toast";
|
|
|
47
47
|
import { createTestCaseFn } from "@/server/serverFns/testcase/testcase-crud";
|
|
48
48
|
import type { TestCasePriority, TestCaseType } from "@/server/serverFns/testcase/constants";
|
|
49
49
|
import type { TestCaseSummary } from "@/server/serverFns/testcase/types";
|
|
50
|
-
import type { UserBrief } from "@/
|
|
50
|
+
import type { UserBrief } from "@/shared/story/types";
|
|
51
51
|
import { StorySelectDialog } from "@/components/story/inline-editors/story-select-dialog";
|
|
52
52
|
import { TypeEditor } from "./inline-editors/type-editor";
|
|
53
53
|
import { PriorityEditor } from "./inline-editors/priority-editor";
|
|
@@ -39,7 +39,7 @@ import type {
|
|
|
39
39
|
TestCaseDetail,
|
|
40
40
|
TestCaseStoryRef,
|
|
41
41
|
} from "@/server/serverFns/testcase/types";
|
|
42
|
-
import type { UserBrief } from "@/
|
|
42
|
+
import type { UserBrief } from "@/shared/story/types";
|
|
43
43
|
import type { FolderNodeDto } from "../folder-tree";
|
|
44
44
|
import type { TestCaseUpdatePatch } from "../list/case-row";
|
|
45
45
|
import { buildRoomName } from "@allbluecn/collab-core/rooms";
|
|
@@ -24,7 +24,7 @@ import { ExternalLink } from "lucide-react";
|
|
|
24
24
|
import { Badge } from "@/components/ui/badge";
|
|
25
25
|
import type { TestCaseDetail, TestCaseStoryRef } from "@/server/serverFns/testcase/types";
|
|
26
26
|
import type { TestCaseAutomation } from "@/server/serverFns/testcase/constants";
|
|
27
|
-
import type { UserBrief } from "@/
|
|
27
|
+
import type { UserBrief } from "@/shared/story/types";
|
|
28
28
|
import type { FolderNodeDto } from "../folder-tree";
|
|
29
29
|
import type { TestCaseUpdatePatch } from "../list/case-row";
|
|
30
30
|
import { AssigneeEditor } from "../inline-editors/assignee-editor";
|