@flowgram.ai/form-materials 0.4.1 → 0.4.3

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/index.d.mts CHANGED
@@ -183,7 +183,7 @@ interface IFlowValueExtra {
183
183
  type FlowValueType = 'constant' | 'ref' | 'expression' | 'template';
184
184
  interface IFlowConstantValue {
185
185
  type: 'constant';
186
- content?: string | number | boolean;
186
+ content?: any;
187
187
  schema?: IJsonSchema;
188
188
  extra?: IFlowValueExtra;
189
189
  }
@@ -327,7 +327,7 @@ declare function PromptEditorWithVariables(props: PromptEditorPropsType): React$
327
327
  */
328
328
 
329
329
  interface PropsType$7 extends PromptEditorPropsType {
330
- inputsValues: Record<string, IFlowValue>;
330
+ inputsValues: any;
331
331
  }
332
332
  declare function PromptEditorWithInputs({ inputsValues, ...restProps }: PropsType$7): React$1.JSX.Element;
333
333
 
@@ -449,10 +449,13 @@ declare function DisplayFlowValue({ value, title, showIconInTree }: PropsType$2)
449
449
  */
450
450
 
451
451
  interface PropsType$1 {
452
- value?: Record<string, IFlowValue | undefined>;
452
+ value?: any;
453
453
  showIconInTree?: boolean;
454
454
  }
455
455
  declare function DisplayInputsValues({ value, showIconInTree }: PropsType$1): React$1.JSX.Element;
456
+ declare function DisplayInputsValueAllInTag({ value, title, showIconInTree, }: PropsType$1 & {
457
+ title: string;
458
+ }): React$1.JSX.Element;
456
459
 
457
460
  /**
458
461
  * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
@@ -863,4 +866,26 @@ declare function validateFlowValue(value: IFlowValue | undefined, ctx: Context):
863
866
  message: string;
864
867
  } | undefined;
865
868
 
866
- export { AssignRow, AssignRows, type AssignValueType, BatchOutputs, BatchVariableSelector, BlurInput, CodeEditor, CodeEditorMini, type CodeEditorPropsType, ConditionRow, type ConditionRowValueType, ConstantInput, type Strategy as ConstantInputStrategy, type ConstantRendererProps, DisplayFlowValue, DisplayInputsValues, DisplayOutputs, DisplaySchemaTag, DisplaySchemaTree, DynamicValueInput, type FlowValueType, FlowValueUtils, type IFlowConstantRefValue, type IFlowConstantValue, type IFlowExpressionValue, type IFlowRefValue, type IFlowTemplateValue, type IFlowValue, type IFlowValueExtra, InjectDynamicValueInput, InjectTypeSelector, InjectVariableSelector, InputsValues, InputsValuesTree, JsonEditorWithVariables, JsonSchemaEditor, JsonSchemaTypePresetProvider, type JsonSchemaTypeRegistry, PromptEditor, type PromptEditorPropsType, PromptEditorWithInputs, PromptEditorWithVariables, TypeSelector, type TypeSelectorProps, VariableSelector, type VariableSelectorProps, autoRenameRefEffect, createBatchOutputsFormPlugin, createDisableDeclarationPlugin, createInferAssignPlugin, createInferInputsPlugin, createInjectMaterial, createTypePresetPlugin, formatLegacyRefOnInit, formatLegacyRefOnSubmit, formatLegacyRefToNewRef, formatNewRefToLegacyRef, getTypeSelectValue, isLegacyFlowRefValueSchema, isNewFlowRefValueSchema, listenRefSchemaChange, listenRefValueChange, parseTypeSelectValue, provideBatchInputEffect, provideBatchOutputsEffect, provideJsonSchemaOutputs, syncVariableTitle, useTypeManager, useVariableTree, validateFlowValue, validateWhenVariableSync };
869
+ /**
870
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
871
+ * SPDX-License-Identifier: MIT
872
+ */
873
+ interface ListItem<ValueType> {
874
+ id: string;
875
+ key?: string;
876
+ value?: ValueType;
877
+ }
878
+ type ObjectType<ValueType> = Record<string, ValueType | undefined>;
879
+ declare function useObjectList<ValueType>({ value, onChange, sortIndexKey, }: {
880
+ value?: ObjectType<ValueType>;
881
+ onChange: (value?: ObjectType<ValueType>) => void;
882
+ sortIndexKey?: string | ((item: ValueType | undefined) => string);
883
+ }): {
884
+ list: ListItem<ValueType>[];
885
+ add: (defaultValue?: ValueType) => void;
886
+ updateKey: (itemId: string, key: string) => void;
887
+ updateValue: (itemId: string, value: ValueType) => void;
888
+ remove: (itemId: string) => void;
889
+ };
890
+
891
+ export { AssignRow, AssignRows, type AssignValueType, BatchOutputs, BatchVariableSelector, BlurInput, CodeEditor, CodeEditorMini, type CodeEditorPropsType, ConditionRow, type ConditionRowValueType, ConstantInput, type Strategy as ConstantInputStrategy, type ConstantRendererProps, DisplayFlowValue, DisplayInputsValueAllInTag, DisplayInputsValues, DisplayOutputs, DisplaySchemaTag, DisplaySchemaTree, DynamicValueInput, type FlowValueType, FlowValueUtils, type IFlowConstantRefValue, type IFlowConstantValue, type IFlowExpressionValue, type IFlowRefValue, type IFlowTemplateValue, type IFlowValue, type IFlowValueExtra, InjectDynamicValueInput, InjectTypeSelector, InjectVariableSelector, InputsValues, InputsValuesTree, JsonEditorWithVariables, JsonSchemaEditor, JsonSchemaTypePresetProvider, type JsonSchemaTypeRegistry, PromptEditor, type PromptEditorPropsType, PromptEditorWithInputs, PromptEditorWithVariables, TypeSelector, type TypeSelectorProps, VariableSelector, type VariableSelectorProps, autoRenameRefEffect, createBatchOutputsFormPlugin, createDisableDeclarationPlugin, createInferAssignPlugin, createInferInputsPlugin, createInjectMaterial, createTypePresetPlugin, formatLegacyRefOnInit, formatLegacyRefOnSubmit, formatLegacyRefToNewRef, formatNewRefToLegacyRef, getTypeSelectValue, isLegacyFlowRefValueSchema, isNewFlowRefValueSchema, listenRefSchemaChange, listenRefValueChange, parseTypeSelectValue, provideBatchInputEffect, provideBatchOutputsEffect, provideJsonSchemaOutputs, syncVariableTitle, useObjectList, useTypeManager, useVariableTree, validateFlowValue, validateWhenVariableSync };
package/dist/index.d.ts CHANGED
@@ -183,7 +183,7 @@ interface IFlowValueExtra {
183
183
  type FlowValueType = 'constant' | 'ref' | 'expression' | 'template';
184
184
  interface IFlowConstantValue {
185
185
  type: 'constant';
186
- content?: string | number | boolean;
186
+ content?: any;
187
187
  schema?: IJsonSchema;
188
188
  extra?: IFlowValueExtra;
189
189
  }
@@ -327,7 +327,7 @@ declare function PromptEditorWithVariables(props: PromptEditorPropsType): React$
327
327
  */
328
328
 
329
329
  interface PropsType$7 extends PromptEditorPropsType {
330
- inputsValues: Record<string, IFlowValue>;
330
+ inputsValues: any;
331
331
  }
332
332
  declare function PromptEditorWithInputs({ inputsValues, ...restProps }: PropsType$7): React$1.JSX.Element;
333
333
 
@@ -449,10 +449,13 @@ declare function DisplayFlowValue({ value, title, showIconInTree }: PropsType$2)
449
449
  */
450
450
 
451
451
  interface PropsType$1 {
452
- value?: Record<string, IFlowValue | undefined>;
452
+ value?: any;
453
453
  showIconInTree?: boolean;
454
454
  }
455
455
  declare function DisplayInputsValues({ value, showIconInTree }: PropsType$1): React$1.JSX.Element;
456
+ declare function DisplayInputsValueAllInTag({ value, title, showIconInTree, }: PropsType$1 & {
457
+ title: string;
458
+ }): React$1.JSX.Element;
456
459
 
457
460
  /**
458
461
  * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
@@ -863,4 +866,26 @@ declare function validateFlowValue(value: IFlowValue | undefined, ctx: Context):
863
866
  message: string;
864
867
  } | undefined;
865
868
 
866
- export { AssignRow, AssignRows, type AssignValueType, BatchOutputs, BatchVariableSelector, BlurInput, CodeEditor, CodeEditorMini, type CodeEditorPropsType, ConditionRow, type ConditionRowValueType, ConstantInput, type Strategy as ConstantInputStrategy, type ConstantRendererProps, DisplayFlowValue, DisplayInputsValues, DisplayOutputs, DisplaySchemaTag, DisplaySchemaTree, DynamicValueInput, type FlowValueType, FlowValueUtils, type IFlowConstantRefValue, type IFlowConstantValue, type IFlowExpressionValue, type IFlowRefValue, type IFlowTemplateValue, type IFlowValue, type IFlowValueExtra, InjectDynamicValueInput, InjectTypeSelector, InjectVariableSelector, InputsValues, InputsValuesTree, JsonEditorWithVariables, JsonSchemaEditor, JsonSchemaTypePresetProvider, type JsonSchemaTypeRegistry, PromptEditor, type PromptEditorPropsType, PromptEditorWithInputs, PromptEditorWithVariables, TypeSelector, type TypeSelectorProps, VariableSelector, type VariableSelectorProps, autoRenameRefEffect, createBatchOutputsFormPlugin, createDisableDeclarationPlugin, createInferAssignPlugin, createInferInputsPlugin, createInjectMaterial, createTypePresetPlugin, formatLegacyRefOnInit, formatLegacyRefOnSubmit, formatLegacyRefToNewRef, formatNewRefToLegacyRef, getTypeSelectValue, isLegacyFlowRefValueSchema, isNewFlowRefValueSchema, listenRefSchemaChange, listenRefValueChange, parseTypeSelectValue, provideBatchInputEffect, provideBatchOutputsEffect, provideJsonSchemaOutputs, syncVariableTitle, useTypeManager, useVariableTree, validateFlowValue, validateWhenVariableSync };
869
+ /**
870
+ * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
871
+ * SPDX-License-Identifier: MIT
872
+ */
873
+ interface ListItem<ValueType> {
874
+ id: string;
875
+ key?: string;
876
+ value?: ValueType;
877
+ }
878
+ type ObjectType<ValueType> = Record<string, ValueType | undefined>;
879
+ declare function useObjectList<ValueType>({ value, onChange, sortIndexKey, }: {
880
+ value?: ObjectType<ValueType>;
881
+ onChange: (value?: ObjectType<ValueType>) => void;
882
+ sortIndexKey?: string | ((item: ValueType | undefined) => string);
883
+ }): {
884
+ list: ListItem<ValueType>[];
885
+ add: (defaultValue?: ValueType) => void;
886
+ updateKey: (itemId: string, key: string) => void;
887
+ updateValue: (itemId: string, value: ValueType) => void;
888
+ remove: (itemId: string) => void;
889
+ };
890
+
891
+ export { AssignRow, AssignRows, type AssignValueType, BatchOutputs, BatchVariableSelector, BlurInput, CodeEditor, CodeEditorMini, type CodeEditorPropsType, ConditionRow, type ConditionRowValueType, ConstantInput, type Strategy as ConstantInputStrategy, type ConstantRendererProps, DisplayFlowValue, DisplayInputsValueAllInTag, DisplayInputsValues, DisplayOutputs, DisplaySchemaTag, DisplaySchemaTree, DynamicValueInput, type FlowValueType, FlowValueUtils, type IFlowConstantRefValue, type IFlowConstantValue, type IFlowExpressionValue, type IFlowRefValue, type IFlowTemplateValue, type IFlowValue, type IFlowValueExtra, InjectDynamicValueInput, InjectTypeSelector, InjectVariableSelector, InputsValues, InputsValuesTree, JsonEditorWithVariables, JsonSchemaEditor, JsonSchemaTypePresetProvider, type JsonSchemaTypeRegistry, PromptEditor, type PromptEditorPropsType, PromptEditorWithInputs, PromptEditorWithVariables, TypeSelector, type TypeSelectorProps, VariableSelector, type VariableSelectorProps, autoRenameRefEffect, createBatchOutputsFormPlugin, createDisableDeclarationPlugin, createInferAssignPlugin, createInferInputsPlugin, createInjectMaterial, createTypePresetPlugin, formatLegacyRefOnInit, formatLegacyRefOnSubmit, formatLegacyRefToNewRef, formatNewRefToLegacyRef, getTypeSelectValue, isLegacyFlowRefValueSchema, isNewFlowRefValueSchema, listenRefSchemaChange, listenRefValueChange, parseTypeSelectValue, provideBatchInputEffect, provideBatchOutputsEffect, provideJsonSchemaOutputs, syncVariableTitle, useObjectList, useTypeManager, useVariableTree, validateFlowValue, validateWhenVariableSync };