@overmap-ai/core 1.0.38 → 1.0.39

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.
@@ -5,6 +5,7 @@ interface FieldSectionWithActionsProps {
5
5
  field: SerializedFieldSection;
6
6
  index: number;
7
7
  dropState: DropState;
8
+ fieldsOnly: boolean;
8
9
  }
9
10
  export declare const FieldSectionWithActions: import("react").MemoExoticComponent<(props: FieldSectionWithActionsProps) => import("react/jsx-runtime").JSX.Element>;
10
11
  export {};
@@ -4,7 +4,6 @@ interface FieldWithActionsProps {
4
4
  field: ISerializedField;
5
5
  index: number;
6
6
  sectionIndex: number;
7
- takenLabels: string[];
8
7
  remove: () => void;
9
8
  }
10
9
  export declare const FieldWithActions: import("react").MemoExoticComponent<(props: FieldWithActionsProps) => import("react/jsx-runtime").JSX.Element>;
@@ -1,2 +1,6 @@
1
1
  /// <reference types="react" />
2
- export declare const FieldsEditor: import("react").MemoExoticComponent<() => import("react/jsx-runtime").JSX.Element>;
2
+ interface FieldsEditorProps {
3
+ fieldsOnly: boolean;
4
+ }
5
+ export declare const FieldsEditor: import("react").MemoExoticComponent<(props: FieldsEditorProps) => import("react/jsx-runtime").JSX.Element>;
6
+ export {};
@@ -6,6 +6,20 @@ interface FormBuilderProps {
6
6
  onSave: FormBuilderSaveHandler;
7
7
  /** A revision of an existing form to edit. To create a new form, pass `undefined`. */
8
8
  revision?: UserFormRevision;
9
+ initialTitle?: string;
10
+ /** @default true */
11
+ showExplainerText?: boolean;
12
+ /** @default true */
13
+ showFormTitle?: boolean;
14
+ /** Show and edit non-section fields only. Functionally, these fields will be in a single section with no label
15
+ * @default false
16
+ */
17
+ fieldsOnly?: boolean;
18
+ /** Show the Edit and Preview tabs at the top of the component. If false, the preview is entirely inaccessible.
19
+ * @default true
20
+ */
21
+ showTabs?: boolean;
22
+ tabsListClassName?: string;
9
23
  }
10
24
  export declare const FormBuilder: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<FormBuilderProps & import("react").RefAttributes<HTMLDivElement>>>;
11
25
  export {};
@@ -13,8 +13,6 @@ export declare function remove<T>(list: T[], index: number): T[];
13
13
  export declare const makeIdentifier: (existing: unknown, label: string) => string;
14
14
  export declare const findFieldByIdentifier: (fields: ISerializedField[], identifier?: string) => ISerializedField | null;
15
15
  export declare const makeConditionalSourceFields: (sections: SerializedFieldSection[], index: number) => (import("../typings").SerializedTextField | import("../typings").SerializedBooleanField | import("../typings").SerializedNumberField | import("../typings").SerializedDateField | import("../typings").SerializedStringField | import("../typings").SerializedSelectField | import("../typings").SerializedMultiStringField | import("../typings").SerializedMultiSelectField | import("../typings").SerializedUploadField)[];
16
- export declare const getTakenFieldLabels: (fields: SerializedFieldSection[]) => string[];
17
- export declare const incrementFieldLabel: (label: string, takenLabels: string[]) => string;
18
16
  export type NewFieldInitialValues = Omit<ISerializedField, "identifier"> & {
19
17
  label: string;
20
18
  };
@@ -1,6 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { ISchema } from "../../fields";
3
3
  import { Form } from "../../typings";
4
+ import { ButtonProps } from "@overmap-ai/blocks/dist/Buttons/typings";
4
5
  interface FormRendererProps {
5
6
  /** The schema of the form the render */
6
7
  schema: ISchema;
@@ -24,6 +25,7 @@ interface FormRendererProps {
24
25
  */
25
26
  hideTitle?: boolean;
26
27
  className?: string;
28
+ buttonProps?: Omit<ButtonProps, "children">;
27
29
  }
28
30
  export declare const FormRenderer: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<FormRendererProps & import("react").RefAttributes<HTMLDivElement>>>;
29
31
  export {};
@@ -24,5 +24,5 @@ interface FormSubmissionBrowserProps {
24
24
  /** Content displayed within the container but after the list */
25
25
  after?: ReactNode;
26
26
  }
27
- export declare const FormSubmissionBrowser: import("react").NamedExoticComponent<FormSubmissionBrowserProps>;
27
+ export declare const FormSubmissionBrowser: import("react").MemoExoticComponent<(props: FormSubmissionBrowserProps) => import("react/jsx-runtime").JSX.Element>;
28
28
  export {};
@@ -6,4 +6,4 @@ import { UserFormRevision } from "../typings";
6
6
  export declare const hasKeys: (errors: object) => boolean;
7
7
  export declare const validateForm: (schema: ISchema, form: Form | FormikUserFormRevision) => FormikErrors<Form> | FormikErrors<import('./builder/typings').NewForm> | undefined;
8
8
  export declare const initialFormValues: (fields: BaseFormElement[], values: Form) => Form;
9
- export declare const useAttachImagesToFormRevisionFields: (revision: UserFormRevision) => UserFormRevision;
9
+ export declare const useAttachImagesToFormRevisionFields: (revision: UserFormRevision | undefined) => UserFormRevision | undefined;