@flowgram.ai/form-materials 0.5.5 → 0.5.7
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 +4 -1
- 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-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 +44 -15
- 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} +23 -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 +3 -2
- 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/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/effects/validate-when-variable-sync/index.js +3 -3
- 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 +4 -1
- 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-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 +45 -16
- 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 +3 -2
- 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/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/effects/validate-when-variable-sync/index.mjs +3 -3
- 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/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/variable-tag.d.ts +1 -0
- 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 +1 -0
- 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/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/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 +4 -1
- package/src/components/code-editor/editor.tsx +19 -14
- package/src/components/code-editor/styles.css +11 -0
- 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} +10 -11
- package/src/components/coze-editor-extensions/extensions/inputs-tree.tsx +3 -3
- package/src/components/coze-editor-extensions/extensions/variable-tag.tsx +35 -22
- 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 +3 -3
- 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} +8 -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 +3 -3
- package/src/components/inputs-values-tree/row.tsx +25 -27
- package/src/components/inputs-values-tree/styles.css +94 -0
- package/src/components/json-schema-editor/default-value.tsx +2 -4
- 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/effects/validate-when-variable-sync/index.ts +7 -3
- 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 -78
- 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 -108
- 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 -22
- 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 -11
- 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 -25
- package/src/components/prompt-editor-with-variables/editor.tsx +0 -20
|
@@ -5,19 +5,21 @@ import { Button, Checkbox, IconButton } from "@douyinfe/semi-ui";
|
|
|
5
5
|
import { IconChevronDown, IconChevronRight, IconExpand, IconMinus, IconPlus, IconShrink } from "@douyinfe/semi-icons";
|
|
6
6
|
import { InjectTypeSelector } from "../type-selector/index.mjs";
|
|
7
7
|
import { BlurInput } from "../blur-input/index.mjs";
|
|
8
|
-
import {
|
|
8
|
+
import { IconAddChildren } from "./icon.mjs";
|
|
9
9
|
import { usePropertiesEdit } from "./hooks.mjs";
|
|
10
10
|
import { DefaultValue } from "./default-value.mjs";
|
|
11
|
+
import "./styles.css";
|
|
11
12
|
const DEFAULT = {
|
|
12
13
|
type: 'object'
|
|
13
14
|
};
|
|
14
15
|
function JsonSchemaEditor(props) {
|
|
15
16
|
const { value = DEFAULT, config = {}, onChange: onChangeProps, readonly } = props;
|
|
16
17
|
const { propertyList, onAddProperty, onRemoveProperty, onEditProperty } = usePropertiesEdit(value, onChangeProps);
|
|
17
|
-
return /*#__PURE__*/ jsxs(
|
|
18
|
-
className:
|
|
18
|
+
return /*#__PURE__*/ jsxs("div", {
|
|
19
|
+
className: "gedit-m-json-schema-editor-container",
|
|
19
20
|
children: [
|
|
20
|
-
/*#__PURE__*/ jsx(
|
|
21
|
+
/*#__PURE__*/ jsx("div", {
|
|
22
|
+
className: "gedit-m-json-schema-editor-tree-items",
|
|
21
23
|
children: propertyList.map((_property)=>/*#__PURE__*/ jsx(PropertyEdit, {
|
|
22
24
|
readonly: readonly,
|
|
23
25
|
value: _property,
|
|
@@ -66,11 +68,10 @@ function PropertyEdit(props) {
|
|
|
66
68
|
const showCollapse = canAddField && propertyList.length > 0;
|
|
67
69
|
return /*#__PURE__*/ jsxs(Fragment, {
|
|
68
70
|
children: [
|
|
69
|
-
/*#__PURE__*/ jsx(
|
|
70
|
-
$isLast: $
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
children: showCollapse && /*#__PURE__*/ jsx(UICollapseTrigger, {
|
|
71
|
+
/*#__PURE__*/ jsx("div", {
|
|
72
|
+
className: `gedit-m-json-schema-editor-tree-item-left ${$level > 0 ? 'show-line' : ''} ${$isLast ? 'is-last' : ''} ${showCollapse ? 'show-collapse' : ''}`,
|
|
73
|
+
children: showCollapse && /*#__PURE__*/ jsx("div", {
|
|
74
|
+
className: "gedit-m-json-schema-editor-collapse-trigger",
|
|
74
75
|
onClick: ()=>setCollapse((_collapse)=>!_collapse),
|
|
75
76
|
children: collapse ? /*#__PURE__*/ jsx(IconChevronDown, {
|
|
76
77
|
size: "small"
|
|
@@ -79,13 +80,17 @@ function PropertyEdit(props) {
|
|
|
79
80
|
})
|
|
80
81
|
})
|
|
81
82
|
}),
|
|
82
|
-
/*#__PURE__*/ jsxs(
|
|
83
|
+
/*#__PURE__*/ jsxs("div", {
|
|
84
|
+
className: "gedit-m-json-schema-editor-tree-item-right",
|
|
83
85
|
children: [
|
|
84
|
-
/*#__PURE__*/ jsxs(
|
|
86
|
+
/*#__PURE__*/ jsxs("div", {
|
|
87
|
+
className: "gedit-m-json-schema-editor-tree-item-main",
|
|
85
88
|
children: [
|
|
86
|
-
/*#__PURE__*/ jsxs(
|
|
89
|
+
/*#__PURE__*/ jsxs("div", {
|
|
90
|
+
className: "gedit-m-json-schema-editor-row",
|
|
87
91
|
children: [
|
|
88
|
-
/*#__PURE__*/ jsx(
|
|
92
|
+
/*#__PURE__*/ jsx("div", {
|
|
93
|
+
className: "gedit-m-json-schema-editor-name",
|
|
89
94
|
children: /*#__PURE__*/ jsx(BlurInput, {
|
|
90
95
|
disabled: readonly,
|
|
91
96
|
placeholder: config?.placeholder ?? I18n.t('Input Variable Name'),
|
|
@@ -94,7 +99,8 @@ function PropertyEdit(props) {
|
|
|
94
99
|
onChange: (value)=>onChange('name', value)
|
|
95
100
|
})
|
|
96
101
|
}),
|
|
97
|
-
/*#__PURE__*/ jsx(
|
|
102
|
+
/*#__PURE__*/ jsx("div", {
|
|
103
|
+
className: "gedit-m-json-schema-editor-type",
|
|
98
104
|
children: /*#__PURE__*/ jsx(InjectTypeSelector, {
|
|
99
105
|
value: typeSelectorValue,
|
|
100
106
|
readonly: readonly,
|
|
@@ -106,14 +112,16 @@ function PropertyEdit(props) {
|
|
|
106
112
|
}
|
|
107
113
|
})
|
|
108
114
|
}),
|
|
109
|
-
/*#__PURE__*/ jsx(
|
|
115
|
+
/*#__PURE__*/ jsx("div", {
|
|
116
|
+
className: "gedit-m-json-schema-editor-required",
|
|
110
117
|
children: /*#__PURE__*/ jsx(Checkbox, {
|
|
111
118
|
disabled: readonly,
|
|
112
119
|
checked: isPropertyRequired,
|
|
113
120
|
onChange: (e)=>onChange('isPropertyRequired', e.target.checked)
|
|
114
121
|
})
|
|
115
122
|
}),
|
|
116
|
-
/*#__PURE__*/ jsxs(
|
|
123
|
+
/*#__PURE__*/ jsxs("div", {
|
|
124
|
+
className: "gedit-m-json-schema-editor-actions",
|
|
117
125
|
children: [
|
|
118
126
|
/*#__PURE__*/ jsx(IconButton, {
|
|
119
127
|
disabled: readonly,
|
|
@@ -151,9 +159,11 @@ function PropertyEdit(props) {
|
|
|
151
159
|
})
|
|
152
160
|
]
|
|
153
161
|
}),
|
|
154
|
-
expand && /*#__PURE__*/ jsxs(
|
|
162
|
+
expand && /*#__PURE__*/ jsxs("div", {
|
|
163
|
+
className: "gedit-m-json-schema-editor-expand-detail",
|
|
155
164
|
children: [
|
|
156
|
-
/*#__PURE__*/ jsx(
|
|
165
|
+
/*#__PURE__*/ jsx("div", {
|
|
166
|
+
className: "gedit-m-json-schema-editor-label",
|
|
157
167
|
children: config?.descTitle ?? I18n.t("Description")
|
|
158
168
|
}),
|
|
159
169
|
/*#__PURE__*/ jsx(BlurInput, {
|
|
@@ -165,13 +175,15 @@ function PropertyEdit(props) {
|
|
|
165
175
|
}),
|
|
166
176
|
0 === $level && /*#__PURE__*/ jsxs(Fragment, {
|
|
167
177
|
children: [
|
|
168
|
-
/*#__PURE__*/ jsx(
|
|
178
|
+
/*#__PURE__*/ jsx("div", {
|
|
179
|
+
className: "gedit-m-json-schema-editor-label",
|
|
169
180
|
style: {
|
|
170
181
|
marginTop: 10
|
|
171
182
|
},
|
|
172
183
|
children: config?.defaultValueTitle ?? I18n.t('Default Value')
|
|
173
184
|
}),
|
|
174
|
-
/*#__PURE__*/ jsx(
|
|
185
|
+
/*#__PURE__*/ jsx("div", {
|
|
186
|
+
className: "gedit-m-json-schema-editor-default-value-wrapper",
|
|
175
187
|
children: /*#__PURE__*/ jsx(DefaultValue, {
|
|
176
188
|
value: defaultValue,
|
|
177
189
|
schema: value,
|
|
@@ -185,10 +197,10 @@ function PropertyEdit(props) {
|
|
|
185
197
|
})
|
|
186
198
|
]
|
|
187
199
|
}),
|
|
188
|
-
showCollapse && /*#__PURE__*/ jsx(
|
|
189
|
-
$collapse:
|
|
190
|
-
children: /*#__PURE__*/ jsx(
|
|
191
|
-
|
|
200
|
+
showCollapse && /*#__PURE__*/ jsx("div", {
|
|
201
|
+
className: `gedit-m-json-schema-editor-collapsible ${collapse ? 'collapse' : ''}`,
|
|
202
|
+
children: /*#__PURE__*/ jsx("div", {
|
|
203
|
+
className: "gedit-m-json-schema-editor-tree-items shrink",
|
|
192
204
|
children: propertyList.map((_property, index)=>/*#__PURE__*/ jsx(PropertyEdit, {
|
|
193
205
|
readonly: readonly,
|
|
194
206
|
value: _property,
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
.gedit-m-json-schema-editor-row {
|
|
2
|
+
align-items: center;
|
|
3
|
+
gap: 6px;
|
|
4
|
+
display: flex;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.gedit-m-json-schema-editor-collapse-trigger {
|
|
8
|
+
cursor: pointer;
|
|
9
|
+
margin-right: 5px;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.gedit-m-json-schema-editor-expand-detail {
|
|
13
|
+
flex-direction: column;
|
|
14
|
+
display: flex;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.gedit-m-json-schema-editor-label {
|
|
18
|
+
color: #999;
|
|
19
|
+
margin-bottom: 2px;
|
|
20
|
+
font-size: 12px;
|
|
21
|
+
font-weight: 400;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.gedit-m-json-schema-editor-tree-items {
|
|
25
|
+
grid-template-columns: auto 1fr;
|
|
26
|
+
display: grid;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.gedit-m-json-schema-editor-tree-items.shrink {
|
|
30
|
+
margin-top: 10px;
|
|
31
|
+
padding-left: 3px;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.gedit-m-json-schema-editor-tree-item-left {
|
|
35
|
+
grid-column: 1;
|
|
36
|
+
width: 16px;
|
|
37
|
+
position: relative;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.gedit-m-json-schema-editor-tree-item-left.show-line:before {
|
|
41
|
+
content: "";
|
|
42
|
+
height: var(--line-height, 100%);
|
|
43
|
+
background: #d9d9d9;
|
|
44
|
+
width: 1px;
|
|
45
|
+
display: block;
|
|
46
|
+
position: absolute;
|
|
47
|
+
top: -16px;
|
|
48
|
+
left: -14px;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.gedit-m-json-schema-editor-tree-item-left.show-line:after {
|
|
52
|
+
content: "";
|
|
53
|
+
width: var(--line-width, 30px);
|
|
54
|
+
background: #d9d9d9;
|
|
55
|
+
height: 1px;
|
|
56
|
+
display: block;
|
|
57
|
+
position: absolute;
|
|
58
|
+
top: 8px;
|
|
59
|
+
left: -14px;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.gedit-m-json-schema-editor-tree-item-left.show-line.is-last:before {
|
|
63
|
+
height: 24px;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.gedit-m-json-schema-editor-tree-item-left.show-line.show-collapse:after {
|
|
67
|
+
width: 12px;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.gedit-m-json-schema-editor-tree-item-right {
|
|
71
|
+
grid-column: 2;
|
|
72
|
+
margin-bottom: 10px;
|
|
73
|
+
|
|
74
|
+
&:last-child {
|
|
75
|
+
margin-bottom: 0;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.gedit-m-json-schema-editor-tree-item-main {
|
|
80
|
+
flex-direction: column;
|
|
81
|
+
gap: 10px;
|
|
82
|
+
display: flex;
|
|
83
|
+
position: relative;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.gedit-m-json-schema-editor-collapsible {
|
|
87
|
+
display: none;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.gedit-m-json-schema-editor-collapsible.collapse {
|
|
91
|
+
display: block;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.gedit-m-json-schema-editor-name {
|
|
95
|
+
flex-grow: 1;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.gedit-m-json-schema-editor-actions {
|
|
99
|
+
white-space: nowrap;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.gedit-m-json-schema-editor-default-value-wrapper {
|
|
103
|
+
margin: 0;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.gedit-m-json-schema-editor-constant-input-wrapper {
|
|
107
|
+
flex-grow: 1;
|
|
108
|
+
|
|
109
|
+
& .semi-tree-select, & .semi-input-number, & .semi-select {
|
|
110
|
+
width: 100%;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
@@ -2,20 +2,30 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { useEffect, useRef } from "react";
|
|
3
3
|
import { ActiveLinePlaceholder, EditorProvider, Renderer } from "@flowgram.ai/coze-editor/react";
|
|
4
4
|
import preset_prompt from "@flowgram.ai/coze-editor/preset-prompt";
|
|
5
|
-
import { UIContainer } from "./styles.mjs";
|
|
6
5
|
import markdown from "./extensions/markdown.mjs";
|
|
7
6
|
import language_support from "./extensions/language-support.mjs";
|
|
8
7
|
import jinja from "./extensions/jinja.mjs";
|
|
8
|
+
import "./styles.css";
|
|
9
9
|
function PromptEditor(props) {
|
|
10
10
|
const { value, onChange, readonly, placeholder, activeLinePlaceholder, style, hasError, children, disableMarkdownHighlight, options } = props || {};
|
|
11
11
|
const editorRef = useRef(null);
|
|
12
|
+
const editorValue = String(value?.content || '');
|
|
12
13
|
useEffect(()=>{
|
|
13
|
-
if (editorRef.current?.getValue() !==
|
|
14
|
+
if (editorRef.current?.getValue() !== editorValue) {
|
|
15
|
+
const editorView = editorRef.current?.$view;
|
|
16
|
+
editorView?.dispatch({
|
|
17
|
+
changes: {
|
|
18
|
+
from: 0,
|
|
19
|
+
to: editorView?.state.doc.length,
|
|
20
|
+
insert: editorValue
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
}
|
|
14
24
|
}, [
|
|
15
|
-
|
|
25
|
+
editorValue
|
|
16
26
|
]);
|
|
17
|
-
return /*#__PURE__*/ jsx(
|
|
18
|
-
$hasError:
|
|
27
|
+
return /*#__PURE__*/ jsx("div", {
|
|
28
|
+
className: `gedit-m-prompt-editor-container ${hasError ? 'has-error' : ''}`,
|
|
19
29
|
style: style,
|
|
20
30
|
children: /*#__PURE__*/ jsxs(EditorProvider, {
|
|
21
31
|
children: [
|
|
@@ -24,7 +34,7 @@ function PromptEditor(props) {
|
|
|
24
34
|
editorRef.current = editor;
|
|
25
35
|
},
|
|
26
36
|
plugins: preset_prompt,
|
|
27
|
-
defaultValue:
|
|
37
|
+
defaultValue: editorValue,
|
|
28
38
|
options: {
|
|
29
39
|
readOnly: readonly,
|
|
30
40
|
editable: !readonly,
|
|
@@ -1,5 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import { PromptEditor } from "../prompt-editor/index.mjs";
|
|
4
|
+
import { EditorInputsTree } from "../coze-editor-extensions/index.mjs";
|
|
5
|
+
function PromptEditorWithInputs({ inputsValues, ...restProps }) {
|
|
6
|
+
return /*#__PURE__*/ jsx(PromptEditor, {
|
|
7
|
+
...restProps,
|
|
8
|
+
children: /*#__PURE__*/ jsx(EditorInputsTree, {
|
|
9
|
+
inputsValues: inputsValues
|
|
10
|
+
})
|
|
11
|
+
});
|
|
12
|
+
}
|
|
5
13
|
export { PromptEditorWithInputs };
|
|
@@ -1,5 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import { PromptEditor } from "../prompt-editor/index.mjs";
|
|
4
|
+
import { EditorVariableTagInject, EditorVariableTree } from "../coze-editor-extensions/index.mjs";
|
|
5
|
+
function PromptEditorWithVariables(props) {
|
|
6
|
+
return /*#__PURE__*/ jsxs(PromptEditor, {
|
|
7
|
+
...props,
|
|
8
|
+
children: [
|
|
9
|
+
/*#__PURE__*/ jsx(EditorVariableTree, {}),
|
|
10
|
+
/*#__PURE__*/ jsx(EditorVariableTagInject, {})
|
|
11
|
+
]
|
|
12
|
+
});
|
|
13
|
+
}
|
|
5
14
|
export { PromptEditorWithVariables };
|
|
@@ -2,11 +2,15 @@ import { jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { createContext, useContext, useMemo } from "react";
|
|
3
3
|
const VariableSelectorContext = /*#__PURE__*/ createContext({});
|
|
4
4
|
const useVariableSelectorContext = ()=>useContext(VariableSelectorContext);
|
|
5
|
-
const VariableSelectorProvider = ({ children, skipVariable })=>{
|
|
5
|
+
const VariableSelectorProvider = ({ children, skipVariable, includeSchema, excludeSchema })=>{
|
|
6
6
|
const context = useMemo(()=>({
|
|
7
|
-
skipVariable
|
|
7
|
+
skipVariable,
|
|
8
|
+
includeSchema,
|
|
9
|
+
excludeSchema
|
|
8
10
|
}), [
|
|
9
|
-
skipVariable
|
|
11
|
+
skipVariable,
|
|
12
|
+
includeSchema,
|
|
13
|
+
excludeSchema
|
|
10
14
|
]);
|
|
11
15
|
return /*#__PURE__*/ jsx(VariableSelectorContext.Provider, {
|
|
12
16
|
value: context,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useMemo } from "react";
|
|
3
3
|
import { I18n } from "@flowgram.ai/editor";
|
|
4
|
-
import { Popover } from "@douyinfe/semi-ui";
|
|
4
|
+
import { Popover, Tag, TreeSelect } from "@douyinfe/semi-ui";
|
|
5
5
|
import { IconChevronDownStroked, IconIssueStroked } from "@douyinfe/semi-icons";
|
|
6
6
|
import { createInjectMaterial } from "../../shared/index.mjs";
|
|
7
7
|
import { useVariableTree } from "./use-variable-tree.mjs";
|
|
8
|
-
import { UIPopoverContent, UIRootTitle, UITag, UITreeSelect, UIVarName } from "./styles.mjs";
|
|
9
8
|
import { VariableSelectorProvider, useVariableSelectorContext } from "./context.mjs";
|
|
9
|
+
import "./styles.css";
|
|
10
10
|
const VariableSelector = ({ value, config = {}, onChange, style, readonly = false, includeSchema, excludeSchema, hasError, triggerRender })=>{
|
|
11
11
|
const { skipVariable } = useVariableSelectorContext();
|
|
12
12
|
const treeData = useVariableTree({
|
|
@@ -35,21 +35,23 @@ const VariableSelector = ({ value, config = {}, onChange, style, readonly = fals
|
|
|
35
35
|
return icon;
|
|
36
36
|
};
|
|
37
37
|
return /*#__PURE__*/ jsx(Fragment, {
|
|
38
|
-
children: /*#__PURE__*/ jsx(
|
|
38
|
+
children: /*#__PURE__*/ jsx(TreeSelect, {
|
|
39
|
+
className: `gedit-m-variable-selector-tree-select ${hasError ? 'error' : ''}`,
|
|
39
40
|
dropdownMatchSelectWidth: false,
|
|
40
41
|
disabled: readonly,
|
|
41
42
|
treeData: treeData,
|
|
42
43
|
size: "small",
|
|
43
44
|
value: treeValue,
|
|
44
45
|
clearIcon: null,
|
|
45
|
-
$error: hasError,
|
|
46
46
|
style: style,
|
|
47
47
|
validateStatus: hasError ? 'error' : void 0,
|
|
48
|
+
dropdownClassName: "gedit-m-variable-selector-dropdown",
|
|
48
49
|
onChange: (_, _config)=>{
|
|
49
50
|
onChange(_config.keyPath);
|
|
50
51
|
},
|
|
51
52
|
renderSelectedItem: (_option)=>{
|
|
52
|
-
if (!_option?.keyPath) return /*#__PURE__*/ jsx(
|
|
53
|
+
if (!_option?.keyPath) return /*#__PURE__*/ jsx(Tag, {
|
|
54
|
+
className: "gedit-m-variable-selector-tag",
|
|
53
55
|
prefixIcon: /*#__PURE__*/ jsx(IconIssueStroked, {}),
|
|
54
56
|
color: "amber",
|
|
55
57
|
closable: !readonly,
|
|
@@ -57,28 +59,32 @@ const VariableSelector = ({ value, config = {}, onChange, style, readonly = fals
|
|
|
57
59
|
children: config?.notFoundContent ?? 'Undefined'
|
|
58
60
|
});
|
|
59
61
|
const rootIcon = renderIcon(_option.rootMeta?.icon || _option?.icon);
|
|
60
|
-
const rootTitle = /*#__PURE__*/ jsx(
|
|
62
|
+
const rootTitle = /*#__PURE__*/ jsx("div", {
|
|
63
|
+
className: "gedit-m-variable-selector-root-title",
|
|
61
64
|
children: _option.rootMeta?.title ? `${_option.rootMeta?.title} ${_option.isRoot ? '' : '-'} ` : null
|
|
62
65
|
});
|
|
63
66
|
return /*#__PURE__*/ jsx("div", {
|
|
64
67
|
children: /*#__PURE__*/ jsx(Popover, {
|
|
65
|
-
content: /*#__PURE__*/ jsxs(
|
|
68
|
+
content: /*#__PURE__*/ jsxs("div", {
|
|
69
|
+
className: "gedit-m-variable-selector-tag-pop",
|
|
66
70
|
children: [
|
|
67
71
|
rootIcon,
|
|
68
72
|
rootTitle,
|
|
69
|
-
/*#__PURE__*/ jsx(
|
|
73
|
+
/*#__PURE__*/ jsx("div", {
|
|
74
|
+
className: "gedit-m-variable-selector-var-name",
|
|
70
75
|
children: _option.keyPath.slice(1).join('.')
|
|
71
76
|
})
|
|
72
77
|
]
|
|
73
78
|
}),
|
|
74
|
-
children: /*#__PURE__*/ jsxs(
|
|
79
|
+
children: /*#__PURE__*/ jsxs(Tag, {
|
|
80
|
+
className: "gedit-m-variable-selector-tag",
|
|
75
81
|
prefixIcon: rootIcon,
|
|
76
82
|
closable: !readonly,
|
|
77
83
|
onClose: ()=>onChange(void 0),
|
|
78
84
|
children: [
|
|
79
85
|
rootTitle,
|
|
80
|
-
!_option.isRoot && /*#__PURE__*/ jsx(
|
|
81
|
-
|
|
86
|
+
!_option.isRoot && /*#__PURE__*/ jsx("div", {
|
|
87
|
+
className: "gedit-m-variable-selector-var-name in-selector",
|
|
82
88
|
children: _option.label
|
|
83
89
|
})
|
|
84
90
|
]
|
|
@@ -1,54 +1,45 @@
|
|
|
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
|
-
import { Tag, TreeSelect } from '@douyinfe/semi-ui';
|
|
8
|
-
|
|
9
|
-
export const UIRootTitle = styled.div`
|
|
10
|
-
margin-right: 4px;
|
|
11
|
-
min-width: 20px;
|
|
12
|
-
overflow: hidden;
|
|
1
|
+
.gedit-m-variable-selector-root-title {
|
|
13
2
|
text-overflow: ellipsis;
|
|
14
3
|
white-space: nowrap;
|
|
4
|
+
min-width: 20px;
|
|
15
5
|
color: var(--semi-color-text-2);
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
export const UIVarName = styled.div<{ $inSelector?: boolean }>`
|
|
6
|
+
margin-right: 4px;
|
|
19
7
|
overflow: hidden;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.gedit-m-variable-selector-var-name {
|
|
20
11
|
text-overflow: ellipsis;
|
|
21
12
|
white-space: nowrap;
|
|
13
|
+
overflow: hidden;
|
|
22
14
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
`}
|
|
28
|
-
`;
|
|
15
|
+
&.in-selector {
|
|
16
|
+
min-width: 50%;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
29
19
|
|
|
30
|
-
|
|
20
|
+
.gedit-m-variable-selector-tag {
|
|
21
|
+
justify-content: flex-start;
|
|
22
|
+
align-items: center;
|
|
31
23
|
width: 100%;
|
|
24
|
+
height: 22px;
|
|
25
|
+
margin: 0;
|
|
32
26
|
display: flex;
|
|
33
|
-
align-items: center;
|
|
34
|
-
justify-content: flex-start;
|
|
35
27
|
|
|
36
28
|
& .semi-tag-content-center {
|
|
37
29
|
justify-content: flex-start;
|
|
38
30
|
}
|
|
31
|
+
}
|
|
39
32
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
height: 22px;
|
|
43
|
-
}
|
|
44
|
-
`;
|
|
33
|
+
.gedit-m-variable-selector-tree-select {
|
|
34
|
+
outline: none;
|
|
45
35
|
|
|
46
|
-
|
|
47
|
-
|
|
36
|
+
&.error {
|
|
37
|
+
outline: 1px solid red;
|
|
38
|
+
}
|
|
48
39
|
|
|
49
40
|
& .semi-tree-select-selection {
|
|
50
|
-
padding: 0px;
|
|
51
41
|
height: 22px;
|
|
42
|
+
padding: 0;
|
|
52
43
|
}
|
|
53
44
|
|
|
54
45
|
& .semi-tree-select-selection-content {
|
|
@@ -58,12 +49,18 @@ export const UITreeSelect = styled(TreeSelect)<{ $error?: boolean }>`
|
|
|
58
49
|
& .semi-tree-select-selection-placeholder {
|
|
59
50
|
padding-left: 10px;
|
|
60
51
|
}
|
|
61
|
-
|
|
52
|
+
}
|
|
62
53
|
|
|
63
|
-
|
|
54
|
+
.gedit-m-variable-selector-tag-pop {
|
|
55
|
+
white-space: nowrap;
|
|
56
|
+
justify-content: flex-start;
|
|
57
|
+
align-items: center;
|
|
64
58
|
padding: 10px;
|
|
65
59
|
display: inline-flex;
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.gedit-m-variable-selector-dropdown {
|
|
63
|
+
max-height: 300px;
|
|
64
|
+
overflow: auto;
|
|
65
|
+
}
|
|
66
|
+
|
|
@@ -3,8 +3,10 @@ import { useCallback } from "react";
|
|
|
3
3
|
import { JsonSchemaUtils, useTypeManager } from "@flowgram.ai/json-schema";
|
|
4
4
|
import { ASTMatch, useAvailableVariables } from "@flowgram.ai/editor";
|
|
5
5
|
import { Icon } from "@douyinfe/semi-ui";
|
|
6
|
+
import { useVariableSelectorContext } from "./context.mjs";
|
|
6
7
|
function useVariableTree(params) {
|
|
7
|
-
const
|
|
8
|
+
const context = useVariableSelectorContext();
|
|
9
|
+
const { includeSchema = context.includeSchema, excludeSchema = context.excludeSchema, skipVariable = context.skipVariable } = params;
|
|
8
10
|
const typeManager = useTypeManager();
|
|
9
11
|
const variables = useAvailableVariables();
|
|
10
12
|
const getVariableTypeIcon = useCallback((variable)=>{
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { isEmpty } from "lodash-es";
|
|
2
1
|
import { DataEvent, getNodePrivateScope, getNodeScope } from "@flowgram.ai/editor";
|
|
3
2
|
const validateWhenVariableSync = ({ scope } = {})=>[
|
|
4
3
|
{
|
|
5
4
|
event: DataEvent.onValueInit,
|
|
6
|
-
effect: ({ context, form })=>{
|
|
5
|
+
effect: ({ context, form, name })=>{
|
|
7
6
|
const nodeScope = 'private' === scope ? getNodePrivateScope(context.node) : getNodeScope(context.node);
|
|
8
7
|
const disposable = nodeScope.available.onListOrAnyVarChange(()=>{
|
|
9
|
-
|
|
8
|
+
const errorKeys = Object.entries(form.state.errors || {}).filter(([_, errors])=>errors?.length > 0).filter(([key])=>key.startsWith(name) || name.startsWith(key)).map(([key])=>key);
|
|
9
|
+
if (errorKeys.length > 0) form.validate();
|
|
10
10
|
});
|
|
11
11
|
return ()=>disposable.dispose();
|
|
12
12
|
}
|
|
@@ -4,7 +4,7 @@ function createInjectMaterial(Component, params) {
|
|
|
4
4
|
const renderKey = params?.renderKey || Component.renderKey || Component.name || '';
|
|
5
5
|
const InjectComponent = (props)=>{
|
|
6
6
|
const container = usePlaygroundContainer();
|
|
7
|
-
if (!container?.isBound(FlowRendererRegistry)) return /*#__PURE__*/ react.createElement(Component, {
|
|
7
|
+
if (!container?.isBound?.(FlowRendererRegistry)) return /*#__PURE__*/ react.createElement(Component, {
|
|
8
8
|
...props
|
|
9
9
|
});
|
|
10
10
|
const rendererRegistry = container.get(FlowRendererRegistry);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"root":["../src/index.ts","../src/components/index.ts","../src/components/assign-row/index.tsx","../src/components/assign-row/types.ts","../src/components/assign-rows/index.tsx","../src/components/batch-outputs/index.tsx","../src/components/batch-outputs/
|
|
1
|
+
{"root":["../src/index.ts","../src/components/index.ts","../src/components/assign-row/index.tsx","../src/components/assign-row/types.ts","../src/components/assign-rows/index.tsx","../src/components/batch-outputs/index.tsx","../src/components/batch-outputs/types.ts","../src/components/batch-variable-selector/index.tsx","../src/components/blur-input/index.tsx","../src/components/code-editor/editor-all.tsx","../src/components/code-editor/editor-json.tsx","../src/components/code-editor/editor-python.tsx","../src/components/code-editor/editor-shell.tsx","../src/components/code-editor/editor-sql.tsx","../src/components/code-editor/editor-ts.tsx","../src/components/code-editor/editor.tsx","../src/components/code-editor/factory.tsx","../src/components/code-editor/index.tsx","../src/components/code-editor/utils.ts","../src/components/code-editor/theme/dark.ts","../src/components/code-editor/theme/index.ts","../src/components/code-editor/theme/light.ts","../src/components/code-editor-mini/index.tsx","../src/components/condition-context/context.tsx","../src/components/condition-context/index.tsx","../src/components/condition-context/op.ts","../src/components/condition-context/types.ts","../src/components/condition-context/hooks/use-condition.tsx","../src/components/condition-row/index.tsx","../src/components/condition-row/types.ts","../src/components/constant-input/index.tsx","../src/components/constant-input/types.ts","../src/components/coze-editor-extensions/index.tsx","../src/components/coze-editor-extensions/extensions/inputs-tree.tsx","../src/components/coze-editor-extensions/extensions/variable-tag.tsx","../src/components/coze-editor-extensions/extensions/variable-tree.tsx","../src/components/db-condition-row/index.tsx","../src/components/db-condition-row/types.ts","../src/components/display-flow-value/index.tsx","../src/components/display-inputs-values/index.tsx","../src/components/display-outputs/index.tsx","../src/components/display-schema-tag/index.tsx","../src/components/display-schema-tree/index.tsx","../src/components/dynamic-value-input/hooks.ts","../src/components/dynamic-value-input/index.tsx","../src/components/inputs-values/index.tsx","../src/components/inputs-values/types.ts","../src/components/inputs-values-tree/icon.tsx","../src/components/inputs-values-tree/index.tsx","../src/components/inputs-values-tree/row.tsx","../src/components/inputs-values-tree/types.ts","../src/components/inputs-values-tree/hooks/use-child-list.tsx","../src/components/json-editor-with-variables/editor.tsx","../src/components/json-editor-with-variables/index.tsx","../src/components/json-schema-editor/default-value.tsx","../src/components/json-schema-editor/hooks.tsx","../src/components/json-schema-editor/icon.tsx","../src/components/json-schema-editor/index.tsx","../src/components/json-schema-editor/types.ts","../src/components/prompt-editor/editor.tsx","../src/components/prompt-editor/index.tsx","../src/components/prompt-editor/types.tsx","../src/components/prompt-editor/extensions/jinja.tsx","../src/components/prompt-editor/extensions/language-support.tsx","../src/components/prompt-editor/extensions/markdown.tsx","../src/components/prompt-editor-with-inputs/index.tsx","../src/components/prompt-editor-with-variables/index.tsx","../src/components/sql-editor-with-variables/editor.tsx","../src/components/sql-editor-with-variables/index.tsx","../src/components/type-selector/index.tsx","../src/components/variable-selector/context.tsx","../src/components/variable-selector/index.tsx","../src/components/variable-selector/use-variable-tree.tsx","../src/effects/index.ts","../src/effects/auto-rename-ref/index.ts","../src/effects/listen-ref-schema-change/index.ts","../src/effects/listen-ref-value-change/index.ts","../src/effects/provide-batch-input/index.ts","../src/effects/provide-json-schema-outputs/index.ts","../src/effects/sync-variable-title/index.ts","../src/effects/validate-when-variable-sync/index.ts","../src/form-plugins/index.ts","../src/form-plugins/batch-outputs-plugin/index.ts","../src/form-plugins/infer-assign-plugin/index.ts","../src/form-plugins/infer-inputs-plugin/index.ts","../src/hooks/index.ts","../src/hooks/use-object-list/index.tsx","../src/plugins/index.ts","../src/plugins/disable-declaration-plugin/create-disable-declaration-plugin.ts","../src/plugins/disable-declaration-plugin/index.tsx","../src/plugins/json-schema-preset/create-type-preset-plugin.tsx","../src/plugins/json-schema-preset/index.tsx","../src/plugins/json-schema-preset/react.tsx","../src/plugins/json-schema-preset/types.ts","../src/plugins/json-schema-preset/type-definition/array.tsx","../src/plugins/json-schema-preset/type-definition/boolean.tsx","../src/plugins/json-schema-preset/type-definition/date-time.tsx","../src/plugins/json-schema-preset/type-definition/index.tsx","../src/plugins/json-schema-preset/type-definition/integer.tsx","../src/plugins/json-schema-preset/type-definition/map.tsx","../src/plugins/json-schema-preset/type-definition/number.tsx","../src/plugins/json-schema-preset/type-definition/object.tsx","../src/plugins/json-schema-preset/type-definition/string.tsx","../src/shared/index.ts","../src/shared/flow-value/index.ts","../src/shared/flow-value/schema.ts","../src/shared/flow-value/types.ts","../src/shared/flow-value/utils.ts","../src/shared/format-legacy-refs/index.ts","../src/shared/inject-material/index.tsx","../src/shared/lazy-suspense/index.tsx","../src/shared/polyfill-create-root/index.tsx","../src/validate/index.ts","../src/validate/validate-flow-value/index.tsx"],"version":"5.9.2"}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { InferValues } from '@flowgram.ai/coze-editor/react';
|
|
7
7
|
import preset from '@flowgram.ai/coze-editor/preset-code';
|
|
8
|
+
import './styles.css';
|
|
8
9
|
type Preset = typeof preset;
|
|
9
10
|
type Options = Partial<InferValues<Preset[number]>>;
|
|
10
11
|
export interface CodeEditorPropsType extends React.PropsWithChildren<{}> {
|