@next-bricks/ai-portal 0.63.0 → 0.63.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.
- package/dist/bricks.json +50 -50
- package/dist/chunks/1447.1763ddd6.js +2 -0
- package/dist/chunks/1447.1763ddd6.js.map +1 -0
- package/dist/chunks/2028.81962baa.js +3 -0
- package/dist/chunks/2028.81962baa.js.map +1 -0
- package/dist/chunks/3363.d64d8e2a.js +2 -0
- package/dist/chunks/3363.d64d8e2a.js.map +1 -0
- package/dist/chunks/4208.f9256bec.js +2 -0
- package/dist/chunks/4208.f9256bec.js.map +1 -0
- package/dist/chunks/4820.16e00935.js +2 -0
- package/dist/chunks/4820.16e00935.js.map +1 -0
- package/dist/chunks/7059.e3cef2d5.js +3 -0
- package/dist/chunks/7059.e3cef2d5.js.map +1 -0
- package/dist/chunks/778.85eedde5.js +2 -0
- package/dist/chunks/778.85eedde5.js.map +1 -0
- package/dist/chunks/9273.fbb69eb2.js +2 -0
- package/dist/chunks/{9273.3d1a73c8.js.map → 9273.fbb69eb2.js.map} +1 -1
- package/dist/chunks/chat-panel.9a58a43d.js +2 -0
- package/dist/chunks/chat-panel.9a58a43d.js.map +1 -0
- package/dist/chunks/chat-stream.c13cfc3f.js +2 -0
- package/dist/chunks/chat-stream.c13cfc3f.js.map +1 -0
- package/dist/chunks/elevo-sidebar.78a35f1d.js.map +1 -1
- package/dist/chunks/icon-button.545ffb24.js +2 -0
- package/dist/chunks/icon-button.545ffb24.js.map +1 -0
- package/dist/chunks/main.7105f876.js +2 -0
- package/dist/chunks/{main.3021b8e8.js.map → main.7105f876.js.map} +1 -1
- package/dist/examples.json +23 -23
- package/dist/index.4db426c8.js +2 -0
- package/dist/index.4db426c8.js.map +1 -0
- package/dist/manifest.json +383 -352
- package/dist/types.json +3269 -2531
- package/dist-types/chat-panel/index.d.ts +8 -3
- package/dist-types/elevo-sidebar/SpaceNav.d.ts +2 -1
- package/dist-types/elevo-sidebar/constants.d.ts +1 -0
- package/dist-types/elevo-sidebar/i18n.d.ts +2 -1
- package/dist-types/elevo-sidebar/index.d.ts +1 -0
- package/dist-types/elevo-sidebar/useNavLinkActive.d.ts +1 -0
- package/dist-types/icon-button/index.d.ts +2 -0
- package/dist-types/jsx.d.ts +1 -0
- package/dist-types/shared/FilePreview/FilePreview.d.ts +2 -1
- package/dist-types/shared/FilePreview/ImagesPreview.d.ts +2 -1
- package/docs/chat-panel.md +19 -3
- package/package.json +2 -2
- package/dist/chunks/4820.15145a03.js +0 -2
- package/dist/chunks/4820.15145a03.js.map +0 -1
- package/dist/chunks/6665.b5b39ef8.js +0 -2
- package/dist/chunks/6665.b5b39ef8.js.map +0 -1
- package/dist/chunks/689.11701509.js +0 -3
- package/dist/chunks/689.11701509.js.map +0 -1
- package/dist/chunks/7059.ee6fc15b.js +0 -3
- package/dist/chunks/7059.ee6fc15b.js.map +0 -1
- package/dist/chunks/7609.13366989.js +0 -2
- package/dist/chunks/7609.13366989.js.map +0 -1
- package/dist/chunks/778.b1fd7b4c.js +0 -2
- package/dist/chunks/778.b1fd7b4c.js.map +0 -1
- package/dist/chunks/8730.509db084.js +0 -2
- package/dist/chunks/8730.509db084.js.map +0 -1
- package/dist/chunks/9273.3d1a73c8.js +0 -2
- package/dist/chunks/chat-panel.a64e0e43.js +0 -2
- package/dist/chunks/chat-panel.a64e0e43.js.map +0 -1
- package/dist/chunks/chat-stream.a35fa156.js +0 -2
- package/dist/chunks/chat-stream.a35fa156.js.map +0 -1
- package/dist/chunks/icon-button.66d6d83a.js +0 -2
- package/dist/chunks/icon-button.66d6d83a.js.map +0 -1
- package/dist/chunks/main.3021b8e8.js +0 -2
- package/dist/index.eb7fcf13.js +0 -2
- package/dist/index.eb7fcf13.js.map +0 -1
- /package/dist/chunks/{689.11701509.js.LICENSE.txt → 2028.81962baa.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{7059.ee6fc15b.js.LICENSE.txt → 7059.e3cef2d5.js.LICENSE.txt} +0 -0
|
@@ -1,26 +1,31 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { ReactNextElement } from "@next-core/react-element";
|
|
3
3
|
import "@next-core/theme";
|
|
4
|
-
import type { UploadOptions } from "../shared/interfaces";
|
|
4
|
+
import type { ChatPayload, CommandPayload, FileInfo, UploadOptions } from "../shared/interfaces";
|
|
5
5
|
export interface ChatPanelProps {
|
|
6
6
|
panelTitle?: string;
|
|
7
|
-
|
|
7
|
+
aiEmployeeId?: string;
|
|
8
|
+
cmd?: CommandPayload;
|
|
8
9
|
width?: string | number;
|
|
9
10
|
height?: string | number;
|
|
10
11
|
placeholder?: string;
|
|
11
12
|
uploadOptions?: UploadOptions;
|
|
12
13
|
}
|
|
13
14
|
/**
|
|
14
|
-
*
|
|
15
|
+
* 弹出式对话面板。
|
|
15
16
|
*/
|
|
16
17
|
export declare class ChatPanel extends ReactNextElement implements ChatPanelProps {
|
|
17
18
|
#private;
|
|
18
19
|
accessor panelTitle: string | undefined;
|
|
20
|
+
accessor aiEmployeeId: string | undefined;
|
|
21
|
+
accessor cmd: CommandPayload | undefined;
|
|
19
22
|
accessor width: string | number | undefined;
|
|
20
23
|
accessor height: string | number | undefined;
|
|
21
24
|
accessor placeholder: string | undefined;
|
|
22
25
|
accessor uploadOptions: UploadOptions | undefined;
|
|
23
26
|
open(): void;
|
|
24
27
|
close(): void;
|
|
28
|
+
send(payload: ChatPayload): void;
|
|
29
|
+
showFile(file: FileInfo): void;
|
|
25
30
|
render(): React.JSX.Element;
|
|
26
31
|
}
|
|
@@ -2,6 +2,7 @@ import React from "react";
|
|
|
2
2
|
import type { SidebarLink } from "./interfaces.js";
|
|
3
3
|
export interface SpaceNavProps {
|
|
4
4
|
returnUrl: string;
|
|
5
|
+
introUrl: string;
|
|
5
6
|
spaceDetail: {
|
|
6
7
|
instanceId: string;
|
|
7
8
|
name: string;
|
|
@@ -13,4 +14,4 @@ export interface SpaceNavProps {
|
|
|
13
14
|
export interface SpaceNavComponentProps extends SpaceNavProps {
|
|
14
15
|
onAddServiceflow?: () => void;
|
|
15
16
|
}
|
|
16
|
-
export declare function SpaceNav({ returnUrl, spaceDetail, spaceObjects, spaceServiceflows, spaceLinks, onAddServiceflow, }: SpaceNavComponentProps): React.JSX.Element;
|
|
17
|
+
export declare function SpaceNav({ returnUrl, introUrl, spaceDetail, spaceObjects, spaceServiceflows, spaceLinks, onAddServiceflow, }: SpaceNavComponentProps): React.JSX.Element;
|
|
@@ -16,7 +16,8 @@ export declare enum K {
|
|
|
16
16
|
BUSINESS_OBJECTS = "BUSINESS_OBJECTS",
|
|
17
17
|
SERVICEFLOWS = "SERVICEFLOWS",
|
|
18
18
|
COLLABORATION_SPACES = "COLLABORATION_SPACES",
|
|
19
|
-
CREATE_SERVICEFLOW = "CREATE_SERVICEFLOW"
|
|
19
|
+
CREATE_SERVICEFLOW = "CREATE_SERVICEFLOW",
|
|
20
|
+
BUSINESS_OBJECTS_SETTINGS = "BUSINESS_OBJECTS_SETTINGS"
|
|
20
21
|
}
|
|
21
22
|
export declare const NS = "bricks/ai-portal/elevo-sidebar";
|
|
22
23
|
export declare const locales: {
|
|
@@ -5,6 +5,7 @@ import type { ActionType } from "@next-bricks/basic/mini-actions";
|
|
|
5
5
|
import { type ActionClickDetail, type Project, type ProjectActionClickDetail } from "./ChatHistory.js";
|
|
6
6
|
import type { SidebarLink } from "./interfaces.js";
|
|
7
7
|
import { type SpaceNavProps } from "./SpaceNav.js";
|
|
8
|
+
export type { SidebarLink, SpaceNavProps };
|
|
8
9
|
export interface ElevoSidebarProps {
|
|
9
10
|
userInstanceId?: string;
|
|
10
11
|
behavior?: "default" | "drawer";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useNavLinkActive(url: string | null | undefined, activeIncludes?: string[]): boolean;
|
|
@@ -6,6 +6,7 @@ export interface IconButtonProps {
|
|
|
6
6
|
icon?: GeneralIconProps & HTMLAttributes<GeneralIcon>;
|
|
7
7
|
tooltip?: string;
|
|
8
8
|
tooltipHoist?: boolean;
|
|
9
|
+
active?: boolean;
|
|
9
10
|
disabled?: boolean;
|
|
10
11
|
variant?: IconButtonVariant;
|
|
11
12
|
reduceIconSize?: boolean;
|
|
@@ -18,6 +19,7 @@ export declare class IconButton extends ReactNextElement implements IconButtonPr
|
|
|
18
19
|
accessor icon: (GeneralIconProps & HTMLAttributes<GeneralIcon>) | undefined;
|
|
19
20
|
accessor tooltip: string | undefined;
|
|
20
21
|
accessor tooltipHoist: boolean | undefined;
|
|
22
|
+
accessor active: boolean | undefined;
|
|
21
23
|
accessor disabled: boolean | undefined;
|
|
22
24
|
accessor variant: IconButtonVariant | undefined;
|
|
23
25
|
/** 是否缩小图标尺寸(部分 easyops 图标过大) */
|
package/dist-types/jsx.d.ts
CHANGED
|
@@ -80,6 +80,7 @@ declare global {
|
|
|
80
80
|
onAddProject?: () => void;
|
|
81
81
|
onActionClick?: (event: CustomEvent<ActionClickDetail>) => void;
|
|
82
82
|
onProjectActionClick?: (event: CustomEvent<ProjectActionClickDetail>) => void;
|
|
83
|
+
onAddServiceflow?: (event: CustomEvent<void>) => void;
|
|
83
84
|
onPersonalActionClick?: (event: CustomEvent<PersonalActionClickDetail>) => void;
|
|
84
85
|
};
|
|
85
86
|
"ai-portal--flow-tabs": DetailedHTMLProps<HTMLAttributes<FlowTabs>, FlowTabs> & FlowTabsProps & {
|
|
@@ -2,5 +2,6 @@ import React from "react";
|
|
|
2
2
|
import type { FileInfo } from "../../shared/interfaces";
|
|
3
3
|
export interface FilePreviewProps {
|
|
4
4
|
file: FileInfo;
|
|
5
|
+
fromModal?: boolean;
|
|
5
6
|
}
|
|
6
|
-
export declare function FilePreview({ file }: FilePreviewProps): React.JSX.Element;
|
|
7
|
+
export declare function FilePreview({ file, fromModal }: FilePreviewProps): React.JSX.Element;
|
|
@@ -2,5 +2,6 @@ import React from "react";
|
|
|
2
2
|
import type { ActiveImages } from "../interfaces";
|
|
3
3
|
export interface ImagesPreviewProps {
|
|
4
4
|
images: ActiveImages;
|
|
5
|
+
fromModal?: boolean;
|
|
5
6
|
}
|
|
6
|
-
export declare function ImagesPreview({ images: { files, file } }: ImagesPreviewProps): React.JSX.Element;
|
|
7
|
+
export declare function ImagesPreview({ images: { files, file }, fromModal, }: ImagesPreviewProps): React.JSX.Element;
|
package/docs/chat-panel.md
CHANGED
|
@@ -1,11 +1,27 @@
|
|
|
1
1
|
构件 `ai-portal.chat-panel`
|
|
2
2
|
|
|
3
|
+
## 介绍
|
|
4
|
+
|
|
5
|
+
弹出式 AI 对话面板,提供一个模态框样式的聊天界面,支持与 AI 助手进行对话交互。
|
|
6
|
+
|
|
3
7
|
## Examples
|
|
4
8
|
|
|
5
9
|
### Basic
|
|
6
10
|
|
|
7
11
|
```yaml preview
|
|
8
|
-
brick:
|
|
9
|
-
properties:
|
|
10
|
-
|
|
12
|
+
- brick: eo-button
|
|
13
|
+
properties:
|
|
14
|
+
themeVariant: elevo
|
|
15
|
+
textContent: 打开对话面板
|
|
16
|
+
events:
|
|
17
|
+
click:
|
|
18
|
+
target: "#chatPanel"
|
|
19
|
+
method: open
|
|
20
|
+
- brick: ai-portal.chat-panel
|
|
21
|
+
properties:
|
|
22
|
+
id: chatPanel
|
|
23
|
+
width: 600
|
|
24
|
+
height: 800
|
|
25
|
+
panelTitle: AI 助手
|
|
26
|
+
placeholder: 请输入您的问题...
|
|
11
27
|
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@next-bricks/ai-portal",
|
|
3
|
-
"version": "0.63.
|
|
3
|
+
"version": "0.63.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": "
|
|
52
|
+
"gitHead": "afb3515bbe0f27c73168c1e8f09311ce4ec61671"
|
|
53
53
|
}
|