@ray-js/t-agent-ui-ray 0.2.8-beta.2 → 0.2.8-beta.4
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/README-zh_CN.md +337 -87
- package/README.md +916 -706
- package/dist/PrivateImage/index.js +7 -10
- package/dist/tiles/BubbleTile/index.d.ts +15 -1
- package/dist/tiles/BubbleTile/index.js +60 -68
- package/dist/tiles/BubbleToolTile/audio-play.svg +1 -0
- package/dist/tiles/BubbleToolTile/audio-playing.svg +24 -0
- package/dist/tiles/BubbleToolTile/copy.svg +1 -0
- package/dist/tiles/BubbleToolTile/index.d.ts +10 -0
- package/dist/tiles/BubbleToolTile/index.js +63 -0
- package/dist/tiles/BubbleToolTile/index.less +46 -0
- package/dist/tiles/TimeTile/index.js +17 -16
- package/dist/tiles/map.js +3 -3
- package/dist/utils/getMessageContent.d.ts +11 -0
- package/dist/utils/getMessageContent.js +49 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +2 -1
- package/package.json +2 -3
- package/dist/tiles/WorkflowTile/RollBack/index.d.ts +0 -5
- package/dist/tiles/WorkflowTile/RollBack/index.js +0 -27
- package/dist/tiles/WorkflowTile/RollBack/index.less +0 -20
- package/dist/tiles/WorkflowTile/RollBack/workflow-rollback.png +0 -0
- package/dist/tiles/WorkflowTile/index.d.ts +0 -21
- package/dist/tiles/WorkflowTile/index.js +0 -32
- package/dist/tiles/WorkflowTile/index.less +0 -31
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import './index.less';
|
|
3
|
-
import { TileProps } from '../../types';
|
|
4
|
-
export interface WorkflowOption {
|
|
5
|
-
name: string;
|
|
6
|
-
value: string;
|
|
7
|
-
}
|
|
8
|
-
type WorkflowTileEventPayload = {
|
|
9
|
-
type: 'select';
|
|
10
|
-
option: WorkflowOption;
|
|
11
|
-
selected: number;
|
|
12
|
-
} | {
|
|
13
|
-
type: 'rollback';
|
|
14
|
-
nodeId: string;
|
|
15
|
-
};
|
|
16
|
-
export default function WorkflowTile(props: TileProps<{
|
|
17
|
-
selected: number | null;
|
|
18
|
-
options: WorkflowOption[];
|
|
19
|
-
nodeId: string | null;
|
|
20
|
-
}, WorkflowTileEventPayload>): React.JSX.Element;
|
|
21
|
-
export {};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import "core-js/modules/esnext.iterator.constructor.js";
|
|
2
|
-
import "core-js/modules/esnext.iterator.map.js";
|
|
3
|
-
import { Button, View } from '@ray-js/components';
|
|
4
|
-
import React from 'react';
|
|
5
|
-
import './index.less';
|
|
6
|
-
import cx from 'clsx';
|
|
7
|
-
export default function WorkflowTile(props) {
|
|
8
|
-
const {
|
|
9
|
-
options,
|
|
10
|
-
selected
|
|
11
|
-
} = props.tile.data;
|
|
12
|
-
const isLatest = props.isLatestMessage;
|
|
13
|
-
return /*#__PURE__*/React.createElement(View, {
|
|
14
|
-
className: "t-agent-workflow-tile"
|
|
15
|
-
}, options.map((item, index) => /*#__PURE__*/React.createElement(Button, {
|
|
16
|
-
key: "".concat(item.name),
|
|
17
|
-
className: cx({
|
|
18
|
-
't-agent-workflow-tile-option': true,
|
|
19
|
-
't-agent-workflow-tile-option-locked': selected != null && selected !== index || !isLatest,
|
|
20
|
-
't-agent-workflow-tile-option-selected': selected === index
|
|
21
|
-
}),
|
|
22
|
-
onClick: () => {
|
|
23
|
-
if (isLatest && selected == null) {
|
|
24
|
-
props.emitTileEvent({
|
|
25
|
-
type: 'select',
|
|
26
|
-
option: item,
|
|
27
|
-
selected: index
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}, item.name)));
|
|
32
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
.t-agent-workflow-tile {
|
|
2
|
-
margin-top: var(--t-agent-y-gap);
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.t-agent-workflow-tile > :not([hidden])~:not([hidden]) {
|
|
6
|
-
margin-top: 16rpx;
|
|
7
|
-
margin-bottom: 0;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.t-agent-workflow-tile-option {
|
|
11
|
-
display: flex;
|
|
12
|
-
align-items: center;
|
|
13
|
-
padding: 36rpx;
|
|
14
|
-
min-width: 564rpx;
|
|
15
|
-
height: 96rpx;
|
|
16
|
-
margin-top: 24rpx;
|
|
17
|
-
font-size: 32rpx;
|
|
18
|
-
background: var(--app-B1);
|
|
19
|
-
border-radius: var(--app-C1_1);
|
|
20
|
-
font-weight: normal;
|
|
21
|
-
color: var(--app-B3-N1);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.t-agent-workflow-tile-option-locked {
|
|
25
|
-
opacity: 0.5;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.t-agent-workflow-tile-option-selected {
|
|
29
|
-
background: var(--app-B3-N9);
|
|
30
|
-
color: var(--app-M1);
|
|
31
|
-
}
|