@next-bricks/ai-portal 0.65.8 → 0.67.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 +53 -39
- package/dist/chunks/1750.ba9f8f80.js +2 -0
- package/dist/chunks/1750.ba9f8f80.js.map +1 -0
- package/dist/chunks/chat-box.060b8727.js +3 -0
- package/dist/chunks/chat-box.060b8727.js.map +1 -0
- package/dist/chunks/{main.aced41aa.js → main.659aac54.js} +2 -2
- package/dist/chunks/{main.aced41aa.js.map → main.659aac54.js.map} +1 -1
- package/dist/chunks/set-chat-mentioned-employee.69199eec.js +2 -0
- package/dist/chunks/set-chat-mentioned-employee.69199eec.js.map +1 -0
- package/dist/chunks/space-logo.994f7a25.js +2 -0
- package/dist/chunks/space-logo.994f7a25.js.map +1 -0
- package/dist/chunks/space-workbench.964b8644.js +2 -0
- package/dist/chunks/space-workbench.964b8644.js.map +1 -0
- package/dist/examples.json +17 -14
- package/dist/images/2f7ddbac.svg +6 -0
- package/dist/{index.0efd927c.js → index.bdb0052a.js} +2 -2
- package/dist/index.bdb0052a.js.map +1 -0
- package/dist/manifest.json +379 -307
- package/dist/types.json +515 -218
- package/dist-types/bootstrap.d.ts +3 -0
- package/dist-types/data-providers/set-chat-mentioned-employee.d.ts +7 -0
- package/dist-types/data-providers/set-chat-mentioned-employee.spec.d.ts +1 -0
- package/dist-types/space-workbench/components/SpaceGuide/SpaceGuide.d.ts +13 -0
- package/dist-types/space-workbench/components/SpaceGuide/SpaceGuide.spec.d.ts +1 -0
- package/dist-types/space-workbench/components/SpaceNav/SpaceNav.d.ts +22 -0
- package/dist-types/space-workbench/components/SpaceNav/SpaceNav.spec.d.ts +1 -0
- package/dist-types/space-workbench/i18n.d.ts +19 -0
- package/dist-types/space-workbench/index.d.ts +20 -0
- package/dist-types/space-workbench/index.spec.d.ts +1 -0
- package/dist-types/space-workbench/interfaces.d.ts +5 -0
- package/dist-types/space-workbench/space-logo/index.d.ts +15 -0
- package/dist-types/space-workbench/space-logo/index.spec.d.ts +1 -0
- package/docs/space-workbench.md +78 -0
- package/package.json +2 -2
- package/dist/chunks/2742.64fa013f.js +0 -2
- package/dist/chunks/2742.64fa013f.js.map +0 -1
- package/dist/chunks/chat-box.3ae83b4f.js +0 -3
- package/dist/chunks/chat-box.3ae83b4f.js.map +0 -1
- package/dist/index.0efd927c.js.map +0 -1
- /package/dist/chunks/{chat-box.3ae83b4f.js.LICENSE.txt → chat-box.060b8727.js.LICENSE.txt} +0 -0
|
@@ -29,7 +29,10 @@ import "./elevo-card/index.js";
|
|
|
29
29
|
import "./flow-tabs/index.js";
|
|
30
30
|
import "./stage-flow/index.js";
|
|
31
31
|
import "./data-providers/set-chat-command.js";
|
|
32
|
+
import "./data-providers/set-chat-mentioned-employee.js";
|
|
32
33
|
import "./running-flow/index.js";
|
|
33
34
|
import "./notice-dropdown/index.js";
|
|
34
35
|
import "./notice-list/index.js";
|
|
35
36
|
import "./chat-panel/index.js";
|
|
37
|
+
import "./space-workbench/space-logo/index.js";
|
|
38
|
+
import "./space-workbench/index.js";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
interface ChatMentionedEmployee {
|
|
2
|
+
name: string;
|
|
3
|
+
employeeId: string;
|
|
4
|
+
}
|
|
5
|
+
export declare function setChatMentionedEmployee(chatMentionedEmployee: ChatMentionedEmployee | null): void;
|
|
6
|
+
export declare function getChatMentionedEmployee(): ChatMentionedEmployee | null;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { SpaceDetail } from "../../interfaces.js";
|
|
3
|
+
export interface GuideCard {
|
|
4
|
+
icon: string;
|
|
5
|
+
background: string;
|
|
6
|
+
title: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface SpaceGuideProps {
|
|
10
|
+
onCardClick?: (cardIndex: number) => void;
|
|
11
|
+
spaceDetail: SpaceDetail;
|
|
12
|
+
}
|
|
13
|
+
export declare function SpaceGuide(props: SpaceGuideProps): React.JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "@testing-library/jest-dom";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { NoticeItem } from "../../../notice-dropdown/index.jsx";
|
|
3
|
+
export interface NoticeDropdownEvents {
|
|
4
|
+
"notice.click": CustomEvent<NoticeItem>;
|
|
5
|
+
"mark.all.read": CustomEvent<void>;
|
|
6
|
+
}
|
|
7
|
+
export interface NoticeDropdownMapping {
|
|
8
|
+
onNoticeClick: "notice.click";
|
|
9
|
+
onMarkAllRead: "mark.all.read";
|
|
10
|
+
}
|
|
11
|
+
export interface SpaceNavProps {
|
|
12
|
+
spaceName: string;
|
|
13
|
+
notices?: NoticeItem[];
|
|
14
|
+
onBack: () => void;
|
|
15
|
+
onMembersClick: () => void;
|
|
16
|
+
notifyCenterUrl: string;
|
|
17
|
+
onMarkAllRead: () => void;
|
|
18
|
+
onNoticeClick: (notice: NoticeItem) => void;
|
|
19
|
+
description?: string;
|
|
20
|
+
onSpaceEdit?: () => void;
|
|
21
|
+
}
|
|
22
|
+
export declare function SpaceNav(props: SpaceNavProps): React.JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "@testing-library/jest-dom";
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare enum K {
|
|
2
|
+
DESCRIPTION = "DESCRIPTION",
|
|
3
|
+
SPACE_GUIDE_SECTION_TITLE = "SPACE_GUIDE_SECTION_TITLE",
|
|
4
|
+
SPACE_GUIDE_CARD_1_TITLE = "SPACE_GUIDE_CARD_1_TITLE",
|
|
5
|
+
SPACE_GUIDE_CARD_2_TITLE = "SPACE_GUIDE_CARD_2_TITLE",
|
|
6
|
+
SPACE_GUIDE_CARD_3_TITLE = "SPACE_GUIDE_CARD_3_TITLE"
|
|
7
|
+
}
|
|
8
|
+
export declare const NS = "bricks/ai-portal/space-workbench";
|
|
9
|
+
export declare const locales: {
|
|
10
|
+
en: Locale;
|
|
11
|
+
zh: Locale;
|
|
12
|
+
};
|
|
13
|
+
export declare const t: any;
|
|
14
|
+
type Locale = {
|
|
15
|
+
[k in K]: string;
|
|
16
|
+
} & {
|
|
17
|
+
[k in K as `${k}_plural`]?: string;
|
|
18
|
+
};
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ReactNextElement } from "@next-core/react-element";
|
|
3
|
+
import "@next-core/theme";
|
|
4
|
+
import type { NoticeItem } from "../notice-dropdown/index.js";
|
|
5
|
+
import { SpaceDetail } from "./interfaces.js";
|
|
6
|
+
export interface SpaceWorkbenchProps {
|
|
7
|
+
notifyCenterUrl: string;
|
|
8
|
+
spaceDetail: SpaceDetail;
|
|
9
|
+
notices?: NoticeItem[];
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* 构件 `ai-portal.space-workbench`
|
|
13
|
+
*/
|
|
14
|
+
export declare class SpaceWorkbench extends ReactNextElement implements SpaceWorkbenchProps {
|
|
15
|
+
#private;
|
|
16
|
+
accessor notices: NoticeItem[] | undefined;
|
|
17
|
+
accessor spaceDetail: SpaceDetail;
|
|
18
|
+
accessor notifyCenterUrl: string;
|
|
19
|
+
render(): React.JSX.Element;
|
|
20
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ReactNextElement } from "@next-core/react-element";
|
|
3
|
+
import "@next-core/theme";
|
|
4
|
+
export interface SpaceLogoProps {
|
|
5
|
+
size?: number;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* 构件 `ai-portal.space-logo`
|
|
9
|
+
*
|
|
10
|
+
* 协作空间的 Logo 展示组件
|
|
11
|
+
*/
|
|
12
|
+
export declare class SpaceLogo extends ReactNextElement implements SpaceLogoProps {
|
|
13
|
+
accessor size: number | undefined;
|
|
14
|
+
render(): React.JSX.Element;
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./";
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
构件 `ai-portal.space-workbench`
|
|
2
|
+
|
|
3
|
+
空间工作台构件,用于展示空间的顶部导航栏,包括空间信息、成员管理、消息通知等功能。
|
|
4
|
+
|
|
5
|
+
## Examples
|
|
6
|
+
|
|
7
|
+
### 基础使用
|
|
8
|
+
|
|
9
|
+
```yaml preview
|
|
10
|
+
brick: ai-portal.space-workbench
|
|
11
|
+
properties:
|
|
12
|
+
spaceDetail:
|
|
13
|
+
name: "产品设计空间"
|
|
14
|
+
instanceId: "space-001"
|
|
15
|
+
description: "这是一个用于产品设计协作的空间"
|
|
16
|
+
notifyCenterUrl: "/notify-center"
|
|
17
|
+
notices:
|
|
18
|
+
- id: "msg-1"
|
|
19
|
+
isRead: false
|
|
20
|
+
type: "project"
|
|
21
|
+
title: "协作流【研发设计】已完成"
|
|
22
|
+
- id: "msg-2"
|
|
23
|
+
isRead: false
|
|
24
|
+
type: "space"
|
|
25
|
+
title: "协作流【协作流名称】 - 【活动名称】需要人工确认"
|
|
26
|
+
- id: "msg-3"
|
|
27
|
+
type: "account"
|
|
28
|
+
isRead: true
|
|
29
|
+
title: "【项目协作功能】已发布"
|
|
30
|
+
events:
|
|
31
|
+
go.back:
|
|
32
|
+
action: console.log
|
|
33
|
+
args:
|
|
34
|
+
- "点击了返回按钮"
|
|
35
|
+
members.click:
|
|
36
|
+
action: console.log
|
|
37
|
+
args:
|
|
38
|
+
- "点击了成员按钮"
|
|
39
|
+
notice.click:
|
|
40
|
+
action: console.log
|
|
41
|
+
args:
|
|
42
|
+
- "点击了消息:"
|
|
43
|
+
- "<% EVENT.detail %>"
|
|
44
|
+
mark.all.read:
|
|
45
|
+
action: console.log
|
|
46
|
+
args:
|
|
47
|
+
- "点击了全部已读"
|
|
48
|
+
space.edit:
|
|
49
|
+
action: console.log
|
|
50
|
+
args:
|
|
51
|
+
- "点击了编辑空间"
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### 无消息通知
|
|
55
|
+
|
|
56
|
+
```yaml preview
|
|
57
|
+
brick: ai-portal.space-workbench
|
|
58
|
+
properties:
|
|
59
|
+
spaceDetail:
|
|
60
|
+
name: "研发协作空间"
|
|
61
|
+
instanceId: "space-002"
|
|
62
|
+
description: "研发团队的协作空间"
|
|
63
|
+
notifyCenterUrl: "/notify-center"
|
|
64
|
+
notices: []
|
|
65
|
+
events:
|
|
66
|
+
go.back:
|
|
67
|
+
action: console.log
|
|
68
|
+
args:
|
|
69
|
+
- "返回"
|
|
70
|
+
members.click:
|
|
71
|
+
action: console.log
|
|
72
|
+
args:
|
|
73
|
+
- "查看成员"
|
|
74
|
+
space.edit:
|
|
75
|
+
action: console.log
|
|
76
|
+
args:
|
|
77
|
+
- "编辑空间"
|
|
78
|
+
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@next-bricks/ai-portal",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.67.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": "d33d010fa68431ce74935b11ed96b109260255d9"
|
|
53
53
|
}
|