@overmap-ai/forms 1.0.3 → 1.0.4-form-editor-revamp.0

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,5 +1,5 @@
1
1
  import { NestedFieldPath } from "./typings";
2
- import { FC, ReactNode } from "react";
2
+ import { FC } from "react";
3
3
  import { FieldTypeIdentifier, ISerializedField } from "@overmap-ai/core";
4
4
  import { Form } from '../typings';
5
5
  interface FieldOptionsFormProps {
@@ -15,7 +15,7 @@ interface FieldBuilderProps extends Pick<FieldOptionsFormProps, "conditionalSour
15
15
  parentPath: NestedFieldPath;
16
16
  initial?: ISerializedField;
17
17
  editing?: boolean;
18
- children: ReactNode;
18
+ onComplete: () => void;
19
19
  }
20
20
  export type FieldBuilderArgs = Omit<FieldBuilderProps, "children">;
21
21
  export declare const FieldBuilder: FC<FieldBuilderProps>;
@@ -6,5 +6,6 @@ interface FieldSectionWithActionsProps {
6
6
  index: number;
7
7
  dropState: DropState;
8
8
  }
9
+ export type FieldModeTypes = "display" | "edit";
9
10
  export declare const FieldSectionWithActions: import("react").NamedExoticComponent<FieldSectionWithActionsProps>;
10
11
  export {};
@@ -1,11 +1,14 @@
1
1
  /// <reference types="react" />
2
2
  import { ISerializedField } from "@overmap-ai/core";
3
+ import { FieldModeTypes } from "./FieldSectionWithActions.tsx";
3
4
  interface FieldWithActionsProps {
4
5
  field: ISerializedField;
5
6
  index: number;
6
7
  sectionIndex: number;
8
+ mode: FieldModeTypes;
7
9
  takenLabels: string[];
8
10
  remove: () => void;
11
+ onModeChange: (mode: FieldModeTypes) => void;
9
12
  }
10
13
  export declare const FieldWithActions: import("react").NamedExoticComponent<FieldWithActionsProps>;
11
14
  export {};