@overmap-ai/forms 1.1.5-fields-json-types.0 → 1.1.5-fields-json-types.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.
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { JSONFieldSection } from '@adrekic/fieldsjson';
|
|
2
1
|
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { FieldSchemaConfig } from '../schema';
|
|
3
3
|
import { FormBuilderSaveHandler } from './typings';
|
|
4
4
|
export interface FormBuilderRootProps extends PropsWithChildren {
|
|
5
|
-
initialFields?:
|
|
5
|
+
initialFields?: FieldSchemaConfig;
|
|
6
6
|
onSave: FormBuilderSaveHandler;
|
|
7
7
|
onCancel?: () => void;
|
|
8
8
|
disableRequiredFields?: boolean;
|
|
@@ -5,5 +5,6 @@ export interface FieldDropdownMenuProps extends MenuRootProps, MenuVariantProps
|
|
|
5
5
|
children: ReactElement;
|
|
6
6
|
fields: Field[];
|
|
7
7
|
onSelectField: (field: Field) => void;
|
|
8
|
+
onSelectAllFields?: (fields: Field[]) => void;
|
|
8
9
|
}
|
|
9
10
|
export declare const FieldDropdownMenu: import('react').NamedExoticComponent<FieldDropdownMenuProps>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FieldSchemaConfig } from '../schema';
|
|
2
2
|
export interface FormBuilderValues {
|
|
3
|
-
fields:
|
|
3
|
+
fields: FieldSchemaConfig;
|
|
4
4
|
}
|
|
5
5
|
export type FormBuilderSaveHandler = (values: FormBuilderValues) => void;
|
|
6
6
|
/** Using `lodash.get` and `lodash.set`, we can set and get attributes of nested objects using a string path. This is
|