@flowgram.ai/form-materials 0.4.16 → 0.4.17
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/effects/provide-batch-input/index.js +1 -1
- package/dist/cjs/effects/provide-json-schema-outputs/index.js +1 -1
- package/dist/cjs/form-plugins/batch-outputs-plugin/index.js +1 -1
- package/dist/cjs/form-plugins/infer-assign-plugin/index.js +1 -1
- package/dist/esm/effects/provide-batch-input/index.mjs +2 -2
- package/dist/esm/effects/provide-json-schema-outputs/index.mjs +2 -2
- package/dist/esm/form-plugins/batch-outputs-plugin/index.mjs +2 -2
- package/dist/esm/form-plugins/infer-assign-plugin/index.mjs +2 -2
- package/package.json +6 -6
- package/src/effects/provide-batch-input/index.ts +1 -2
- package/src/effects/provide-json-schema-outputs/index.ts +1 -2
- package/src/form-plugins/batch-outputs-plugin/index.ts +1 -2
- package/src/form-plugins/infer-assign-plugin/index.ts +1 -2
|
@@ -33,7 +33,7 @@ const provideBatchInputEffect = (0, editor_namespaceObject.createEffectFromVaria
|
|
|
33
33
|
editor_namespaceObject.ASTFactory.createVariableDeclaration({
|
|
34
34
|
key: `${ctx.node.id}_locals`,
|
|
35
35
|
meta: {
|
|
36
|
-
title:
|
|
36
|
+
title: ctx.node.form?.getValueIn('title'),
|
|
37
37
|
icon: ctx.node.getNodeRegistry().info?.icon
|
|
38
38
|
},
|
|
39
39
|
type: editor_namespaceObject.ASTFactory.createObject({
|
|
@@ -33,7 +33,7 @@ const provideJsonSchemaOutputs = (0, editor_namespaceObject.createEffectFromVari
|
|
|
33
33
|
editor_namespaceObject.ASTFactory.createVariableDeclaration({
|
|
34
34
|
key: `${ctx.node.id}`,
|
|
35
35
|
meta: {
|
|
36
|
-
title:
|
|
36
|
+
title: ctx.node.form?.getValueIn('title') || ctx.node.id,
|
|
37
37
|
icon: ctx.node.getNodeRegistry().info?.icon
|
|
38
38
|
},
|
|
39
39
|
type: json_schema_namespaceObject.JsonSchemaUtils.schemaToAST(value)
|
|
@@ -35,7 +35,7 @@ const provideBatchOutputsEffect = (0, editor_namespaceObject.createEffectFromVar
|
|
|
35
35
|
editor_namespaceObject.ASTFactory.createVariableDeclaration({
|
|
36
36
|
key: `${ctx.node.id}`,
|
|
37
37
|
meta: {
|
|
38
|
-
title:
|
|
38
|
+
title: ctx.node.form?.getValueIn('title'),
|
|
39
39
|
icon: ctx.node.getNodeRegistry().info?.icon
|
|
40
40
|
},
|
|
41
41
|
type: editor_namespaceObject.ASTFactory.createObject({
|
|
@@ -40,7 +40,7 @@ const createInferAssignPlugin = (0, editor_namespaceObject.defineFormPluginCreat
|
|
|
40
40
|
editor_namespaceObject.ASTFactory.createVariableDeclaration({
|
|
41
41
|
key: `${ctx.node.id}`,
|
|
42
42
|
meta: {
|
|
43
|
-
title:
|
|
43
|
+
title: ctx.node.form?.getValueIn('title'),
|
|
44
44
|
icon: ctx.node.getNodeRegistry().info?.icon
|
|
45
45
|
},
|
|
46
46
|
type: editor_namespaceObject.ASTFactory.createObject({
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ASTFactory, createEffectFromVariableProvider
|
|
1
|
+
import { ASTFactory, createEffectFromVariableProvider } from "@flowgram.ai/editor";
|
|
2
2
|
const provideBatchInputEffect = createEffectFromVariableProvider({
|
|
3
3
|
private: true,
|
|
4
4
|
parse: (value, ctx)=>[
|
|
5
5
|
ASTFactory.createVariableDeclaration({
|
|
6
6
|
key: `${ctx.node.id}_locals`,
|
|
7
7
|
meta: {
|
|
8
|
-
title:
|
|
8
|
+
title: ctx.node.form?.getValueIn('title'),
|
|
9
9
|
icon: ctx.node.getNodeRegistry().info?.icon
|
|
10
10
|
},
|
|
11
11
|
type: ASTFactory.createObject({
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { JsonSchemaUtils } from "@flowgram.ai/json-schema";
|
|
2
|
-
import { ASTFactory, createEffectFromVariableProvider
|
|
2
|
+
import { ASTFactory, createEffectFromVariableProvider } from "@flowgram.ai/editor";
|
|
3
3
|
const provideJsonSchemaOutputs = createEffectFromVariableProvider({
|
|
4
4
|
parse: (value, ctx)=>[
|
|
5
5
|
ASTFactory.createVariableDeclaration({
|
|
6
6
|
key: `${ctx.node.id}`,
|
|
7
7
|
meta: {
|
|
8
|
-
title:
|
|
8
|
+
title: ctx.node.form?.getValueIn('title') || ctx.node.id,
|
|
9
9
|
icon: ctx.node.getNodeRegistry().info?.icon
|
|
10
10
|
},
|
|
11
11
|
type: JsonSchemaUtils.schemaToAST(value)
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { set } from "lodash-es";
|
|
2
2
|
import { JsonSchemaUtils } from "@flowgram.ai/json-schema";
|
|
3
|
-
import { ASTFactory, FlowNodeScopeType, ScopeChainTransformService, createEffectFromVariableProvider, defineFormPluginCreator,
|
|
3
|
+
import { ASTFactory, FlowNodeScopeType, ScopeChainTransformService, createEffectFromVariableProvider, defineFormPluginCreator, getNodePrivateScope, getNodeScope } from "@flowgram.ai/editor";
|
|
4
4
|
const provideBatchOutputsEffect = createEffectFromVariableProvider({
|
|
5
5
|
parse: (value, ctx)=>[
|
|
6
6
|
ASTFactory.createVariableDeclaration({
|
|
7
7
|
key: `${ctx.node.id}`,
|
|
8
8
|
meta: {
|
|
9
|
-
title:
|
|
9
|
+
title: ctx.node.form?.getValueIn('title'),
|
|
10
10
|
icon: ctx.node.getNodeRegistry().info?.icon
|
|
11
11
|
},
|
|
12
12
|
type: ASTFactory.createObject({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { set, uniqBy } from "lodash-es";
|
|
2
2
|
import { JsonSchemaUtils } from "@flowgram.ai/json-schema";
|
|
3
|
-
import { ASTFactory, createEffectFromVariableProvider, defineFormPluginCreator,
|
|
3
|
+
import { ASTFactory, createEffectFromVariableProvider, defineFormPluginCreator, getNodeScope } from "@flowgram.ai/editor";
|
|
4
4
|
const createInferAssignPlugin = defineFormPluginCreator({
|
|
5
5
|
onSetupFormMeta ({ addFormatOnSubmit, mergeEffect }, { assignKey, outputKey }) {
|
|
6
6
|
if (!assignKey || !outputKey) return;
|
|
@@ -12,7 +12,7 @@ const createInferAssignPlugin = defineFormPluginCreator({
|
|
|
12
12
|
ASTFactory.createVariableDeclaration({
|
|
13
13
|
key: `${ctx.node.id}`,
|
|
14
14
|
meta: {
|
|
15
|
-
title:
|
|
15
|
+
title: ctx.node.form?.getValueIn('title'),
|
|
16
16
|
icon: ctx.node.getNodeRegistry().info?.icon
|
|
17
17
|
},
|
|
18
18
|
type: ASTFactory.createObject({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flowgram.ai/form-materials",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.17",
|
|
4
4
|
"homepage": "https://flowgram.ai/",
|
|
5
5
|
"repository": "https://github.com/bytedance/flowgram.ai",
|
|
6
6
|
"license": "MIT",
|
|
@@ -68,9 +68,9 @@
|
|
|
68
68
|
"@codemirror/view": "~6.38.0",
|
|
69
69
|
"@codemirror/state": "~6.5.2",
|
|
70
70
|
"zod": "^3.24.4",
|
|
71
|
-
"@flowgram.ai/editor": "0.4.
|
|
72
|
-
"@flowgram.ai/json-schema": "0.4.
|
|
73
|
-
"@flowgram.ai/coze-editor": "0.4.
|
|
71
|
+
"@flowgram.ai/editor": "0.4.17",
|
|
72
|
+
"@flowgram.ai/json-schema": "0.4.17",
|
|
73
|
+
"@flowgram.ai/coze-editor": "0.4.17"
|
|
74
74
|
},
|
|
75
75
|
"devDependencies": {
|
|
76
76
|
"@types/lodash-es": "^4.17.12",
|
|
@@ -89,8 +89,8 @@
|
|
|
89
89
|
"cross-env": "~7.0.3",
|
|
90
90
|
"@rsbuild/plugin-react": "^1.1.1",
|
|
91
91
|
"date-fns": "~4.1.0",
|
|
92
|
-
"@flowgram.ai/eslint-config": "0.4.
|
|
93
|
-
"@flowgram.ai/ts-config": "0.4.
|
|
92
|
+
"@flowgram.ai/eslint-config": "0.4.17",
|
|
93
|
+
"@flowgram.ai/ts-config": "0.4.17"
|
|
94
94
|
},
|
|
95
95
|
"peerDependencies": {
|
|
96
96
|
"react": ">=16.8",
|
|
@@ -8,7 +8,6 @@ import {
|
|
|
8
8
|
EffectOptions,
|
|
9
9
|
FlowNodeRegistry,
|
|
10
10
|
createEffectFromVariableProvider,
|
|
11
|
-
getNodeForm,
|
|
12
11
|
} from '@flowgram.ai/editor';
|
|
13
12
|
|
|
14
13
|
import { IFlowRefValue } from '@/shared';
|
|
@@ -19,7 +18,7 @@ export const provideBatchInputEffect: EffectOptions[] = createEffectFromVariable
|
|
|
19
18
|
ASTFactory.createVariableDeclaration({
|
|
20
19
|
key: `${ctx.node.id}_locals`,
|
|
21
20
|
meta: {
|
|
22
|
-
title:
|
|
21
|
+
title: ctx.node.form?.getValueIn('title'),
|
|
23
22
|
icon: ctx.node.getNodeRegistry<FlowNodeRegistry>().info?.icon,
|
|
24
23
|
},
|
|
25
24
|
type: ASTFactory.createObject({
|
|
@@ -9,7 +9,6 @@ import {
|
|
|
9
9
|
EffectOptions,
|
|
10
10
|
FlowNodeRegistry,
|
|
11
11
|
createEffectFromVariableProvider,
|
|
12
|
-
getNodeForm,
|
|
13
12
|
} from '@flowgram.ai/editor';
|
|
14
13
|
|
|
15
14
|
export const provideJsonSchemaOutputs: EffectOptions[] = createEffectFromVariableProvider({
|
|
@@ -17,7 +16,7 @@ export const provideJsonSchemaOutputs: EffectOptions[] = createEffectFromVariabl
|
|
|
17
16
|
ASTFactory.createVariableDeclaration({
|
|
18
17
|
key: `${ctx.node.id}`,
|
|
19
18
|
meta: {
|
|
20
|
-
title:
|
|
19
|
+
title: ctx.node.form?.getValueIn('title') || ctx.node.id,
|
|
21
20
|
icon: ctx.node.getNodeRegistry<FlowNodeRegistry>().info?.icon,
|
|
22
21
|
},
|
|
23
22
|
type: JsonSchemaUtils.schemaToAST(value),
|
|
@@ -10,7 +10,6 @@ import {
|
|
|
10
10
|
createEffectFromVariableProvider,
|
|
11
11
|
defineFormPluginCreator,
|
|
12
12
|
FlowNodeRegistry,
|
|
13
|
-
getNodeForm,
|
|
14
13
|
getNodePrivateScope,
|
|
15
14
|
getNodeScope,
|
|
16
15
|
ScopeChainTransformService,
|
|
@@ -26,7 +25,7 @@ export const provideBatchOutputsEffect: EffectOptions[] = createEffectFromVariab
|
|
|
26
25
|
ASTFactory.createVariableDeclaration({
|
|
27
26
|
key: `${ctx.node.id}`,
|
|
28
27
|
meta: {
|
|
29
|
-
title:
|
|
28
|
+
title: ctx.node.form?.getValueIn('title'),
|
|
30
29
|
icon: ctx.node.getNodeRegistry<FlowNodeRegistry>().info?.icon,
|
|
31
30
|
},
|
|
32
31
|
type: ASTFactory.createObject({
|
|
@@ -10,7 +10,6 @@ import {
|
|
|
10
10
|
createEffectFromVariableProvider,
|
|
11
11
|
defineFormPluginCreator,
|
|
12
12
|
FlowNodeRegistry,
|
|
13
|
-
getNodeForm,
|
|
14
13
|
getNodeScope,
|
|
15
14
|
} from '@flowgram.ai/editor';
|
|
16
15
|
|
|
@@ -51,7 +50,7 @@ export const createInferAssignPlugin = defineFormPluginCreator<InputConfig>({
|
|
|
51
50
|
ASTFactory.createVariableDeclaration({
|
|
52
51
|
key: `${ctx.node.id}`,
|
|
53
52
|
meta: {
|
|
54
|
-
title:
|
|
53
|
+
title: ctx.node.form?.getValueIn('title'),
|
|
55
54
|
icon: ctx.node.getNodeRegistry<FlowNodeRegistry>().info?.icon,
|
|
56
55
|
},
|
|
57
56
|
type: ASTFactory.createObject({
|