@next-bricks/ai-portal 0.67.0 → 0.68.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/bricks.json +57 -41
- package/dist/chunks/2118.677e19e7.js +3 -0
- package/dist/chunks/2118.677e19e7.js.LICENSE.txt +5 -0
- package/dist/chunks/2118.677e19e7.js.map +1 -0
- package/dist/chunks/3573.7b0bb780.js +3 -0
- package/dist/chunks/3573.7b0bb780.js.map +1 -0
- package/dist/chunks/3744.06d6d911.js +2 -0
- package/dist/chunks/{3744.ed6d0719.js.map → 3744.06d6d911.js.map} +1 -1
- package/dist/chunks/4208.7a99a847.js +2 -0
- package/dist/chunks/4208.7a99a847.js.map +1 -0
- package/dist/chunks/4228.692fa030.js +2 -0
- package/dist/chunks/{4228.ea602510.js.map → 4228.692fa030.js.map} +1 -1
- package/dist/chunks/4573.56d7bc95.js +3 -0
- package/dist/chunks/4573.56d7bc95.js.map +1 -0
- package/dist/chunks/488.ec641231.js +2 -0
- package/dist/chunks/488.ec641231.js.map +1 -0
- package/dist/chunks/6530.6d9e7c8b.js +2 -0
- package/dist/chunks/6530.6d9e7c8b.js.map +1 -0
- package/dist/chunks/chat-box.1ac7555a.js +3 -0
- package/dist/chunks/chat-box.1ac7555a.js.map +1 -0
- package/dist/chunks/chat-input.444c80bb.js +3 -0
- package/dist/chunks/chat-input.444c80bb.js.map +1 -0
- package/dist/chunks/chat-panel-welcome.2f7c6c8b.js +2 -0
- package/dist/chunks/chat-panel-welcome.2f7c6c8b.js.map +1 -0
- package/dist/chunks/chat-panel.3160f2e8.js +2 -0
- package/dist/chunks/chat-panel.3160f2e8.js.map +1 -0
- package/dist/chunks/{elevo-sidebar.fba49f67.js → elevo-sidebar.a1b4645a.js} +3 -3
- package/dist/chunks/{elevo-sidebar.fba49f67.js.map → elevo-sidebar.a1b4645a.js.map} +1 -1
- package/dist/chunks/main.638b1f10.js +2 -0
- package/dist/chunks/main.638b1f10.js.map +1 -0
- package/dist/chunks/space-workbench.572f4029.js +2 -0
- package/dist/chunks/space-workbench.572f4029.js.map +1 -0
- package/dist/examples.json +12 -12
- package/dist/images/09a19fbf.svg +4 -0
- package/dist/images/2da0514e.png +0 -0
- package/dist/images/33bca987.png +0 -0
- package/dist/images/9da11f86.png +0 -0
- package/dist/images/da88bb60.svg +12 -0
- package/dist/images/e15f6abd.svg +3 -0
- package/dist/index.ebd91b13.js +2 -0
- package/dist/index.ebd91b13.js.map +1 -0
- package/dist/manifest.json +398 -384
- package/dist/types.json +3242 -2713
- package/dist-types/bootstrap.d.ts +1 -0
- package/dist-types/chat-panel/ChatPanelContent.d.ts +22 -0
- package/dist-types/cruise-canvas/useConversationDetail.d.ts +2 -2
- package/dist-types/shared/interfaces.d.ts +10 -1
- package/dist-types/space-workbench/bricks.d.ts +23 -0
- package/dist-types/space-workbench/chat-panel-welcome/i18n.d.ts +14 -0
- package/dist-types/space-workbench/chat-panel-welcome/index.d.ts +13 -0
- package/dist-types/space-workbench/chat-panel-welcome/index.spec.d.ts +1 -0
- package/dist-types/space-workbench/components/ActivityCard.d.ts +14 -0
- package/dist-types/space-workbench/components/ActivityDetailModal.d.ts +13 -0
- package/dist-types/space-workbench/components/BusinessFlowPreview.d.ts +13 -0
- package/dist-types/space-workbench/components/BusinessFlowPreview.spec.d.ts +1 -0
- package/dist-types/space-workbench/components/BusinessManage.d.ts +15 -0
- package/dist-types/space-workbench/components/BusinessManage.spec.d.ts +1 -0
- package/dist-types/space-workbench/components/BusinessObjectPreview.d.ts +13 -0
- package/dist-types/space-workbench/components/BusinessObjectPreview.spec.d.ts +1 -0
- package/dist-types/space-workbench/components/ConfigPreview.d.ts +14 -0
- package/dist-types/space-workbench/components/ConfigPreview.spec.d.ts +1 -0
- package/dist-types/space-workbench/components/EmptyState.d.ts +15 -0
- package/dist-types/space-workbench/components/EmptyState.spec.d.ts +1 -0
- package/dist-types/space-workbench/components/SpaceConfigModal/ConfigContext.d.ts +6 -0
- package/dist-types/space-workbench/components/SpaceConfigModal/SpaceConfigModal.d.ts +12 -0
- package/dist-types/space-workbench/components/SpaceConfigModal/SpaceConfigModal.spec.d.ts +1 -0
- package/dist-types/space-workbench/components/SpaceConfigModal/utils.d.ts +3 -0
- package/dist-types/space-workbench/components/SpaceConfigModal/utils.spec.d.ts +1 -0
- package/dist-types/space-workbench/components/{SpaceGuide/SpaceGuide.d.ts → SpaceGuide.d.ts} +3 -1
- package/dist-types/space-workbench/components/SpaceGuide.spec.d.ts +1 -0
- package/dist-types/space-workbench/components/{SpaceNav/SpaceNav.d.ts → SpaceNav.d.ts} +4 -3
- package/dist-types/space-workbench/components/SpaceNav.spec.d.ts +1 -0
- package/dist-types/space-workbench/components/knowLedgesList.d.ts +8 -0
- package/dist-types/space-workbench/i18n.d.ts +51 -1
- package/dist-types/space-workbench/interfaces.d.ts +119 -0
- package/dist-types/space-workbench/workbenchContext.d.ts +8 -0
- package/package.json +2 -2
- package/dist/chunks/1750.ba9f8f80.js +0 -2
- package/dist/chunks/1750.ba9f8f80.js.map +0 -1
- package/dist/chunks/3744.ed6d0719.js +0 -2
- package/dist/chunks/3840.6080d56e.js +0 -3
- package/dist/chunks/3840.6080d56e.js.map +0 -1
- package/dist/chunks/4208.a1a0dfdd.js +0 -2
- package/dist/chunks/4208.a1a0dfdd.js.map +0 -1
- package/dist/chunks/4228.ea602510.js +0 -2
- package/dist/chunks/5411.095a6093.js +0 -3
- package/dist/chunks/5411.095a6093.js.map +0 -1
- package/dist/chunks/6530.3c295a95.js +0 -2
- package/dist/chunks/6530.3c295a95.js.map +0 -1
- package/dist/chunks/chat-box.060b8727.js +0 -3
- package/dist/chunks/chat-box.060b8727.js.map +0 -1
- package/dist/chunks/chat-input.e913e9ed.js +0 -3
- package/dist/chunks/chat-input.e913e9ed.js.map +0 -1
- package/dist/chunks/chat-panel.3b7afbd5.js +0 -2
- package/dist/chunks/chat-panel.3b7afbd5.js.map +0 -1
- package/dist/chunks/main.659aac54.js +0 -2
- package/dist/chunks/main.659aac54.js.map +0 -1
- package/dist/chunks/space-workbench.964b8644.js +0 -2
- package/dist/chunks/space-workbench.964b8644.js.map +0 -1
- package/dist/index.bdb0052a.js +0 -2
- package/dist/index.bdb0052a.js.map +0 -1
- /package/dist/chunks/{3840.6080d56e.js.LICENSE.txt → 3573.7b0bb780.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{5411.095a6093.js.LICENSE.txt → 4573.56d7bc95.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{chat-box.060b8727.js.LICENSE.txt → chat-box.1ac7555a.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{chat-input.e913e9ed.js.LICENSE.txt → chat-input.444c80bb.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{elevo-sidebar.fba49f67.js.LICENSE.txt → elevo-sidebar.a1b4645a.js.LICENSE.txt} +0 -0
- /package/dist-types/space-workbench/components/{SpaceGuide/SpaceGuide.spec.d.ts → ActivityCard.spec.d.ts} +0 -0
- /package/dist-types/space-workbench/components/{SpaceNav/SpaceNav.spec.d.ts → ActivityDetailModal.spec.d.ts} +0 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { UseBrickConf } from "@next-core/types";
|
|
3
|
+
import type { ChatPayload, ConversationPatch, FileInfo, RequestStore, UploadOptions } from "../shared/interfaces";
|
|
4
|
+
export interface ChatPanelContentProps {
|
|
5
|
+
conversationId: string | null;
|
|
6
|
+
initialRequest: RequestStore | null;
|
|
7
|
+
placeholder?: string;
|
|
8
|
+
uploadOptions?: UploadOptions;
|
|
9
|
+
help?: {
|
|
10
|
+
useBrick: UseBrickConf;
|
|
11
|
+
};
|
|
12
|
+
fromModal?: boolean;
|
|
13
|
+
submitDisabled?: boolean;
|
|
14
|
+
onChatSubmit: (payload: ChatPayload) => void;
|
|
15
|
+
onData?: (data: ConversationPatch) => void;
|
|
16
|
+
}
|
|
17
|
+
export interface ChatPanelContentRef {
|
|
18
|
+
setInputValue: (content: string) => void;
|
|
19
|
+
focus: () => void;
|
|
20
|
+
showFile: (file: FileInfo) => void;
|
|
21
|
+
}
|
|
22
|
+
export declare const ChatPanelContent: React.ForwardRefExoticComponent<ChatPanelContentProps & React.RefAttributes<ChatPanelContentRef>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ExtraChatPayload, RequestStore } from "../shared/interfaces";
|
|
2
|
-
export declare function useConversationDetail(conversationId: string | null, initialRequest?: RequestStore | null, replay?: boolean, replayDelay?: number): {
|
|
1
|
+
import type { ConversationPatch, ExtraChatPayload, RequestStore } from "../shared/interfaces";
|
|
2
|
+
export declare function useConversationDetail(conversationId: string | null, initialRequest?: RequestStore | null, replay?: boolean, replayDelay?: number, onData?: (data: ConversationPatch) => void): {
|
|
3
3
|
conversation: import("../shared/interfaces").ConversationBaseDetail | null;
|
|
4
4
|
tasks: import("../shared/interfaces").Task[];
|
|
5
5
|
serviceFlows: import("../shared/interfaces").ServiceFlowRun[];
|
|
@@ -137,6 +137,7 @@ export interface ExtraChatPayload {
|
|
|
137
137
|
files?: UploadFileInfo[];
|
|
138
138
|
cmd?: CommandPayload | null;
|
|
139
139
|
aiEmployeeId?: string | null;
|
|
140
|
+
agentId?: string;
|
|
140
141
|
}
|
|
141
142
|
export interface GeneratedView {
|
|
142
143
|
viewId: string;
|
|
@@ -166,7 +167,7 @@ export interface ConversationError {
|
|
|
166
167
|
taskId?: string;
|
|
167
168
|
error?: string;
|
|
168
169
|
}
|
|
169
|
-
export type CommandPayload = CommandPayloadServiceFlowStart | CommandPayloadServiceFlowCreate | CommandPayloadServiceFlowEdit | CommandPayloadGoalPlan | CommandPayloadBusinessObjectManagement | CommandPayloadBusinessInstanceManagement | LegacyCommandPayloadServiceFlowStarting;
|
|
170
|
+
export type CommandPayload = CommandPayloadServiceFlowStart | CommandPayloadServiceFlowCreate | CommandPayloadServiceFlowEdit | CommandPayloadGoalPlan | CommandPayloadBusinessObjectManagement | CommandPayloadBusinessInstanceManagement | CommandPayloadSpaceConfig | LegacyCommandPayloadServiceFlowStarting;
|
|
170
171
|
export interface BaseCommandPayload {
|
|
171
172
|
type: string;
|
|
172
173
|
payload?: unknown;
|
|
@@ -180,6 +181,14 @@ export interface CommandPayloadServiceFlowStart extends BaseCommandPayload {
|
|
|
180
181
|
flowName?: string;
|
|
181
182
|
};
|
|
182
183
|
}
|
|
184
|
+
export interface CommandPayloadSpaceConfig extends BaseCommandPayload {
|
|
185
|
+
type: "space-config";
|
|
186
|
+
payload: {
|
|
187
|
+
spaceInstanceId: string;
|
|
188
|
+
ServiceObjectId?: string;
|
|
189
|
+
InstanceId?: string;
|
|
190
|
+
};
|
|
191
|
+
}
|
|
183
192
|
export interface CommandPayloadServiceFlowCreate extends BaseCommandPayload {
|
|
184
193
|
type: "serviceflow-create";
|
|
185
194
|
payload: {
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { GeneralIcon, GeneralIconProps } from "@next-bricks/icons/general-icon";
|
|
2
|
+
import type { Button, ButtonProps } from "@next-bricks/basic/button";
|
|
3
|
+
import type { Link, LinkProps } from "@next-bricks/basic/link";
|
|
4
|
+
import type { Drawer, DrawerProps, DrawerEvents, DrawerMapEvents } from "@next-bricks/containers/drawer";
|
|
5
|
+
import type { IconButton, IconButtonProps } from "../icon-button";
|
|
6
|
+
import { TagProps, Tag } from "@next-bricks/basic/tag";
|
|
7
|
+
import { Input, InputProps } from "@next-bricks/form/input";
|
|
8
|
+
export declare const WrappedIcon: import("@next-core/react-element").WrappedBrick<GeneralIcon, GeneralIconProps>;
|
|
9
|
+
export declare const WrappedButton: import("@next-core/react-element").WrappedBrick<Button, ButtonProps>;
|
|
10
|
+
export declare const WrappedLink: import("@next-core/react-element").WrappedBrick<Link, LinkProps>;
|
|
11
|
+
export declare const WrappedDrawer: import("@next-core/react-element").WrappedBrickWithEventsMap<Drawer, DrawerProps & {
|
|
12
|
+
keyboard?: boolean;
|
|
13
|
+
themeVariant?: "default" | "elevo";
|
|
14
|
+
}, DrawerEvents, DrawerMapEvents>;
|
|
15
|
+
export declare const WrappedIconButton: import("@next-core/react-element").WrappedBrick<IconButton, IconButtonProps>;
|
|
16
|
+
export declare const WrappedTag: import("@next-core/react-element").WrappedBrick<Tag, TagProps>;
|
|
17
|
+
export interface InputEvents {
|
|
18
|
+
change: CustomEvent<string>;
|
|
19
|
+
}
|
|
20
|
+
export interface InputEventsMap {
|
|
21
|
+
onValueChange: "change";
|
|
22
|
+
}
|
|
23
|
+
export declare const WrappedInput: import("@next-core/react-element").WrappedBrickWithEventsMap<Input, InputProps, InputEvents, InputEventsMap>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare enum K {
|
|
2
|
+
}
|
|
3
|
+
export declare const NS = "bricks/ai-portal/chat-panel-welcome";
|
|
4
|
+
export declare const locales: {
|
|
5
|
+
en: Locale;
|
|
6
|
+
zh: Locale;
|
|
7
|
+
};
|
|
8
|
+
export declare const t: any;
|
|
9
|
+
type Locale = {
|
|
10
|
+
[k in K]: string;
|
|
11
|
+
} & {
|
|
12
|
+
[k in K as `${k}_plural`]?: string;
|
|
13
|
+
};
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ReactNextElement } from "@next-core/react-element";
|
|
3
|
+
import "@next-core/theme";
|
|
4
|
+
export interface ChatPanelWelcomeProps {
|
|
5
|
+
text?: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* 构件 `ai-portal.chat-panel-welcome`
|
|
9
|
+
*/
|
|
10
|
+
export declare class ChatPanelWelcome extends ReactNextElement implements ChatPanelWelcomeProps {
|
|
11
|
+
accessor text: string | undefined;
|
|
12
|
+
render(): React.JSX.Element;
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface ActivityCardProps {
|
|
3
|
+
title: string;
|
|
4
|
+
description: string;
|
|
5
|
+
assignee?: string;
|
|
6
|
+
active?: boolean;
|
|
7
|
+
onClick?: () => void;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* 活动卡片组件
|
|
11
|
+
* 参考设计图: node-id=125-2527
|
|
12
|
+
* 展示活动名称、描述和负责人标签
|
|
13
|
+
*/
|
|
14
|
+
export declare function ActivityCard({ title, description, assignee, active, onClick, }: ActivityCardProps): React.ReactElement;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { Activity } from "../interfaces.js";
|
|
3
|
+
export interface ActivityDetailModalProps {
|
|
4
|
+
activity: Activity | null;
|
|
5
|
+
visible: boolean;
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
onChange?: (updates: Activity) => void;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* 活动详情模态框组件
|
|
11
|
+
* 展示活动的完整定义信息,部分字段可编辑(负责数字人、HITL介入用户)
|
|
12
|
+
*/
|
|
13
|
+
export declare function ActivityDetailModal({ activity: _activity, visible, onClose, onChange, }: ActivityDetailModalProps): React.ReactElement | null;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { BusinessFlow, Activity, ViewType } from "../interfaces";
|
|
3
|
+
export interface BusinessFlowPreviewProps {
|
|
4
|
+
data?: BusinessFlow;
|
|
5
|
+
viewType?: ViewType;
|
|
6
|
+
onActivityClick?: (activity: Activity) => void;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* 业务流预览组件
|
|
10
|
+
* 参考设计图: node-id=125-2527
|
|
11
|
+
* 展示业务流的标题、先决条件和按阶段分组的活动列表
|
|
12
|
+
*/
|
|
13
|
+
export declare function BusinessFlowPreview({ data, viewType, }: BusinessFlowPreviewProps): React.ReactElement | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "@testing-library/jest-dom";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { SpaceConfigSchema } from "../interfaces";
|
|
3
|
+
export declare enum TabType {
|
|
4
|
+
BUSINESS_OBJECTS = "businessObjects",
|
|
5
|
+
BUSINESS_FLOWS = "businessFlows"
|
|
6
|
+
}
|
|
7
|
+
interface BusinessManageProps {
|
|
8
|
+
configSchema: SpaceConfigSchema;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* 业务管理组件
|
|
12
|
+
* 包含业务对象/业务流列表区域和配置详情预览区域
|
|
13
|
+
*/
|
|
14
|
+
export declare function BusinessManage({ configSchema, }: BusinessManageProps): React.ReactElement;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "@testing-library/jest-dom";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { BusinessObject } from "../interfaces";
|
|
3
|
+
import { ViewType } from "../interfaces";
|
|
4
|
+
export interface BusinessObjectPreviewProps {
|
|
5
|
+
data?: BusinessObject;
|
|
6
|
+
viewType?: ViewType;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* 业务对象预览组件
|
|
10
|
+
* 参考设计图: node-id=125-1132
|
|
11
|
+
* 展示业务对象的标题、字段定义和生命周期状态
|
|
12
|
+
*/
|
|
13
|
+
export declare function BusinessObjectPreview({ data, viewType, }: BusinessObjectPreviewProps): React.ReactElement | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "@testing-library/jest-dom";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { BusinessObject, BusinessFlow, ViewType } from "../interfaces";
|
|
3
|
+
export interface ConfigPreviewProps {
|
|
4
|
+
businessObject?: BusinessObject | null;
|
|
5
|
+
businessFlow?: BusinessFlow | null;
|
|
6
|
+
viewType?: ViewType;
|
|
7
|
+
onViewTypeChange?: (viewType: ViewType) => void;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* 配置预览容器组件
|
|
11
|
+
* 参考设计图: node-id=125-1132, node-id=125-2022
|
|
12
|
+
* 提供 Visual/JSON 视图切换功能,显示业务对象或业务流详情
|
|
13
|
+
*/
|
|
14
|
+
export declare function ConfigPreview({ businessObject, businessFlow, viewType: externalViewType, onViewTypeChange, }: ConfigPreviewProps): React.ReactElement;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "@testing-library/jest-dom";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* EmptyState 组件 Props
|
|
4
|
+
*/
|
|
5
|
+
export interface EmptyStateProps {
|
|
6
|
+
icon?: React.ReactNode;
|
|
7
|
+
title: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* 空状态组件
|
|
13
|
+
* 用于展示无数据时的提示信息
|
|
14
|
+
*/
|
|
15
|
+
export declare function EmptyState({ icon, title, description, className, }: EmptyStateProps): React.ReactElement;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "@testing-library/jest-dom";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { SpaceConfigSchema, SpaceDetail } from "../../interfaces";
|
|
3
|
+
export interface SpaceConfigModalProps {
|
|
4
|
+
visible: boolean;
|
|
5
|
+
spaceDetail: SpaceDetail;
|
|
6
|
+
configSchema: SpaceConfigSchema;
|
|
7
|
+
aiEmployeeId?: string;
|
|
8
|
+
conversationId?: string;
|
|
9
|
+
onSave?: (data: SpaceConfigSchema) => void;
|
|
10
|
+
onCancel?: () => void;
|
|
11
|
+
}
|
|
12
|
+
export declare function SpaceConfigModal({ visible, spaceDetail, configSchema: initialConfigSchema, aiEmployeeId, onSave, onCancel, }: SpaceConfigModalProps): React.ReactElement;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "@testing-library/jest-dom";
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { Activity, SpaceConfigSchema } from "../../interfaces";
|
|
2
|
+
export declare function mergeConfigSchema(prevSchema: SpaceConfigSchema, currentEditSchema: SpaceConfigSchema): SpaceConfigSchema;
|
|
3
|
+
export declare function handleModifyActivity(prevSchema: SpaceConfigSchema, stageName: string, newActivity: Activity): SpaceConfigSchema;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist-types/space-workbench/components/{SpaceGuide/SpaceGuide.d.ts → SpaceGuide.d.ts}
RENAMED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { SpaceDetail } from "
|
|
2
|
+
import { SpaceDetail } from "../interfaces.js";
|
|
3
3
|
export interface GuideCard {
|
|
4
|
+
key: string;
|
|
4
5
|
icon: string;
|
|
5
6
|
background: string;
|
|
6
7
|
title: string;
|
|
7
8
|
description?: string;
|
|
9
|
+
iconContainerColor: "blue" | "orange" | "green";
|
|
8
10
|
}
|
|
9
11
|
export interface SpaceGuideProps {
|
|
10
12
|
onCardClick?: (cardIndex: number) => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "@testing-library/jest-dom";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { NoticeItem } from "
|
|
2
|
+
import { NoticeItem } from "../../notice-dropdown/index.jsx";
|
|
3
|
+
import { SpaceDetail } from "../interfaces.js";
|
|
3
4
|
export interface NoticeDropdownEvents {
|
|
4
5
|
"notice.click": CustomEvent<NoticeItem>;
|
|
5
6
|
"mark.all.read": CustomEvent<void>;
|
|
@@ -9,14 +10,14 @@ export interface NoticeDropdownMapping {
|
|
|
9
10
|
onMarkAllRead: "mark.all.read";
|
|
10
11
|
}
|
|
11
12
|
export interface SpaceNavProps {
|
|
12
|
-
|
|
13
|
+
spaceDetail: SpaceDetail;
|
|
13
14
|
notices?: NoticeItem[];
|
|
14
15
|
onBack: () => void;
|
|
15
16
|
onMembersClick: () => void;
|
|
16
17
|
notifyCenterUrl: string;
|
|
17
18
|
onMarkAllRead: () => void;
|
|
18
19
|
onNoticeClick: (notice: NoticeItem) => void;
|
|
19
|
-
description?: string;
|
|
20
20
|
onSpaceEdit?: () => void;
|
|
21
|
+
aiEmployeeId?: string;
|
|
21
22
|
}
|
|
22
23
|
export declare function SpaceNav(props: SpaceNavProps): React.JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "@testing-library/jest-dom";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { KnowledgeItem } from "../interfaces.js";
|
|
3
|
+
export interface KnowledgesListProps {
|
|
4
|
+
knowledges?: KnowledgeItem[];
|
|
5
|
+
onKnowledgeClick?: (knowledge: KnowledgeItem) => void;
|
|
6
|
+
onAddKnowledge?: () => void;
|
|
7
|
+
}
|
|
8
|
+
export declare function KnowledgesList(props: KnowledgesListProps): React.JSX.Element;
|
|
@@ -3,7 +3,57 @@ export declare enum K {
|
|
|
3
3
|
SPACE_GUIDE_SECTION_TITLE = "SPACE_GUIDE_SECTION_TITLE",
|
|
4
4
|
SPACE_GUIDE_CARD_1_TITLE = "SPACE_GUIDE_CARD_1_TITLE",
|
|
5
5
|
SPACE_GUIDE_CARD_2_TITLE = "SPACE_GUIDE_CARD_2_TITLE",
|
|
6
|
-
SPACE_GUIDE_CARD_3_TITLE = "SPACE_GUIDE_CARD_3_TITLE"
|
|
6
|
+
SPACE_GUIDE_CARD_3_TITLE = "SPACE_GUIDE_CARD_3_TITLE",
|
|
7
|
+
BUSINESS_OBJECTS = "BUSINESS_OBJECTS",
|
|
8
|
+
BUSINESS_FLOWS = "BUSINESS_FLOWS",
|
|
9
|
+
NO_BUSINESS_OBJECTS_FLOWS = "NO_BUSINESS_OBJECTS_FLOWS",
|
|
10
|
+
GUIDE_AI_TO_GENERATE_CONFIG = "GUIDE_AI_TO_GENERATE_CONFIG",
|
|
11
|
+
NO_CONFIGURATION_DATA = "NO_CONFIGURATION_DATA",
|
|
12
|
+
FIELD_DEFINITIONS = "FIELD_DEFINITIONS",
|
|
13
|
+
LIFECYCLE_STATUS = "LIFECYCLE_STATUS",
|
|
14
|
+
PREREQUISITES = "PREREQUISITES",
|
|
15
|
+
PREREQUISITES_SUBTITLE = "PREREQUISITES_SUBTITLE",
|
|
16
|
+
ACTIVITY_DESCRIPTION = "ACTIVITY_DESCRIPTION",
|
|
17
|
+
NO_DESCRIPTION = "NO_DESCRIPTION",
|
|
18
|
+
RESPONSIBLE_AI_EMPLOYEE = "RESPONSIBLE_AI_EMPLOYEE",
|
|
19
|
+
SELECT_AI_EMPLOYEE_PLACEHOLDER = "SELECT_AI_EMPLOYEE_PLACEHOLDER",
|
|
20
|
+
HITL_RULES = "HITL_RULES",
|
|
21
|
+
HITL_INTERVENTION_USER = "HITL_INTERVENTION_USER",
|
|
22
|
+
SELECT_HITL_USER_PLACEHOLDER = "SELECT_HITL_USER_PLACEHOLDER",
|
|
23
|
+
SPACE_CONFIGURATION = "SPACE_CONFIGURATION",
|
|
24
|
+
SAVE_CONFIGURATION = "SAVE_CONFIGURATION",
|
|
25
|
+
CANCEL = "CANCEL",
|
|
26
|
+
PLEASE_ENTER = "PLEASE_ENTER",
|
|
27
|
+
CONFIG_ASSISTANT_WELCOME = "CONFIG_ASSISTANT_WELCOME",
|
|
28
|
+
KNOWLEDGE = "KNOWLEDGE",
|
|
29
|
+
NO_KNOWLEDGE = "NO_KNOWLEDGE",
|
|
30
|
+
MINUTES_AGO = "MINUTES_AGO",
|
|
31
|
+
HOURS_AGO = "HOURS_AGO",
|
|
32
|
+
DAYS_AGO = "DAYS_AGO",
|
|
33
|
+
NEW_SESSION = "NEW_SESSION",
|
|
34
|
+
HISTORY_SESSIONS = "HISTORY_SESSIONS",
|
|
35
|
+
CLOSE_TAB = "CLOSE_TAB",
|
|
36
|
+
FLOW_SIDEBAR_TITLE = "FLOW_SIDEBAR_TITLE",
|
|
37
|
+
FLOW_SIDEBAR_SUBTITLE = "FLOW_SIDEBAR_SUBTITLE",
|
|
38
|
+
NO_HISTORY = "NO_HISTORY",
|
|
39
|
+
LOADING = "LOADING",
|
|
40
|
+
LOAD_MORE = "LOAD_MORE",
|
|
41
|
+
NO_BUSINESS_OBJECTS = "NO_BUSINESS_OBJECTS",
|
|
42
|
+
LOAD_FAILED = "LOAD_FAILED",
|
|
43
|
+
CLICK_TO_RETRY = "CLICK_TO_RETRY",
|
|
44
|
+
NO_INSTANCES = "NO_INSTANCES",
|
|
45
|
+
ADD_KNOWLEDGE = "ADD_KNOWLEDGE",
|
|
46
|
+
ADD_INSTANCE_MODAL_TITLE = "ADD_INSTANCE_MODAL_TITLE",
|
|
47
|
+
ADD_INSTANCE_ASSISTANT_WELCOME = "ADD_INSTANCE_ASSISTANT_WELCOME",
|
|
48
|
+
IDENTIFIED_INSTANCES = "IDENTIFIED_INSTANCES",
|
|
49
|
+
NO_INSTANCES_IDENTIFIED = "NO_INSTANCES_IDENTIFIED",
|
|
50
|
+
NO_INSTANCES_IDENTIFIED_DESCRIPTION = "NO_INSTANCES_IDENTIFIED_DESCRIPTION",
|
|
51
|
+
INSTANCE_DETAIL = "INSTANCE_DETAIL",
|
|
52
|
+
NO_DETAIL = "NO_DETAIL",
|
|
53
|
+
CONFIRM_CREATE = "CONFIRM_CREATE",
|
|
54
|
+
EDIT_INSTANCE = "EDIT_INSTANCE",
|
|
55
|
+
DELETE_INSTANCE = "DELETE_INSTANCE",
|
|
56
|
+
NO_DETAIL_HINT = "NO_DETAIL_HINT"
|
|
7
57
|
}
|
|
8
58
|
export declare const NS = "bricks/ai-portal/space-workbench";
|
|
9
59
|
export declare const locales: {
|
|
@@ -3,3 +3,122 @@ export interface SpaceDetail {
|
|
|
3
3
|
instanceId: string;
|
|
4
4
|
description: string;
|
|
5
5
|
}
|
|
6
|
+
export interface Knowledge {
|
|
7
|
+
instanceId: string;
|
|
8
|
+
name: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
time?: number;
|
|
11
|
+
user?: string;
|
|
12
|
+
openApiUrl?: string;
|
|
13
|
+
state?: string;
|
|
14
|
+
content?: string;
|
|
15
|
+
}
|
|
16
|
+
export type AttributeType = "string" | "text" | "int" | "float" | "bool" | "date" | "datetime" | "file" | "enum";
|
|
17
|
+
export interface Attribute {
|
|
18
|
+
id: string;
|
|
19
|
+
name: string;
|
|
20
|
+
description: string;
|
|
21
|
+
required: boolean;
|
|
22
|
+
type: AttributeType;
|
|
23
|
+
isArray?: boolean;
|
|
24
|
+
}
|
|
25
|
+
interface ObjectRelation {
|
|
26
|
+
relation_id: string;
|
|
27
|
+
name: string;
|
|
28
|
+
description: string;
|
|
29
|
+
left_object_id: string;
|
|
30
|
+
right_object_id: string;
|
|
31
|
+
left_id: string;
|
|
32
|
+
right_id: string;
|
|
33
|
+
}
|
|
34
|
+
export interface BusinessObject {
|
|
35
|
+
objectId: string;
|
|
36
|
+
objectName: string;
|
|
37
|
+
description: string;
|
|
38
|
+
lifecycle?: string;
|
|
39
|
+
attributes?: Attribute[];
|
|
40
|
+
relations?: ObjectRelation[];
|
|
41
|
+
}
|
|
42
|
+
export interface BusinessFlow {
|
|
43
|
+
instanceId: string;
|
|
44
|
+
name: string;
|
|
45
|
+
description: string;
|
|
46
|
+
prerequisite?: string;
|
|
47
|
+
needConfirm?: boolean;
|
|
48
|
+
spec?: Spec[];
|
|
49
|
+
}
|
|
50
|
+
export interface Activity {
|
|
51
|
+
aiEmployeeId: string;
|
|
52
|
+
description: string;
|
|
53
|
+
hilRules?: string;
|
|
54
|
+
hilUser?: string;
|
|
55
|
+
name: string;
|
|
56
|
+
}
|
|
57
|
+
interface Spec {
|
|
58
|
+
name: string;
|
|
59
|
+
serviceFlowActivities?: Activity[];
|
|
60
|
+
}
|
|
61
|
+
export interface SpaceConfigSchema {
|
|
62
|
+
businessObjects: BusinessObject[];
|
|
63
|
+
objectRelations: ObjectRelation[];
|
|
64
|
+
businessFlows: BusinessFlow[];
|
|
65
|
+
deleteObjects?: string[];
|
|
66
|
+
deleteRelations?: string[];
|
|
67
|
+
deleteFlows?: string[];
|
|
68
|
+
}
|
|
69
|
+
export type ViewType = "visual" | "json";
|
|
70
|
+
export interface BusinessObjectGroup {
|
|
71
|
+
objectId: string;
|
|
72
|
+
objectName: string;
|
|
73
|
+
instances: BusinessInstance[];
|
|
74
|
+
}
|
|
75
|
+
export interface BusinessInstance {
|
|
76
|
+
instanceId: string;
|
|
77
|
+
name?: string;
|
|
78
|
+
status?: string;
|
|
79
|
+
mtime: number;
|
|
80
|
+
ctime: number;
|
|
81
|
+
[key: string]: any;
|
|
82
|
+
}
|
|
83
|
+
export interface KnowledgeItem {
|
|
84
|
+
/** 文档实例ID(主键) */
|
|
85
|
+
instanceId?: string;
|
|
86
|
+
/** 文档名称 */
|
|
87
|
+
name?: string;
|
|
88
|
+
/** 文档描述 */
|
|
89
|
+
description?: string;
|
|
90
|
+
/** 所属elevo项目ID */
|
|
91
|
+
projectId?: string;
|
|
92
|
+
/** 文档内容(与openApiUrl二选一) */
|
|
93
|
+
content?: string;
|
|
94
|
+
/** OpenAPI文档URL(与content二选一) */
|
|
95
|
+
openApiUrl?: string;
|
|
96
|
+
/** 何时使用该知识的描述 */
|
|
97
|
+
useCondition?: string;
|
|
98
|
+
/** 状态,可选值:active, inactive */
|
|
99
|
+
state?: string;
|
|
100
|
+
/** 知识片段数量 */
|
|
101
|
+
knowledgeCount?: number;
|
|
102
|
+
/** 创建者 */
|
|
103
|
+
creator?: string;
|
|
104
|
+
/** 创建时间 */
|
|
105
|
+
ctime?: string;
|
|
106
|
+
/** 修改时间 */
|
|
107
|
+
mtime?: string;
|
|
108
|
+
/** 修改者 */
|
|
109
|
+
modifier?: string;
|
|
110
|
+
}
|
|
111
|
+
export interface InstanceSchema {
|
|
112
|
+
objectId?: string;
|
|
113
|
+
imports?: InstanceItem[];
|
|
114
|
+
deletes?: string[];
|
|
115
|
+
}
|
|
116
|
+
export interface InstanceItem {
|
|
117
|
+
/** 前端管理用的唯一标识 ID */
|
|
118
|
+
_id_: string;
|
|
119
|
+
/** 实例 ID(编辑时存在,新增时可能为空) */
|
|
120
|
+
instanceId?: string;
|
|
121
|
+
/** 实例属性数据 */
|
|
122
|
+
[key: string]: any;
|
|
123
|
+
}
|
|
124
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { SpaceDetail } from "./interfaces";
|
|
2
|
+
import type { UploadOptions } from "../shared/interfaces";
|
|
3
|
+
interface WorkbenchContextProps {
|
|
4
|
+
spaceDetail: SpaceDetail;
|
|
5
|
+
uploadOptions?: UploadOptions;
|
|
6
|
+
}
|
|
7
|
+
export declare const WorkbenchContext: React.Context<WorkbenchContextProps>;
|
|
8
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@next-bricks/ai-portal",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.68.0",
|
|
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": "
|
|
52
|
+
"gitHead": "fd4d99bfd786aec3cb54aa1dbc30f50657a3d16b"
|
|
53
53
|
}
|