@flowgram.ai/form-materials 0.1.0-alpha.18 → 0.1.0-alpha.19
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/cjs/components/batch-outputs/index.js +5 -3
- package/dist/cjs/components/batch-outputs/styles.css +13 -0
- package/dist/cjs/components/blur-input/index.js +1 -0
- package/dist/cjs/components/code-editor/editor.js +16 -12
- package/dist/cjs/components/code-editor/styles.css +4 -0
- package/dist/cjs/components/code-editor/theme/dark.js +1 -1
- package/dist/cjs/components/code-editor/theme/light.js +1 -1
- package/dist/cjs/components/code-editor-mini/index.js +2 -16
- package/dist/cjs/components/condition-context/hooks/use-condition.js +17 -1
- package/dist/cjs/components/condition-row/index.js +26 -12
- package/dist/cjs/components/condition-row/styles.css +19 -0
- package/dist/cjs/components/coze-editor-extensions/extensions/inputs-tree.js +2 -2
- package/dist/cjs/components/coze-editor-extensions/extensions/variable-tag.js +31 -11
- package/dist/{esm/components/coze-editor-extensions/styles.mjs → cjs/components/coze-editor-extensions/styles.css} +19 -18
- package/dist/cjs/components/db-condition-row/index.js +29 -14
- package/dist/cjs/components/db-condition-row/styles.css +30 -0
- package/dist/cjs/components/display-inputs-values/index.js +3 -2
- package/dist/cjs/components/display-inputs-values/styles.css +6 -0
- package/dist/cjs/components/display-outputs/index.js +5 -4
- package/dist/cjs/components/display-outputs/styles.css +6 -0
- package/dist/cjs/components/display-schema-tag/index.js +7 -4
- package/dist/cjs/components/display-schema-tag/styles.css +21 -0
- package/dist/cjs/components/display-schema-tree/index.js +12 -7
- package/dist/cjs/components/display-schema-tree/styles.css +64 -0
- package/dist/cjs/components/dynamic-value-input/index.js +9 -5
- package/dist/{esm/components/dynamic-value-input/styles.mjs → cjs/components/dynamic-value-input/styles.css} +24 -30
- package/dist/cjs/components/inputs-values/index.js +5 -3
- package/dist/cjs/components/inputs-values/styles.css +13 -0
- package/dist/cjs/components/inputs-values-tree/icon.js +70 -0
- package/dist/cjs/components/inputs-values-tree/index.js +4 -3
- package/dist/cjs/components/inputs-values-tree/row.js +19 -15
- package/dist/cjs/components/inputs-values-tree/styles.css +85 -0
- package/dist/cjs/components/json-schema-editor/default-value.js +2 -2
- package/dist/cjs/components/json-schema-editor/hooks.js +55 -48
- package/dist/cjs/components/json-schema-editor/icon.js +70 -0
- package/dist/cjs/components/json-schema-editor/index.js +37 -25
- package/dist/cjs/components/json-schema-editor/styles.css +113 -0
- package/dist/cjs/components/prompt-editor/editor.js +16 -6
- package/dist/cjs/components/prompt-editor/styles.css +10 -0
- package/dist/cjs/components/prompt-editor-with-inputs/index.js +16 -26
- package/dist/cjs/components/prompt-editor-with-variables/index.js +17 -26
- package/dist/cjs/components/variable-selector/context.js +7 -3
- package/dist/cjs/components/variable-selector/index.js +16 -10
- package/dist/{esm/components/variable-selector/styles.mjs → cjs/components/variable-selector/styles.css} +37 -29
- package/dist/cjs/components/variable-selector/use-variable-tree.js +3 -1
- package/dist/cjs/shared/inject-material/index.js +1 -1
- package/dist/esm/components/batch-outputs/index.mjs +5 -3
- package/dist/esm/components/batch-outputs/styles.css +13 -0
- package/dist/esm/components/blur-input/index.mjs +1 -0
- package/dist/esm/components/code-editor/editor.mjs +16 -11
- package/dist/esm/components/code-editor/styles.css +4 -0
- package/dist/esm/components/code-editor/theme/dark.mjs +1 -1
- package/dist/esm/components/code-editor/theme/light.mjs +1 -1
- package/dist/esm/components/code-editor-mini/index.mjs +2 -6
- package/dist/esm/components/condition-context/hooks/use-condition.mjs +18 -2
- package/dist/esm/components/condition-row/index.mjs +26 -12
- package/dist/esm/components/condition-row/styles.css +19 -0
- package/dist/esm/components/coze-editor-extensions/extensions/inputs-tree.mjs +3 -3
- package/dist/esm/components/coze-editor-extensions/extensions/variable-tag.mjs +32 -12
- package/dist/esm/components/coze-editor-extensions/styles.css +37 -0
- package/dist/esm/components/db-condition-row/index.mjs +29 -14
- package/dist/esm/components/db-condition-row/styles.css +30 -0
- package/dist/esm/components/display-inputs-values/index.mjs +3 -2
- package/dist/esm/components/display-inputs-values/styles.css +6 -0
- package/dist/esm/components/display-outputs/index.mjs +5 -4
- package/dist/esm/components/display-outputs/styles.css +6 -0
- package/dist/esm/components/display-schema-tag/index.mjs +8 -5
- package/dist/esm/components/display-schema-tag/styles.css +21 -0
- package/dist/esm/components/display-schema-tree/index.mjs +12 -7
- package/dist/esm/components/display-schema-tree/styles.css +64 -0
- package/dist/esm/components/dynamic-value-input/index.mjs +9 -5
- package/dist/esm/components/dynamic-value-input/styles.css +48 -0
- package/dist/esm/components/inputs-values/index.mjs +5 -3
- package/dist/esm/components/inputs-values/styles.css +13 -0
- package/dist/esm/components/inputs-values-tree/icon.mjs +26 -0
- package/dist/esm/components/inputs-values-tree/index.mjs +4 -3
- package/dist/esm/components/inputs-values-tree/row.mjs +18 -14
- package/dist/esm/components/inputs-values-tree/styles.css +85 -0
- package/dist/esm/components/json-schema-editor/default-value.mjs +2 -2
- package/dist/esm/components/json-schema-editor/hooks.mjs +55 -48
- package/dist/esm/components/json-schema-editor/icon.mjs +26 -0
- package/dist/esm/components/json-schema-editor/index.mjs +36 -24
- package/dist/esm/components/json-schema-editor/styles.css +113 -0
- package/dist/esm/components/prompt-editor/editor.mjs +16 -6
- package/dist/esm/components/prompt-editor/styles.css +10 -0
- package/dist/esm/components/prompt-editor-with-inputs/index.mjs +12 -4
- package/dist/esm/components/prompt-editor-with-variables/index.mjs +13 -4
- package/dist/esm/components/variable-selector/context.mjs +7 -3
- package/dist/esm/components/variable-selector/index.mjs +17 -11
- package/{src/components/variable-selector/styles.tsx → dist/esm/components/variable-selector/styles.css} +35 -38
- package/dist/esm/components/variable-selector/use-variable-tree.mjs +3 -1
- package/dist/esm/shared/inject-material/index.mjs +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/components/batch-outputs/index.d.ts +1 -0
- package/dist/types/components/blur-input/index.d.ts +1 -1
- package/dist/types/components/code-editor/editor.d.ts +1 -0
- package/dist/types/components/condition-context/hooks/use-condition.d.ts +16 -1
- package/dist/types/components/condition-row/index.d.ts +5 -1
- package/dist/types/components/coze-editor-extensions/extensions/inputs-tree.d.ts +3 -3
- package/dist/types/components/coze-editor-extensions/extensions/variable-tag.d.ts +1 -0
- package/dist/types/components/coze-editor-extensions/index.d.ts +1 -1
- package/dist/types/components/db-condition-row/index.d.ts +4 -0
- package/dist/types/components/db-condition-row/types.d.ts +0 -1
- package/dist/types/components/display-inputs-values/index.d.ts +3 -1
- package/dist/types/components/display-outputs/index.d.ts +1 -0
- package/dist/types/components/display-schema-tag/index.d.ts +1 -0
- package/dist/types/components/display-schema-tree/index.d.ts +1 -0
- package/dist/types/components/dynamic-value-input/index.d.ts +1 -0
- package/dist/types/components/inputs-values/index.d.ts +1 -0
- package/dist/types/components/inputs-values-tree/icon.d.ts +6 -0
- package/dist/types/components/inputs-values-tree/index.d.ts +1 -0
- package/dist/types/components/inputs-values-tree/row.d.ts +1 -0
- package/dist/types/components/inputs-values-tree/types.d.ts +3 -2
- package/dist/types/components/json-schema-editor/icon.d.ts +6 -0
- package/dist/types/components/json-schema-editor/index.d.ts +1 -0
- package/dist/types/components/prompt-editor/editor.d.ts +1 -0
- package/dist/types/components/prompt-editor-with-inputs/index.d.ts +7 -2
- package/dist/types/components/prompt-editor-with-variables/index.d.ts +5 -2
- package/dist/types/components/variable-selector/context.d.ts +16 -3
- package/dist/types/components/variable-selector/index.d.ts +1 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/shared/flow-value/index.d.ts +1 -1
- package/dist/types/shared/flow-value/types.d.ts +3 -0
- package/dist/types/shared/index.d.ts +1 -1
- package/package.json +7 -10
- package/src/components/batch-outputs/index.tsx +5 -5
- package/src/components/batch-outputs/{styles.tsx → styles.css} +4 -6
- package/src/components/blur-input/index.tsx +2 -1
- package/src/components/code-editor/editor.tsx +19 -14
- package/src/components/code-editor/styles.css +11 -0
- package/src/components/code-editor/theme/dark.ts +1 -1
- package/src/components/code-editor/theme/light.ts +1 -1
- package/src/components/code-editor-mini/index.tsx +2 -9
- package/src/components/condition-context/hooks/use-condition.tsx +51 -7
- package/src/components/condition-row/index.tsx +27 -22
- package/src/components/condition-row/{styles.tsx → styles.css} +11 -11
- package/src/components/coze-editor-extensions/extensions/inputs-tree.tsx +7 -6
- package/src/components/coze-editor-extensions/extensions/variable-tag.tsx +19 -14
- package/src/components/coze-editor-extensions/{styles.tsx → styles.css} +8 -11
- package/src/components/db-condition-row/index.tsx +29 -26
- package/src/components/db-condition-row/{styles.tsx → styles.css} +14 -16
- package/src/components/db-condition-row/types.ts +0 -1
- package/src/components/display-inputs-values/index.tsx +5 -4
- package/src/components/display-inputs-values/{styles.ts → styles.css} +2 -4
- package/src/components/display-outputs/index.tsx +5 -5
- package/src/components/display-outputs/{styles.ts → styles.css} +2 -4
- package/src/components/display-schema-tag/index.tsx +7 -7
- package/src/components/display-schema-tag/{styles.ts → styles.css} +7 -10
- package/src/components/display-schema-tree/index.tsx +10 -10
- package/src/components/display-schema-tree/{styles.tsx → styles.css} +18 -24
- package/src/components/dynamic-value-input/index.tsx +6 -6
- package/src/components/dynamic-value-input/{styles.tsx → styles.css} +9 -12
- package/src/components/inputs-values/index.tsx +5 -5
- package/src/components/inputs-values/{styles.tsx → styles.css} +4 -6
- package/src/components/inputs-values-tree/icon.tsx +28 -0
- package/src/components/inputs-values-tree/index.tsx +8 -6
- package/src/components/inputs-values-tree/row.tsx +25 -27
- package/src/components/inputs-values-tree/styles.css +94 -0
- package/src/components/inputs-values-tree/types.ts +3 -2
- package/src/components/json-schema-editor/default-value.tsx +2 -4
- package/src/components/json-schema-editor/hooks.tsx +60 -53
- package/src/components/json-schema-editor/icon.tsx +28 -0
- package/src/components/json-schema-editor/index.tsx +45 -50
- package/src/components/json-schema-editor/styles.css +135 -0
- package/src/components/prompt-editor/editor.tsx +18 -7
- package/src/components/prompt-editor/styles.css +14 -0
- package/src/components/prompt-editor-with-inputs/index.tsx +18 -5
- package/src/components/prompt-editor-with-variables/index.tsx +13 -5
- package/src/components/variable-selector/context.tsx +22 -2
- package/src/components/variable-selector/index.tsx +24 -14
- package/src/components/variable-selector/styles.css +70 -0
- package/src/components/variable-selector/use-variable-tree.tsx +9 -1
- package/src/index.ts +1 -0
- package/src/shared/flow-value/index.ts +1 -0
- package/src/shared/flow-value/types.ts +4 -0
- package/src/shared/index.ts +1 -0
- package/src/shared/inject-material/index.tsx +1 -1
- package/dist/cjs/components/batch-outputs/styles.js +0 -60
- package/dist/cjs/components/condition-row/styles.js +0 -77
- package/dist/cjs/components/coze-editor-extensions/styles.js +0 -89
- package/dist/cjs/components/db-condition-row/styles.js +0 -94
- package/dist/cjs/components/display-inputs-values/styles.js +0 -51
- package/dist/cjs/components/display-outputs/styles.js +0 -51
- package/dist/cjs/components/display-schema-tag/styles.js +0 -71
- package/dist/cjs/components/display-schema-tree/styles.js +0 -135
- package/dist/cjs/components/dynamic-value-input/styles.js +0 -107
- package/dist/cjs/components/inputs-values/styles.js +0 -60
- package/dist/cjs/components/inputs-values-tree/styles.js +0 -177
- package/dist/cjs/components/json-schema-editor/styles.js +0 -231
- package/dist/cjs/components/prompt-editor/styles.js +0 -55
- package/dist/cjs/components/prompt-editor-with-inputs/editor.js +0 -47
- package/dist/cjs/components/prompt-editor-with-variables/editor.js +0 -48
- package/dist/cjs/components/variable-selector/styles.js +0 -114
- package/dist/esm/components/batch-outputs/styles.mjs +0 -13
- package/dist/esm/components/condition-row/styles.mjs +0 -21
- package/dist/esm/components/db-condition-row/styles.mjs +0 -32
- package/dist/esm/components/display-inputs-values/styles.mjs +0 -7
- package/dist/esm/components/display-outputs/styles.mjs +0 -7
- package/dist/esm/components/display-schema-tag/styles.mjs +0 -21
- package/dist/esm/components/display-schema-tree/styles.mjs +0 -79
- package/dist/esm/components/inputs-values/styles.mjs +0 -13
- package/dist/esm/components/inputs-values-tree/styles.mjs +0 -105
- package/dist/esm/components/json-schema-editor/styles.mjs +0 -138
- package/dist/esm/components/prompt-editor/styles.mjs +0 -11
- package/dist/esm/components/prompt-editor-with-inputs/editor.mjs +0 -13
- package/dist/esm/components/prompt-editor-with-variables/editor.mjs +0 -14
- package/dist/types/components/batch-outputs/styles.d.ts +0 -6
- package/dist/types/components/condition-row/styles.d.ts +0 -9
- package/dist/types/components/coze-editor-extensions/styles.d.ts +0 -9
- package/dist/types/components/db-condition-row/styles.d.ts +0 -12
- package/dist/types/components/display-inputs-values/styles.d.ts +0 -5
- package/dist/types/components/display-outputs/styles.d.ts +0 -5
- package/dist/types/components/display-schema-tag/styles.d.ts +0 -8
- package/dist/types/components/display-schema-tree/styles.d.ts +0 -11
- package/dist/types/components/dynamic-value-input/styles.d.ts +0 -8
- package/dist/types/components/inputs-values/styles.d.ts +0 -6
- package/dist/types/components/inputs-values-tree/styles.d.ts +0 -23
- package/dist/types/components/json-schema-editor/styles.d.ts +0 -30
- package/dist/types/components/prompt-editor/styles.d.ts +0 -7
- package/dist/types/components/prompt-editor-with-inputs/editor.d.ts +0 -10
- package/dist/types/components/prompt-editor-with-variables/editor.d.ts +0 -9
- package/dist/types/components/variable-selector/styles.d.ts +0 -14
- package/src/components/inputs-values-tree/styles.tsx +0 -128
- package/src/components/json-schema-editor/styles.tsx +0 -168
- package/src/components/prompt-editor/styles.tsx +0 -18
- package/src/components/prompt-editor-with-inputs/editor.tsx +0 -24
- package/src/components/prompt-editor-with-variables/editor.tsx +0 -20
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
3
|
-
* SPDX-License-Identifier: MIT
|
|
4
|
-
*/
|
|
5
|
-
import { Tag, TreeSelect } from '@douyinfe/semi-ui';
|
|
6
|
-
export declare const UIRootTitle: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
7
|
-
export declare const UIVarName: import("styled-components").StyledComponent<"div", any, {
|
|
8
|
-
$inSelector?: boolean;
|
|
9
|
-
}, never>;
|
|
10
|
-
export declare const UITag: import("styled-components").StyledComponent<typeof Tag, any, {}, never>;
|
|
11
|
-
export declare const UITreeSelect: import("styled-components").StyledComponent<typeof TreeSelect, any, {
|
|
12
|
-
$error?: boolean;
|
|
13
|
-
}, never>;
|
|
14
|
-
export declare const UIPopoverContent: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
3
|
-
* SPDX-License-Identifier: MIT
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import React from 'react';
|
|
7
|
-
|
|
8
|
-
import styled, { css } from 'styled-components';
|
|
9
|
-
import Icon from '@douyinfe/semi-icons';
|
|
10
|
-
|
|
11
|
-
export const UIContainer = styled.div``;
|
|
12
|
-
|
|
13
|
-
export const UIRow = styled.div`
|
|
14
|
-
display: flex;
|
|
15
|
-
align-items: flex-start;
|
|
16
|
-
gap: 5px;
|
|
17
|
-
`;
|
|
18
|
-
|
|
19
|
-
export const UICollapseTrigger = styled.div`
|
|
20
|
-
cursor: pointer;
|
|
21
|
-
margin-right: 5px;
|
|
22
|
-
`;
|
|
23
|
-
|
|
24
|
-
export const UITreeItems = styled.div<{ $shrink?: boolean }>`
|
|
25
|
-
display: grid;
|
|
26
|
-
grid-template-columns: auto 1fr;
|
|
27
|
-
|
|
28
|
-
${({ $shrink }) =>
|
|
29
|
-
$shrink &&
|
|
30
|
-
css`
|
|
31
|
-
padding-left: 3px;
|
|
32
|
-
margin-top: 10px;
|
|
33
|
-
`}
|
|
34
|
-
`;
|
|
35
|
-
|
|
36
|
-
export const UITreeItemLeft = styled.div<{
|
|
37
|
-
$isLast?: boolean;
|
|
38
|
-
$showLine?: boolean;
|
|
39
|
-
$showCollapse?: boolean;
|
|
40
|
-
}>`
|
|
41
|
-
grid-column: 1;
|
|
42
|
-
position: relative;
|
|
43
|
-
width: 16px;
|
|
44
|
-
|
|
45
|
-
${({ $showLine, $isLast, $showCollapse }) => {
|
|
46
|
-
let height = $isLast ? '24px' : '100%';
|
|
47
|
-
let width = $showCollapse ? '12px' : '30px';
|
|
48
|
-
|
|
49
|
-
return (
|
|
50
|
-
$showLine &&
|
|
51
|
-
css`
|
|
52
|
-
&::before {
|
|
53
|
-
/* 竖线 */
|
|
54
|
-
content: '';
|
|
55
|
-
height: ${height};
|
|
56
|
-
position: absolute;
|
|
57
|
-
left: -14px;
|
|
58
|
-
top: -16px;
|
|
59
|
-
width: 1px;
|
|
60
|
-
background: #d9d9d9;
|
|
61
|
-
display: block;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
&::after {
|
|
65
|
-
/* 横线 */
|
|
66
|
-
content: '';
|
|
67
|
-
position: absolute;
|
|
68
|
-
left: -14px; // 横线起点和竖线对齐
|
|
69
|
-
top: 8px; // 跟随你的行高调整
|
|
70
|
-
width: ${width}; // 横线长度
|
|
71
|
-
height: 1px;
|
|
72
|
-
background: #d9d9d9;
|
|
73
|
-
display: block;
|
|
74
|
-
}
|
|
75
|
-
`
|
|
76
|
-
);
|
|
77
|
-
}}
|
|
78
|
-
`;
|
|
79
|
-
|
|
80
|
-
export const UITreeItemRight = styled.div`
|
|
81
|
-
grid-column: 2;
|
|
82
|
-
margin-bottom: 10px;
|
|
83
|
-
|
|
84
|
-
&:last-child {
|
|
85
|
-
margin-bottom: 0px;
|
|
86
|
-
}
|
|
87
|
-
`;
|
|
88
|
-
|
|
89
|
-
export const UITreeItemMain = styled.div<{}>`
|
|
90
|
-
display: flex;
|
|
91
|
-
flex-direction: column;
|
|
92
|
-
gap: 10px;
|
|
93
|
-
position: relative;
|
|
94
|
-
`;
|
|
95
|
-
|
|
96
|
-
export const UICollapsible = styled.div<{ $collapse?: boolean }>`
|
|
97
|
-
display: none;
|
|
98
|
-
|
|
99
|
-
${({ $collapse }) =>
|
|
100
|
-
$collapse &&
|
|
101
|
-
css`
|
|
102
|
-
display: block;
|
|
103
|
-
`}
|
|
104
|
-
`;
|
|
105
|
-
|
|
106
|
-
export const UIActions = styled.div`
|
|
107
|
-
white-space: nowrap;
|
|
108
|
-
`;
|
|
109
|
-
|
|
110
|
-
const iconAddChildrenSvg = (
|
|
111
|
-
<svg
|
|
112
|
-
className="icon-icon icon-icon-coz_add_node "
|
|
113
|
-
width="1em"
|
|
114
|
-
height="1em"
|
|
115
|
-
viewBox="0 0 24 24"
|
|
116
|
-
fill="currentColor"
|
|
117
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
118
|
-
>
|
|
119
|
-
<path
|
|
120
|
-
fillRule="evenodd"
|
|
121
|
-
clipRule="evenodd"
|
|
122
|
-
d="M11 6.49988C11 8.64148 9.50397 10.4337 7.49995 10.8884V15.4998C7.49995 16.0521 7.94767 16.4998 8.49995 16.4998H11.208C11.0742 16.8061 11 17.1443 11 17.4998C11 17.8554 11.0742 18.1936 11.208 18.4998H8.49995C6.8431 18.4998 5.49995 17.1567 5.49995 15.4998V10.8884C3.49599 10.4336 2 8.64145 2 6.49988C2 4.0146 4.01472 1.99988 6.5 1.99988C8.98528 1.99988 11 4.0146 11 6.49988ZM6.5 8.99988C7.88071 8.99988 9 7.88059 9 6.49988C9 5.11917 7.88071 3.99988 6.5 3.99988C5.11929 3.99988 4 5.11917 4 6.49988C4 7.88059 5.11929 8.99988 6.5 8.99988Z"
|
|
123
|
-
></path>
|
|
124
|
-
<path d="M17.5 12.4999C18.0523 12.4999 18.5 12.9476 18.5 13.4999V16.4999H21.5C22.0523 16.4999 22.5 16.9476 22.5 17.4999C22.5 18.0522 22.0523 18.4999 21.5 18.4999H18.5V21.4999C18.5 22.0522 18.0523 22.4999 17.5 22.4999C16.9477 22.4999 16.5 22.0522 16.5 21.4999V18.4999H13.5C12.9477 18.4999 12.5 18.0522 12.5 17.4999C12.5 16.9476 12.9477 16.4999 13.5 16.4999H16.5V13.4999C16.5 12.9476 16.9477 12.4999 17.5 12.4999Z"></path>
|
|
125
|
-
</svg>
|
|
126
|
-
);
|
|
127
|
-
|
|
128
|
-
export const IconAddChildren = () => <Icon size="small" svg={iconAddChildrenSvg} />;
|
|
@@ -1,168 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
3
|
-
* SPDX-License-Identifier: MIT
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import React from 'react';
|
|
7
|
-
|
|
8
|
-
import styled, { css } from 'styled-components';
|
|
9
|
-
import Icon from '@douyinfe/semi-icons';
|
|
10
|
-
|
|
11
|
-
export const UIContainer = styled.div`
|
|
12
|
-
/* & .semi-input {
|
|
13
|
-
background-color: #fff;
|
|
14
|
-
border-radius: 6px;
|
|
15
|
-
height: 24px;
|
|
16
|
-
} */
|
|
17
|
-
`;
|
|
18
|
-
|
|
19
|
-
export const UIRow = styled.div`
|
|
20
|
-
display: flex;
|
|
21
|
-
align-items: center;
|
|
22
|
-
gap: 6px;
|
|
23
|
-
`;
|
|
24
|
-
|
|
25
|
-
export const UICollapseTrigger = styled.div`
|
|
26
|
-
cursor: pointer;
|
|
27
|
-
margin-right: 5px;
|
|
28
|
-
`;
|
|
29
|
-
|
|
30
|
-
export const UIExpandDetail = styled.div`
|
|
31
|
-
display: flex;
|
|
32
|
-
flex-direction: column;
|
|
33
|
-
`;
|
|
34
|
-
|
|
35
|
-
export const UILabel = styled.div`
|
|
36
|
-
font-size: 12px;
|
|
37
|
-
color: #999;
|
|
38
|
-
font-weight: 400;
|
|
39
|
-
margin-bottom: 2px;
|
|
40
|
-
`;
|
|
41
|
-
|
|
42
|
-
export const UITreeItems = styled.div<{ $shrink?: boolean }>`
|
|
43
|
-
display: grid;
|
|
44
|
-
grid-template-columns: auto 1fr;
|
|
45
|
-
|
|
46
|
-
${({ $shrink }) =>
|
|
47
|
-
$shrink &&
|
|
48
|
-
css`
|
|
49
|
-
padding-left: 3px;
|
|
50
|
-
margin-top: 10px;
|
|
51
|
-
`}
|
|
52
|
-
`;
|
|
53
|
-
|
|
54
|
-
export const UITreeItemLeft = styled.div<{
|
|
55
|
-
$isLast?: boolean;
|
|
56
|
-
$showLine?: boolean;
|
|
57
|
-
$showCollapse?: boolean;
|
|
58
|
-
}>`
|
|
59
|
-
grid-column: 1;
|
|
60
|
-
position: relative;
|
|
61
|
-
width: 16px;
|
|
62
|
-
|
|
63
|
-
${({ $showLine, $isLast, $showCollapse }) => {
|
|
64
|
-
let height = $isLast ? '24px' : '100%';
|
|
65
|
-
let width = $showCollapse ? '12px' : '30px';
|
|
66
|
-
|
|
67
|
-
return (
|
|
68
|
-
$showLine &&
|
|
69
|
-
css`
|
|
70
|
-
&::before {
|
|
71
|
-
/* 竖线 */
|
|
72
|
-
content: '';
|
|
73
|
-
height: ${height};
|
|
74
|
-
position: absolute;
|
|
75
|
-
left: -14px;
|
|
76
|
-
top: -16px;
|
|
77
|
-
width: 1px;
|
|
78
|
-
background: #d9d9d9;
|
|
79
|
-
display: block;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
&::after {
|
|
83
|
-
/* 横线 */
|
|
84
|
-
content: '';
|
|
85
|
-
position: absolute;
|
|
86
|
-
left: -14px; // 横线起点和竖线对齐
|
|
87
|
-
top: 8px; // 跟随你的行高调整
|
|
88
|
-
width: ${width}; // 横线长度
|
|
89
|
-
height: 1px;
|
|
90
|
-
background: #d9d9d9;
|
|
91
|
-
display: block;
|
|
92
|
-
}
|
|
93
|
-
`
|
|
94
|
-
);
|
|
95
|
-
}}
|
|
96
|
-
`;
|
|
97
|
-
|
|
98
|
-
export const UITreeItemRight = styled.div`
|
|
99
|
-
grid-column: 2;
|
|
100
|
-
margin-bottom: 10px;
|
|
101
|
-
|
|
102
|
-
&:last-child {
|
|
103
|
-
margin-bottom: 0px;
|
|
104
|
-
}
|
|
105
|
-
`;
|
|
106
|
-
|
|
107
|
-
export const UITreeItemMain = styled.div<{}>`
|
|
108
|
-
display: flex;
|
|
109
|
-
flex-direction: column;
|
|
110
|
-
gap: 10px;
|
|
111
|
-
position: relative;
|
|
112
|
-
`;
|
|
113
|
-
|
|
114
|
-
export const UICollapsible = styled.div<{ $collapse?: boolean }>`
|
|
115
|
-
display: none;
|
|
116
|
-
|
|
117
|
-
${({ $collapse }) =>
|
|
118
|
-
$collapse &&
|
|
119
|
-
css`
|
|
120
|
-
display: block;
|
|
121
|
-
`}
|
|
122
|
-
`;
|
|
123
|
-
|
|
124
|
-
export const UIName = styled.div`
|
|
125
|
-
flex-grow: 1;
|
|
126
|
-
`;
|
|
127
|
-
|
|
128
|
-
export const UIType = styled.div``;
|
|
129
|
-
|
|
130
|
-
export const UIRequired = styled.div``;
|
|
131
|
-
|
|
132
|
-
export const UIActions = styled.div`
|
|
133
|
-
white-space: nowrap;
|
|
134
|
-
`;
|
|
135
|
-
|
|
136
|
-
const iconAddChildrenSvg = (
|
|
137
|
-
<svg
|
|
138
|
-
className="icon-icon icon-icon-coz_add_node "
|
|
139
|
-
width="1em"
|
|
140
|
-
height="1em"
|
|
141
|
-
viewBox="0 0 24 24"
|
|
142
|
-
fill="currentColor"
|
|
143
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
144
|
-
>
|
|
145
|
-
<path
|
|
146
|
-
fillRule="evenodd"
|
|
147
|
-
clipRule="evenodd"
|
|
148
|
-
d="M11 6.49988C11 8.64148 9.50397 10.4337 7.49995 10.8884V15.4998C7.49995 16.0521 7.94767 16.4998 8.49995 16.4998H11.208C11.0742 16.8061 11 17.1443 11 17.4998C11 17.8554 11.0742 18.1936 11.208 18.4998H8.49995C6.8431 18.4998 5.49995 17.1567 5.49995 15.4998V10.8884C3.49599 10.4336 2 8.64145 2 6.49988C2 4.0146 4.01472 1.99988 6.5 1.99988C8.98528 1.99988 11 4.0146 11 6.49988ZM6.5 8.99988C7.88071 8.99988 9 7.88059 9 6.49988C9 5.11917 7.88071 3.99988 6.5 3.99988C5.11929 3.99988 4 5.11917 4 6.49988C4 7.88059 5.11929 8.99988 6.5 8.99988Z"
|
|
149
|
-
></path>
|
|
150
|
-
<path d="M17.5 12.4999C18.0523 12.4999 18.5 12.9476 18.5 13.4999V16.4999H21.5C22.0523 16.4999 22.5 16.9476 22.5 17.4999C22.5 18.0522 22.0523 18.4999 21.5 18.4999H18.5V21.4999C18.5 22.0522 18.0523 22.4999 17.5 22.4999C16.9477 22.4999 16.5 22.0522 16.5 21.4999V18.4999H13.5C12.9477 18.4999 12.5 18.0522 12.5 17.4999C12.5 16.9476 12.9477 16.4999 13.5 16.4999H16.5V13.4999C16.5 12.9476 16.9477 12.4999 17.5 12.4999Z"></path>
|
|
151
|
-
</svg>
|
|
152
|
-
);
|
|
153
|
-
|
|
154
|
-
export const IconAddChildren = () => <Icon size="small" svg={iconAddChildrenSvg} />;
|
|
155
|
-
|
|
156
|
-
export const DefaultValueWrapper = styled.div`
|
|
157
|
-
margin: 0;
|
|
158
|
-
`;
|
|
159
|
-
|
|
160
|
-
export const ConstantInputWrapper = styled.div`
|
|
161
|
-
flex-grow: 1;
|
|
162
|
-
|
|
163
|
-
& .semi-tree-select,
|
|
164
|
-
& .semi-input-number,
|
|
165
|
-
& .semi-select {
|
|
166
|
-
width: 100%;
|
|
167
|
-
}
|
|
168
|
-
`;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
3
|
-
* SPDX-License-Identifier: MIT
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import styled, { css } from 'styled-components';
|
|
7
|
-
|
|
8
|
-
export const UIContainer = styled.div<{ $hasError?: boolean }>`
|
|
9
|
-
background-color: var(--semi-color-fill-0);
|
|
10
|
-
padding-left: 10px;
|
|
11
|
-
padding-right: 6px;
|
|
12
|
-
|
|
13
|
-
${({ $hasError }) =>
|
|
14
|
-
$hasError &&
|
|
15
|
-
css`
|
|
16
|
-
border: 1px solid var(--semi-color-danger-6);
|
|
17
|
-
`}
|
|
18
|
-
`;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
3
|
-
* SPDX-License-Identifier: MIT
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import React from 'react';
|
|
7
|
-
|
|
8
|
-
import { PromptEditor, PromptEditorPropsType } from '@/components/prompt-editor';
|
|
9
|
-
import { EditorInputsTree } from '@/components/coze-editor-extensions';
|
|
10
|
-
|
|
11
|
-
export interface PromptEditorWithInputsProps extends PromptEditorPropsType {
|
|
12
|
-
inputsValues: any;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export function PromptEditorWithInputs({
|
|
16
|
-
inputsValues,
|
|
17
|
-
...restProps
|
|
18
|
-
}: PromptEditorWithInputsProps) {
|
|
19
|
-
return (
|
|
20
|
-
<PromptEditor {...restProps}>
|
|
21
|
-
<EditorInputsTree inputsValues={inputsValues} />
|
|
22
|
-
</PromptEditor>
|
|
23
|
-
);
|
|
24
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
3
|
-
* SPDX-License-Identifier: MIT
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import React from 'react';
|
|
7
|
-
|
|
8
|
-
import { PromptEditor, PromptEditorPropsType } from '@/components/prompt-editor';
|
|
9
|
-
import { EditorVariableTree, EditorVariableTagInject } from '@/components/coze-editor-extensions';
|
|
10
|
-
|
|
11
|
-
export interface PromptEditorWithVariablesProps extends PromptEditorPropsType {}
|
|
12
|
-
|
|
13
|
-
export function PromptEditorWithVariables(props: PromptEditorWithVariablesProps) {
|
|
14
|
-
return (
|
|
15
|
-
<PromptEditor {...props}>
|
|
16
|
-
<EditorVariableTree />
|
|
17
|
-
<EditorVariableTagInject />
|
|
18
|
-
</PromptEditor>
|
|
19
|
-
);
|
|
20
|
-
}
|