@next-bricks/ai-portal 0.61.0 → 0.61.2

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.
@@ -2,7 +2,7 @@ import React from "react";
2
2
  import { ReactNextElement } from "@next-core/react-element";
3
3
  import "@next-core/theme";
4
4
  import type { GeneralIconProps } from "@next-bricks/icons/general-icon";
5
- interface ActionItem {
5
+ export interface ActionItem {
6
6
  text: string;
7
7
  key: string;
8
8
  icon?: GeneralIconProps;
@@ -21,4 +21,3 @@ export declare class ActionButtons extends ReactNextElement implements ActionBut
21
21
  accessor activeKey: string | null | undefined;
22
22
  render(): React.JSX.Element;
23
23
  }
24
- export {};
@@ -21,6 +21,7 @@ export interface ChatStreamProps {
21
21
  aiEmployees?: AIEmployee[];
22
22
  commands?: Command[];
23
23
  uploadOptions?: UploadOptions;
24
+ hideMermaid?: boolean;
24
25
  }
25
26
  export interface ConversationDetail {
26
27
  projectId?: string;
@@ -24,6 +24,7 @@ export interface CruiseCanvasProps {
24
24
  aiEmployees?: AIEmployee[];
25
25
  commands?: Command[];
26
26
  uploadOptions?: UploadOptions;
27
+ hideMermaid?: boolean;
27
28
  }
28
29
  export interface ConversationDetail {
29
30
  projectId?: string;
@@ -14,7 +14,7 @@ export interface DropdownSelectProps {
14
14
  searchPlaceholder?: string;
15
15
  loading?: boolean;
16
16
  }
17
- interface DropdownOptions {
17
+ export interface DropdownOptions {
18
18
  label: string;
19
19
  value: string;
20
20
  disabled?: boolean;
@@ -39,4 +39,3 @@ export declare class DropdownSelect extends ReactNextElement implements Dropdown
39
39
  accessor showSearch: boolean | undefined;
40
40
  render(): React.JSX.Element;
41
41
  }
42
- export {};
@@ -1,10 +1,13 @@
1
1
  import React from "react";
2
2
  import { ReactNextElement } from "@next-core/react-element";
3
3
  import "@next-core/theme";
4
+ export interface HomeContainerProps {
5
+ sticky?: boolean;
6
+ }
4
7
  /**
5
8
  * 构件 `ai-portal.home-container`
6
9
  */
7
- export declare class HomeContainer extends ReactNextElement {
10
+ export declare class HomeContainer extends ReactNextElement implements HomeContainerProps {
8
11
  accessor sticky: boolean | undefined;
9
12
  render(): React.JSX.Element;
10
13
  }
@@ -1,20 +1,21 @@
1
- import React from "react";
1
+ import React, { type HTMLAttributes } from "react";
2
2
  import { ReactNextElement } from "@next-core/react-element";
3
3
  import "@next-core/theme";
4
- import type { GeneralIconProps } from "@next-bricks/icons/general-icon";
4
+ import type { GeneralIcon, GeneralIconProps } from "@next-bricks/icons/general-icon";
5
5
  export interface IconButtonProps {
6
- icon?: GeneralIconProps;
6
+ icon?: GeneralIconProps & HTMLAttributes<GeneralIcon>;
7
7
  tooltip?: string;
8
8
  tooltipHoist?: boolean;
9
9
  disabled?: boolean;
10
10
  variant?: IconButtonVariant;
11
+ reduceIconSize?: boolean;
11
12
  }
12
13
  export type IconButtonVariant = "default" | "light" | "mini" | "mini-light" | "bordered";
13
14
  /**
14
15
  * 构件 `ai-portal.icon-button`
15
16
  */
16
17
  export declare class IconButton extends ReactNextElement implements IconButtonProps {
17
- accessor icon: GeneralIconProps | undefined;
18
+ accessor icon: (GeneralIconProps & HTMLAttributes<GeneralIcon>) | undefined;
18
19
  accessor tooltip: string | undefined;
19
20
  accessor tooltipHoist: boolean | undefined;
20
21
  accessor disabled: boolean | undefined;
@@ -1,77 +1,136 @@
1
1
  import type { DetailedHTMLProps, HTMLAttributes } from "react";
2
- import type { ActionButtons, ActionButtonsProps } from "./action-buttons";
2
+ import type { ActionButtons, ActionButtonsProps, ActionItem } from "./action-buttons";
3
3
  import type { ActivityTimeline, ActivityTimelineProps } from "./activity-timeline";
4
4
  import type { AIAgents, AIAgentsProps } from "./ai-agents";
5
5
  import type { AIEmployees, AIEmployeesProps } from "./ai-employees";
6
6
  import type { BlankState, BlankStateProps } from "./blank-state";
7
7
  import type { ChatBox, ChatBoxProps } from "./chat-box";
8
8
  import type { ChatInput, ChatInputProps } from "./chat-input";
9
- import type { ChatStream, ChatStreamProps } from "./chat-stream";
9
+ import type { ChatStream, ChatStreamProps, ConversationDetail } from "./chat-stream";
10
10
  import type { CruiseCanvas, CruiseCanvasProps } from "./cruise-canvas";
11
- import type { DropdownSelect, DropdownSelectProps } from "./dropdown-select";
11
+ import type { DropdownSelect, DropdownSelectProps, DropdownOptions } from "./dropdown-select";
12
12
  import type { ElevoCard, ElevoCardProps } from "./elevo-card";
13
13
  import type { ElevoLogo } from "./elevo-logo";
14
14
  import type { ActionClickDetail, ElevoSidebar, ElevoSidebarProps, ProjectActionClickDetail } from "./elevo-sidebar";
15
15
  import type { FlowTabs, FlowTabsProps } from "./flow-tabs";
16
16
  import type { GanttChart, GanttChartProps } from "./gantt-chart";
17
+ import type { GanttNode } from "./gantt-chart/interfaces";
17
18
  import type { GoalCardList, GoalCardListProps } from "./goal-card-list";
18
- import type { HomeContainer } from "./home-container";
19
+ import type { HomeContainer, HomeContainerProps } from "./home-container";
19
20
  import type { IconButton, IconButtonProps } from "./icon-button";
20
21
  import type { McpTools, McpToolsProps } from "./mcp-tools";
21
22
  import type { NoticeDropdown, NoticeDropdownProps, NoticeItem } from "./notice-dropdown";
22
23
  import type { NoticeList, NoticeListProps } from "./notice-list";
23
24
  import type { PageContainer, PageContainerProps } from "./page-container";
24
25
  import type { PreviewContainer, PreviewContainerProps } from "./preview-container";
25
- import type { ProjectConversations, ProjectConversationsProps } from "./project-conversations";
26
- import type { ProjectKnowledges, ProjectKnowledgesProps } from "./project-knowledges";
26
+ import type { ProjectConversations, ProjectConversationsProps, ActionClickDetail as PCActionClickDetail, Conversation } from "./project-conversations";
27
+ import type { Knowledge, ProjectKnowledges, ProjectKnowledgesProps } from "./project-knowledges";
27
28
  import type { RunningFlow, RunningFlowProps } from "./running-flow";
28
29
  import type { ShowCase, ShowCaseProps } from "./show-case";
29
30
  import type { ShowCases, ShowCasesProps } from "./show-cases";
30
- import type { StageFlow, StageFlowProps } from "./stage-flow";
31
+ import type { EditActivityDetail, Stage, StageFlow, StageFlowProps } from "./stage-flow";
31
32
  import type { StatWithMiniChart, StatWithMiniChartProps } from "./stat-with-mini-chart";
32
33
  import type { StickyContainer, StickyContainerProps } from "./sticky-container";
33
- import type { TabList, TabListProps } from "./tab-list";
34
+ import type { Tab, TabList, TabListProps } from "./tab-list";
35
+ import type { ChatPayload } from "./shared/interfaces";
36
+ import type { FeedbackDetail } from "./cruise-canvas/interfaces";
37
+ import type { GoalItem } from "./goal-card-list/CardItem/CardItem";
34
38
  declare global {
35
39
  namespace JSX {
36
40
  interface IntrinsicElements {
37
- "ai-portal--action-buttons": DetailedHTMLProps<HTMLAttributes<ActionButtons>, ActionButtons> & ActionButtonsProps;
41
+ "ai-portal--action-buttons": DetailedHTMLProps<HTMLAttributes<ActionButtons>, ActionButtons> & ActionButtonsProps & {
42
+ onChange?: (event: CustomEvent<ActionItem | null>) => void;
43
+ };
38
44
  "ai-portal--activity-timeline": DetailedHTMLProps<HTMLAttributes<ActivityTimeline>, ActivityTimeline> & ActivityTimelineProps;
39
45
  "ai-portal--ai-agents": DetailedHTMLProps<HTMLAttributes<AIAgents>, AIAgents> & AIAgentsProps;
40
46
  "ai-portal--ai-employees": DetailedHTMLProps<HTMLAttributes<AIEmployees>, AIEmployees> & AIEmployeesProps;
41
47
  "ai-portal--blank-state": DetailedHTMLProps<HTMLAttributes<BlankState>, BlankState> & BlankStateProps;
42
- "ai-portal--chat-box": DetailedHTMLProps<HTMLAttributes<ChatBox>, ChatBox> & ChatBoxProps;
43
- "ai-portal--chat-input": DetailedHTMLProps<HTMLAttributes<ChatInput>, ChatInput> & ChatInputProps;
44
- "ai-portal--chat-stream": DetailedHTMLProps<HTMLAttributes<ChatStream>, ChatStream> & ChatStreamProps;
45
- "ai-portal--cruise-canvas": DetailedHTMLProps<HTMLAttributes<CruiseCanvas>, CruiseCanvas> & CruiseCanvasProps;
46
- "ai-portal--dropdown-select": DetailedHTMLProps<HTMLAttributes<DropdownSelect>, DropdownSelect> & DropdownSelectProps;
48
+ "ai-portal--chat-box": DetailedHTMLProps<HTMLAttributes<ChatBox>, ChatBox> & ChatBoxProps & {
49
+ onChatSubmit?: (event: CustomEvent<ChatPayload>) => void;
50
+ };
51
+ "ai-portal--chat-input": DetailedHTMLProps<HTMLAttributes<ChatInput>, ChatInput> & ChatInputProps & {
52
+ onChatSubmit?: (event: CustomEvent<ChatPayload>) => void;
53
+ };
54
+ "ai-portal--chat-stream": DetailedHTMLProps<HTMLAttributes<ChatStream>, ChatStream> & ChatStreamProps & {
55
+ onSplitChange?: (event: CustomEvent<boolean>) => void;
56
+ onShare?: (event: CustomEvent<void>) => void;
57
+ onTerminate?: (event: CustomEvent<void>) => void;
58
+ onFeedbackSubmit?: (event: CustomEvent<FeedbackDetail>) => void;
59
+ onFeedbackOnView?: (event: CustomEvent<string>) => void;
60
+ onUiSwitch?: (event: CustomEvent<"canvas" | "chat">) => void;
61
+ onDetailChange?: (event: CustomEvent<ConversationDetail>) => void;
62
+ };
63
+ "ai-portal--cruise-canvas": DetailedHTMLProps<HTMLAttributes<CruiseCanvas>, CruiseCanvas> & CruiseCanvasProps & {
64
+ onShare?: (event: CustomEvent<void>) => void;
65
+ onTerminate?: (event: CustomEvent<void>) => void;
66
+ onFeedbackSubmit?: (event: CustomEvent<FeedbackDetail>) => void;
67
+ onFeedbackOnView?: (event: CustomEvent<string>) => void;
68
+ onUiSwitch?: (event: CustomEvent<"canvas" | "chat">) => void;
69
+ onDetailChange?: (event: CustomEvent<ConversationDetail>) => void;
70
+ };
71
+ "ai-portal--dropdown-select": DetailedHTMLProps<HTMLAttributes<DropdownSelect>, DropdownSelect> & DropdownSelectProps & {
72
+ onChange?: (event: CustomEvent<DropdownOptions>) => void;
73
+ };
47
74
  "ai-portal--elevo-card": DetailedHTMLProps<HTMLAttributes<ElevoCard>, ElevoCard> & ElevoCardProps;
48
75
  "ai-portal--elevo-logo": DetailedHTMLProps<HTMLAttributes<ElevoLogo>, ElevoLogo>;
49
76
  "ai-portal--elevo-sidebar": DetailedHTMLProps<HTMLAttributes<ElevoSidebar>, ElevoSidebar> & ElevoSidebarProps & {
77
+ onLogout?: () => void;
78
+ onAddProject?: () => void;
50
79
  onActionClick?: (event: CustomEvent<ActionClickDetail>) => void;
51
80
  onProjectActionClick?: (event: CustomEvent<ProjectActionClickDetail>) => void;
52
81
  };
53
- "ai-portal--flow-tabs": DetailedHTMLProps<HTMLAttributes<FlowTabs>, FlowTabs> & FlowTabsProps;
54
- "ai-portal--gantt-chart": DetailedHTMLProps<HTMLAttributes<GanttChart>, GanttChart> & GanttChartProps;
55
- "ai-portal--goal-card-list": DetailedHTMLProps<HTMLAttributes<GoalCardList>, GoalCardList> & GoalCardListProps;
56
- "ai-portal--home-container": DetailedHTMLProps<HTMLAttributes<HomeContainer>, HomeContainer>;
82
+ "ai-portal--flow-tabs": DetailedHTMLProps<HTMLAttributes<FlowTabs>, FlowTabs> & FlowTabsProps & {
83
+ onTabClick?: (event: CustomEvent<Tab>) => void;
84
+ };
85
+ "ai-portal--gantt-chart": DetailedHTMLProps<HTMLAttributes<GanttChart>, GanttChart> & GanttChartProps & {
86
+ onNodeClick?: (event: CustomEvent<GanttNode>) => void;
87
+ onFullscreenClick?: (event: CustomEvent<void>) => void;
88
+ };
89
+ "ai-portal--goal-card-list": DetailedHTMLProps<HTMLAttributes<GoalCardList>, GoalCardList> & GoalCardListProps & {
90
+ onItemClick?: (event: CustomEvent<GoalItem>) => void;
91
+ onItemStatusChange?: (event: CustomEvent<GoalItem>) => void;
92
+ onItemTitleChange?: (event: CustomEvent<GoalItem>) => void;
93
+ onItemNewChat?: (event: CustomEvent<GoalItem>) => void;
94
+ };
95
+ "ai-portal--home-container": DetailedHTMLProps<HTMLAttributes<HomeContainer>, HomeContainer> & HomeContainerProps;
57
96
  "ai-portal--icon-button": DetailedHTMLProps<HTMLAttributes<IconButton>, IconButton> & IconButtonProps;
58
97
  "ai-portal--mcp-tools": DetailedHTMLProps<HTMLAttributes<McpTools>, McpTools> & McpToolsProps;
59
98
  "ai-portal--notice-dropdown": DetailedHTMLProps<HTMLAttributes<NoticeDropdown>, NoticeDropdown> & NoticeDropdownProps & {
60
99
  onMarkAllRead?: (event: CustomEvent<void>) => void;
61
100
  onNoticeClick?: (event: CustomEvent<NoticeItem>) => void;
62
101
  };
63
- "ai-portal--notice-list": DetailedHTMLProps<HTMLAttributes<NoticeList>, NoticeList> & NoticeListProps;
102
+ "ai-portal--notice-list": DetailedHTMLProps<HTMLAttributes<NoticeList>, NoticeList> & NoticeListProps & {
103
+ onNoticeClick?: (event: CustomEvent<NoticeItem>) => void;
104
+ onMarkItemsRead?: (event: CustomEvent<NoticeItem[]>) => void;
105
+ onMarkAllRead?: (event: CustomEvent<void>) => void;
106
+ };
64
107
  "ai-portal--page-container": DetailedHTMLProps<HTMLAttributes<PageContainer>, PageContainer> & PageContainerProps;
65
108
  "ai-portal--preview-container": DetailedHTMLProps<HTMLAttributes<PreviewContainer>, PreviewContainer> & PreviewContainerProps;
66
- "ai-portal--project-conversations": DetailedHTMLProps<HTMLAttributes<ProjectConversations>, ProjectConversations> & ProjectConversationsProps;
67
- "ai-portal--project-knowledges": DetailedHTMLProps<HTMLAttributes<ProjectKnowledges>, ProjectKnowledges> & ProjectKnowledgesProps;
68
- "ai-portal--running-flow": DetailedHTMLProps<HTMLAttributes<RunningFlow>, RunningFlow> & RunningFlowProps;
109
+ "ai-portal--project-conversations": DetailedHTMLProps<HTMLAttributes<ProjectConversations>, ProjectConversations> & ProjectConversationsProps & {
110
+ onActionClick?: (event: CustomEvent<PCActionClickDetail>) => void;
111
+ onGoalClick?: (event: CustomEvent<Conversation>) => void;
112
+ };
113
+ "ai-portal--project-knowledges": DetailedHTMLProps<HTMLAttributes<ProjectKnowledges>, ProjectKnowledges> & ProjectKnowledgesProps & {
114
+ onActionClick?: (event: CustomEvent<ActionClickDetail>) => void;
115
+ onItemClick?: (event: CustomEvent<Knowledge>) => void;
116
+ };
117
+ "ai-portal--running-flow": DetailedHTMLProps<HTMLAttributes<RunningFlow>, RunningFlow> & RunningFlowProps & {
118
+ onActiveChange?: (event: CustomEvent<string | null>) => void;
119
+ };
69
120
  "ai-portal--show-case": DetailedHTMLProps<HTMLAttributes<ShowCase>, ShowCase> & ShowCaseProps;
70
121
  "ai-portal--show-cases": DetailedHTMLProps<HTMLAttributes<ShowCases>, ShowCases> & ShowCasesProps;
71
- "ai-portal--stage-flow": DetailedHTMLProps<HTMLAttributes<StageFlow>, StageFlow> & StageFlowProps;
122
+ "ai-portal--stage-flow": DetailedHTMLProps<HTMLAttributes<StageFlow>, StageFlow> & StageFlowProps & {
123
+ onChange?: (event: CustomEvent<Stage[]>) => void;
124
+ onAddActivity?: (event: CustomEvent<{
125
+ stage: Stage;
126
+ }>) => void;
127
+ onEditActivity?: (event: CustomEvent<EditActivityDetail>) => void;
128
+ };
72
129
  "ai-portal--stat-with-mini-chart": DetailedHTMLProps<HTMLAttributes<StatWithMiniChart>, StatWithMiniChart> & StatWithMiniChartProps;
73
130
  "ai-portal--sticky-container": DetailedHTMLProps<HTMLAttributes<StickyContainer>, StickyContainer> & StickyContainerProps;
74
- "ai-portal--tab-list": DetailedHTMLProps<HTMLAttributes<TabList>, TabList> & TabListProps;
131
+ "ai-portal--tab-list": DetailedHTMLProps<HTMLAttributes<TabList>, TabList> & TabListProps & {
132
+ onTabClick?: (event: CustomEvent<Tab>) => void;
133
+ };
75
134
  }
76
135
  }
77
136
  }
@@ -207,7 +207,7 @@ export interface CommandPayloadGoalPlan extends BaseCommandPayload {
207
207
  export interface LegacyCommandPayloadServiceFlowStarting {
208
208
  type: "serviceFlowStarting";
209
209
  serviceFlowStarting: {
210
- spaceInstanceId: string;
210
+ spaceInstanceId?: string;
211
211
  spaceName?: string;
212
212
  flowInstanceId?: string;
213
213
  flowName?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@next-bricks/ai-portal",
3
- "version": "0.61.0",
3
+ "version": "0.61.2",
4
4
  "homepage": "https://github.com/easyops-cn/next-advanced-bricks/tree/master/bricks/ai-portal",
5
5
  "repository": {
6
6
  "type": "git",
@@ -49,5 +49,5 @@
49
49
  "@next-bricks/presentational": "*",
50
50
  "@next-bricks/vs": "*"
51
51
  },
52
- "gitHead": "887e63f19b878c63c61f757dee8109353fa6e1a1"
52
+ "gitHead": "44ff0a9a170ae911252a2030b9edde16ad229532"
53
53
  }