@flowgram.ai/form-materials 0.4.6 → 0.4.8
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/esm/{chunk-6OZSB6PD.js → chunk-727SU246.js} +6 -3
- package/dist/esm/chunk-727SU246.js.map +1 -0
- package/dist/esm/{chunk-QIJ4QVB2.js → chunk-DEZUEMUM.js} +17 -4
- package/dist/esm/chunk-DEZUEMUM.js.map +1 -0
- package/dist/esm/{chunk-G4HQ7OSI.js → chunk-IHOHRV5V.js} +67 -30
- package/dist/esm/chunk-IHOHRV5V.js.map +1 -0
- package/dist/esm/{editor-H2R7JJLO.js → editor-4X7K477H.js} +4 -4
- package/dist/esm/editor-4X7K477H.js.map +1 -0
- package/dist/esm/{editor-YMNCDGUR.js → editor-OXPGKPF5.js} +4 -4
- package/dist/esm/editor-OXPGKPF5.js.map +1 -0
- package/dist/esm/{editor-JX42GFAZ.js → editor-Z24WLBPO.js} +5 -5
- package/dist/esm/editor-Z24WLBPO.js.map +1 -0
- package/dist/esm/index.js +34 -23
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.mts +21 -3
- package/dist/index.d.ts +21 -3
- package/dist/index.js +532 -446
- package/dist/index.js.map +1 -1
- package/package.json +7 -7
- package/src/components/code-editor/index.tsx +2 -2
- package/src/components/condition-row/constants.ts +8 -0
- package/src/components/display-inputs-values/index.tsx +1 -1
- package/src/components/dynamic-value-input/hooks.ts +1 -1
- package/src/components/inputs-values-tree/hooks/use-child-list.tsx +1 -1
- package/src/components/json-editor-with-variables/extensions/variable-tag.tsx +1 -1
- package/src/components/json-editor-with-variables/index.tsx +2 -2
- package/src/components/json-schema-editor/hooks.tsx +1 -1
- package/src/components/prompt-editor/index.tsx +2 -2
- package/src/components/prompt-editor-with-inputs/index.tsx +2 -2
- package/src/components/prompt-editor-with-inputs/inputs-picker.tsx +1 -1
- package/src/components/prompt-editor-with-variables/extensions/variable-tag.tsx +1 -1
- package/src/components/prompt-editor-with-variables/index.tsx +2 -2
- package/src/components/variable-selector/context.tsx +28 -0
- package/src/components/variable-selector/index.tsx +10 -1
- package/src/components/variable-selector/use-variable-tree.tsx +3 -3
- package/src/effects/validate-when-variable-sync/index.ts +1 -1
- package/src/form-plugins/infer-assign-plugin/index.ts +1 -1
- package/src/form-plugins/infer-inputs-plugin/index.ts +1 -1
- package/src/hooks/use-object-list/index.tsx +1 -1
- package/src/plugins/json-schema-preset/type-definition/date-time.tsx +25 -0
- package/src/plugins/json-schema-preset/type-definition/index.tsx +2 -0
- package/src/shared/flow-value/utils.ts +1 -1
- package/src/shared/format-legacy-refs/index.ts +1 -1
- package/src/shared/index.ts +1 -0
- package/src/shared/lazy-suspense/index.tsx +28 -0
- package/src/validate/validate-flow-value/index.tsx +1 -1
- package/dist/esm/chunk-6OZSB6PD.js.map +0 -1
- package/dist/esm/chunk-G4HQ7OSI.js.map +0 -1
- package/dist/esm/chunk-QIJ4QVB2.js.map +0 -1
- package/dist/esm/editor-H2R7JJLO.js.map +0 -1
- package/dist/esm/editor-JX42GFAZ.js.map +0 -1
- package/dist/esm/editor-YMNCDGUR.js.map +0 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React$1 from 'react';
|
|
2
|
-
import React__default from 'react';
|
|
2
|
+
import React__default, { ComponentType, lazy } from 'react';
|
|
3
3
|
import { IJsonSchema, JsonSchemaTypeRegistry as JsonSchemaTypeRegistry$1, JsonSchemaTypeManager } from '@flowgram.ai/json-schema';
|
|
4
4
|
export { IJsonSchema, JsonSchemaBasicType, JsonSchemaUtils } from '@flowgram.ai/json-schema';
|
|
5
5
|
import { TriggerRenderProps } from '@douyinfe/semi-ui/lib/es/treeSelect';
|
|
@@ -25,9 +25,19 @@ type VariableField = BaseVariableField<{
|
|
|
25
25
|
declare function useVariableTree(params: {
|
|
26
26
|
includeSchema?: IJsonSchema | IJsonSchema[];
|
|
27
27
|
excludeSchema?: IJsonSchema | IJsonSchema[];
|
|
28
|
-
|
|
28
|
+
skipVariable?: (variable: VariableField) => boolean;
|
|
29
29
|
}): TreeNodeData[];
|
|
30
30
|
|
|
31
|
+
/**
|
|
32
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
33
|
+
* SPDX-License-Identifier: MIT
|
|
34
|
+
*/
|
|
35
|
+
|
|
36
|
+
declare const VariableSelectorProvider: ({ children, skipVariable, }: {
|
|
37
|
+
skipVariable?: (variable?: BaseVariableField) => boolean;
|
|
38
|
+
children: React__default.ReactNode;
|
|
39
|
+
}) => React__default.JSX.Element;
|
|
40
|
+
|
|
31
41
|
/**
|
|
32
42
|
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
33
43
|
* SPDX-License-Identifier: MIT
|
|
@@ -907,6 +917,14 @@ interface IPolyfillRoot {
|
|
|
907
917
|
declare function polyfillCreateRoot(dom: HTMLElement): IPolyfillRoot;
|
|
908
918
|
declare function unstableSetCreateRoot(createRoot: (dom: HTMLElement) => IPolyfillRoot): void;
|
|
909
919
|
|
|
920
|
+
/**
|
|
921
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
922
|
+
* SPDX-License-Identifier: MIT
|
|
923
|
+
*/
|
|
924
|
+
|
|
925
|
+
declare function withSuspense<T extends ComponentType<any>>(Component: T, fallback?: React__default.ReactNode): T;
|
|
926
|
+
declare function lazySuspense<T extends ComponentType<any>>(params: Parameters<typeof lazy<T>>[0], fallback?: React__default.ReactNode): React__default.LazyExoticComponent<T>;
|
|
927
|
+
|
|
910
928
|
/**
|
|
911
929
|
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
912
930
|
* SPDX-License-Identifier: MIT
|
|
@@ -981,4 +999,4 @@ declare function useObjectList<ValueType>({ value, onChange, sortIndexKey, }: {
|
|
|
981
999
|
remove: (itemId: string) => void;
|
|
982
1000
|
};
|
|
983
1001
|
|
|
984
|
-
export { AssignRow, AssignRows, type AssignValueType, BatchOutputs, BatchVariableSelector, BlurInput, CodeEditor, CodeEditorMini, type CodeEditorPropsType, ConditionRow, type ConditionRowValueType, ConstantInput, type Strategy as ConstantInputStrategy, type ConstantRendererProps, type DBConditionOptionType, DBConditionRow, type DBConditionRowValueType, DisplayFlowValue, DisplayInputsValueAllInTag, DisplayInputsValues, DisplayOutputs, DisplaySchemaTag, DisplaySchemaTree, DynamicValueInput, type FlowValueType, FlowValueUtils, type IFlowConstantRefValue, type IFlowConstantValue, type IFlowExpressionValue, type IFlowRefValue, type IFlowTemplateValue, type IFlowValue, type IFlowValueExtra, type IPolyfillRoot, InjectDynamicValueInput, InjectTypeSelector, InjectVariableSelector, InputsValues, InputsValuesTree, JsonEditorWithVariables, type JsonEditorWithVariablesProps, JsonSchemaEditor, JsonSchemaTypePresetProvider, type JsonSchemaTypeRegistry, PromptEditor, type PromptEditorPropsType, PromptEditorWithInputs, type PromptEditorWithInputsProps, PromptEditorWithVariables, type PromptEditorWithVariablesProps, TypeSelector, type TypeSelectorProps, VariableSelector, type VariableSelectorProps, autoRenameRefEffect, createBatchOutputsFormPlugin, createDisableDeclarationPlugin, createInferAssignPlugin, createInferInputsPlugin, createInjectMaterial, createTypePresetPlugin, formatLegacyRefOnInit, formatLegacyRefOnSubmit, formatLegacyRefToNewRef, formatNewRefToLegacyRef, getTypeSelectValue, isLegacyFlowRefValueSchema, isNewFlowRefValueSchema, listenRefSchemaChange, listenRefValueChange, parseTypeSelectValue, polyfillCreateRoot, provideBatchInputEffect, provideBatchOutputsEffect, provideJsonSchemaOutputs, syncVariableTitle, unstableSetCreateRoot, useObjectList, useTypeManager, useVariableTree, validateFlowValue, validateWhenVariableSync };
|
|
1002
|
+
export { AssignRow, AssignRows, type AssignValueType, BatchOutputs, BatchVariableSelector, BlurInput, CodeEditor, CodeEditorMini, type CodeEditorPropsType, ConditionRow, type ConditionRowValueType, ConstantInput, type Strategy as ConstantInputStrategy, type ConstantRendererProps, type DBConditionOptionType, DBConditionRow, type DBConditionRowValueType, DisplayFlowValue, DisplayInputsValueAllInTag, DisplayInputsValues, DisplayOutputs, DisplaySchemaTag, DisplaySchemaTree, DynamicValueInput, type FlowValueType, FlowValueUtils, type IFlowConstantRefValue, type IFlowConstantValue, type IFlowExpressionValue, type IFlowRefValue, type IFlowTemplateValue, type IFlowValue, type IFlowValueExtra, type IPolyfillRoot, InjectDynamicValueInput, InjectTypeSelector, InjectVariableSelector, InputsValues, InputsValuesTree, JsonEditorWithVariables, type JsonEditorWithVariablesProps, JsonSchemaEditor, JsonSchemaTypePresetProvider, type JsonSchemaTypeRegistry, PromptEditor, type PromptEditorPropsType, PromptEditorWithInputs, type PromptEditorWithInputsProps, PromptEditorWithVariables, type PromptEditorWithVariablesProps, TypeSelector, type TypeSelectorProps, VariableSelector, type VariableSelectorProps, VariableSelectorProvider, autoRenameRefEffect, createBatchOutputsFormPlugin, createDisableDeclarationPlugin, createInferAssignPlugin, createInferInputsPlugin, createInjectMaterial, createTypePresetPlugin, formatLegacyRefOnInit, formatLegacyRefOnSubmit, formatLegacyRefToNewRef, formatNewRefToLegacyRef, getTypeSelectValue, isLegacyFlowRefValueSchema, isNewFlowRefValueSchema, lazySuspense, listenRefSchemaChange, listenRefValueChange, parseTypeSelectValue, polyfillCreateRoot, provideBatchInputEffect, provideBatchOutputsEffect, provideJsonSchemaOutputs, syncVariableTitle, unstableSetCreateRoot, useObjectList, useTypeManager, useVariableTree, validateFlowValue, validateWhenVariableSync, withSuspense };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React$1 from 'react';
|
|
2
|
-
import React__default from 'react';
|
|
2
|
+
import React__default, { ComponentType, lazy } from 'react';
|
|
3
3
|
import { IJsonSchema, JsonSchemaTypeRegistry as JsonSchemaTypeRegistry$1, JsonSchemaTypeManager } from '@flowgram.ai/json-schema';
|
|
4
4
|
export { IJsonSchema, JsonSchemaBasicType, JsonSchemaUtils } from '@flowgram.ai/json-schema';
|
|
5
5
|
import { TriggerRenderProps } from '@douyinfe/semi-ui/lib/es/treeSelect';
|
|
@@ -25,9 +25,19 @@ type VariableField = BaseVariableField<{
|
|
|
25
25
|
declare function useVariableTree(params: {
|
|
26
26
|
includeSchema?: IJsonSchema | IJsonSchema[];
|
|
27
27
|
excludeSchema?: IJsonSchema | IJsonSchema[];
|
|
28
|
-
|
|
28
|
+
skipVariable?: (variable: VariableField) => boolean;
|
|
29
29
|
}): TreeNodeData[];
|
|
30
30
|
|
|
31
|
+
/**
|
|
32
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
33
|
+
* SPDX-License-Identifier: MIT
|
|
34
|
+
*/
|
|
35
|
+
|
|
36
|
+
declare const VariableSelectorProvider: ({ children, skipVariable, }: {
|
|
37
|
+
skipVariable?: (variable?: BaseVariableField) => boolean;
|
|
38
|
+
children: React__default.ReactNode;
|
|
39
|
+
}) => React__default.JSX.Element;
|
|
40
|
+
|
|
31
41
|
/**
|
|
32
42
|
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
33
43
|
* SPDX-License-Identifier: MIT
|
|
@@ -907,6 +917,14 @@ interface IPolyfillRoot {
|
|
|
907
917
|
declare function polyfillCreateRoot(dom: HTMLElement): IPolyfillRoot;
|
|
908
918
|
declare function unstableSetCreateRoot(createRoot: (dom: HTMLElement) => IPolyfillRoot): void;
|
|
909
919
|
|
|
920
|
+
/**
|
|
921
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
922
|
+
* SPDX-License-Identifier: MIT
|
|
923
|
+
*/
|
|
924
|
+
|
|
925
|
+
declare function withSuspense<T extends ComponentType<any>>(Component: T, fallback?: React__default.ReactNode): T;
|
|
926
|
+
declare function lazySuspense<T extends ComponentType<any>>(params: Parameters<typeof lazy<T>>[0], fallback?: React__default.ReactNode): React__default.LazyExoticComponent<T>;
|
|
927
|
+
|
|
910
928
|
/**
|
|
911
929
|
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
912
930
|
* SPDX-License-Identifier: MIT
|
|
@@ -981,4 +999,4 @@ declare function useObjectList<ValueType>({ value, onChange, sortIndexKey, }: {
|
|
|
981
999
|
remove: (itemId: string) => void;
|
|
982
1000
|
};
|
|
983
1001
|
|
|
984
|
-
export { AssignRow, AssignRows, type AssignValueType, BatchOutputs, BatchVariableSelector, BlurInput, CodeEditor, CodeEditorMini, type CodeEditorPropsType, ConditionRow, type ConditionRowValueType, ConstantInput, type Strategy as ConstantInputStrategy, type ConstantRendererProps, type DBConditionOptionType, DBConditionRow, type DBConditionRowValueType, DisplayFlowValue, DisplayInputsValueAllInTag, DisplayInputsValues, DisplayOutputs, DisplaySchemaTag, DisplaySchemaTree, DynamicValueInput, type FlowValueType, FlowValueUtils, type IFlowConstantRefValue, type IFlowConstantValue, type IFlowExpressionValue, type IFlowRefValue, type IFlowTemplateValue, type IFlowValue, type IFlowValueExtra, type IPolyfillRoot, InjectDynamicValueInput, InjectTypeSelector, InjectVariableSelector, InputsValues, InputsValuesTree, JsonEditorWithVariables, type JsonEditorWithVariablesProps, JsonSchemaEditor, JsonSchemaTypePresetProvider, type JsonSchemaTypeRegistry, PromptEditor, type PromptEditorPropsType, PromptEditorWithInputs, type PromptEditorWithInputsProps, PromptEditorWithVariables, type PromptEditorWithVariablesProps, TypeSelector, type TypeSelectorProps, VariableSelector, type VariableSelectorProps, autoRenameRefEffect, createBatchOutputsFormPlugin, createDisableDeclarationPlugin, createInferAssignPlugin, createInferInputsPlugin, createInjectMaterial, createTypePresetPlugin, formatLegacyRefOnInit, formatLegacyRefOnSubmit, formatLegacyRefToNewRef, formatNewRefToLegacyRef, getTypeSelectValue, isLegacyFlowRefValueSchema, isNewFlowRefValueSchema, listenRefSchemaChange, listenRefValueChange, parseTypeSelectValue, polyfillCreateRoot, provideBatchInputEffect, provideBatchOutputsEffect, provideJsonSchemaOutputs, syncVariableTitle, unstableSetCreateRoot, useObjectList, useTypeManager, useVariableTree, validateFlowValue, validateWhenVariableSync };
|
|
1002
|
+
export { AssignRow, AssignRows, type AssignValueType, BatchOutputs, BatchVariableSelector, BlurInput, CodeEditor, CodeEditorMini, type CodeEditorPropsType, ConditionRow, type ConditionRowValueType, ConstantInput, type Strategy as ConstantInputStrategy, type ConstantRendererProps, type DBConditionOptionType, DBConditionRow, type DBConditionRowValueType, DisplayFlowValue, DisplayInputsValueAllInTag, DisplayInputsValues, DisplayOutputs, DisplaySchemaTag, DisplaySchemaTree, DynamicValueInput, type FlowValueType, FlowValueUtils, type IFlowConstantRefValue, type IFlowConstantValue, type IFlowExpressionValue, type IFlowRefValue, type IFlowTemplateValue, type IFlowValue, type IFlowValueExtra, type IPolyfillRoot, InjectDynamicValueInput, InjectTypeSelector, InjectVariableSelector, InputsValues, InputsValuesTree, JsonEditorWithVariables, type JsonEditorWithVariablesProps, JsonSchemaEditor, JsonSchemaTypePresetProvider, type JsonSchemaTypeRegistry, PromptEditor, type PromptEditorPropsType, PromptEditorWithInputs, type PromptEditorWithInputsProps, PromptEditorWithVariables, type PromptEditorWithVariablesProps, TypeSelector, type TypeSelectorProps, VariableSelector, type VariableSelectorProps, VariableSelectorProvider, autoRenameRefEffect, createBatchOutputsFormPlugin, createDisableDeclarationPlugin, createInferAssignPlugin, createInferInputsPlugin, createInjectMaterial, createTypePresetPlugin, formatLegacyRefOnInit, formatLegacyRefOnSubmit, formatLegacyRefToNewRef, formatNewRefToLegacyRef, getTypeSelectValue, isLegacyFlowRefValueSchema, isNewFlowRefValueSchema, lazySuspense, listenRefSchemaChange, listenRefValueChange, parseTypeSelectValue, polyfillCreateRoot, provideBatchInputEffect, provideBatchOutputsEffect, provideJsonSchemaOutputs, syncVariableTitle, unstableSetCreateRoot, useObjectList, useTypeManager, useVariableTree, validateFlowValue, validateWhenVariableSync, withSuspense };
|