@overmap-ai/core 1.0.28-integrate-forms.0 → 1.0.28-integrate-forms.2

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.
@@ -3,7 +3,7 @@ import { GetInputProps } from "../../typings";
3
3
  import React from "react";
4
4
  import { InputIcon } from "@radix-ui/react-icons";
5
5
  import { ISerializedField, SerializedStringField, StringInputType } from "../../../typings.ts";
6
- interface StringFieldOptions extends Omit<StringOrTextFieldOptions, "type"> {
6
+ export interface StringFieldOptions extends Omit<StringOrTextFieldOptions, "type"> {
7
7
  inputType?: StringInputType;
8
8
  }
9
9
  export declare class StringField extends StringOrTextField<"string"> {
@@ -16,4 +16,3 @@ export declare class StringField extends StringOrTextField<"string"> {
16
16
  static deserialize(data: ISerializedField): StringField;
17
17
  getInput(props: GetInputProps<this>): React.ReactNode;
18
18
  }
19
- export {};
@@ -2,5 +2,5 @@ import { GetInputProps } from "./typings";
2
2
  import { ReactNode } from "react";
3
3
  import { BaseField, BaseFormElement } from "./BaseField";
4
4
  import { FieldValue } from "../typings.ts";
5
- export declare const useFieldInput: <TField extends BaseFormElement<import("../typings.ts").FieldTypeIdentifier> | null>(field: TField, props: TField extends BaseFormElement<import("../typings.ts").FieldTypeIdentifier> ? GetInputProps<TField> : null) => ReactNode;
5
+ export declare const useFieldInput: <TField extends BaseFormElement<import("../typings.ts").FieldTypeIdentifier> | null>(field: TField, props: TField extends BaseFormElement ? GetInputProps<TField> : null) => ReactNode;
6
6
  export declare const useFieldInputs: (fields: BaseFormElement[], props: GetInputProps<BaseField<FieldValue>>) => ReactNode;
@@ -1,4 +1,4 @@
1
- export * from "./typings";
1
+ export type * from "./typings";
2
2
  export * from "./builder";
3
3
  export * from "./fields";
4
4
  export * from "./renderer";
@@ -11,5 +11,8 @@ interface PatchFieldProps {
11
11
  name: string;
12
12
  render: (args: RenderArgs) => ReactNode;
13
13
  }
14
- export declare const PatchField: import("react").MemoExoticComponent<(props: PatchFieldProps) => ReactNode>;
14
+ export declare const PatchField: {
15
+ (props: PatchFieldProps): null;
16
+ displayName: string;
17
+ };
15
18
  export {};
@@ -9645,23 +9645,10 @@ const FormSubmissionBrowser = memo(function FormSubmissionBrowser2(props) {
9645
9645
  }
9646
9646
  );
9647
9647
  });
9648
- const PatchField = memo((props) => {
9649
- const { name, render } = props;
9650
- const { submitForm } = useFormikContext();
9651
- const [fieldProps, _meta, helpers] = useField(name);
9652
- return useMemo(() => {
9653
- const setValue = (value) => {
9654
- void helpers.setValue(value, false);
9655
- };
9656
- return render({
9657
- value: fieldProps.value,
9658
- setValue,
9659
- patchValue: () => {
9660
- void submitForm();
9661
- }
9662
- });
9663
- }, [submitForm, helpers, fieldProps.value, render]);
9664
- });
9648
+ const PatchField = (props) => {
9649
+ console.log("PatchField props:", props);
9650
+ return null;
9651
+ };
9665
9652
  PatchField.displayName = "PatchField";
9666
9653
  const PatchFormProvider = memo(
9667
9654
  forwardRef((props, ref) => {
@@ -10093,7 +10080,7 @@ const FieldWithActions = memo(function FieldWithActions2(props) {
10093
10080
  ) });
10094
10081
  });
10095
10082
  const FieldSectionWithActions = memo(function FieldSectionWithActions2(props) {
10096
- var _a2, _b, _c, _d, _e, _f, _g, _h, _i;
10083
+ var _a2, _b, _c, _d, _e, _f, _g;
10097
10084
  const { field, index: sectionIndex, dropState } = props;
10098
10085
  const isDropDisabled = (_a2 = dropState[field.identifier]) == null ? void 0 : _a2.disabled;
10099
10086
  const [isAddFieldDialogOpen, setIsAddFieldDialogOpen] = useState(false);
@@ -10247,7 +10234,7 @@ const FieldSectionWithActions = memo(function FieldSectionWithActions2(props) {
10247
10234
  const conditionComparison = Array.isArray((_c = field.condition) == null ? void 0 : _c.value) ? "contains all of" : "equals";
10248
10235
  if (valueIsFile((_d = field.condition) == null ? void 0 : _d.value))
10249
10236
  throw new Error("File values are not supported for conditions.");
10250
- const conditionValue = Array.isArray((_e = field.condition) == null ? void 0 : _e.value) ? (_g = (_f = field.condition) == null ? void 0 : _f.value) == null ? void 0 : _g.map((v) => typeof v === "string" ? v : v.label).join(", ") : (_i = (_h = field.condition) == null ? void 0 : _h.value) == null ? void 0 : _i.toString();
10237
+ const conditionValue = Array.isArray((_e = field.condition) == null ? void 0 : _e.value) ? field.condition.value.map((v) => typeof v === "string" ? v : v.label).join(", ") : (_g = (_f = field.condition) == null ? void 0 : _f.value) == null ? void 0 : _g.toString();
10251
10238
  return /* @__PURE__ */ jsx(Draggable, { draggableId: field.identifier, index: sectionIndex, children: (draggableProvided) => /* @__PURE__ */ jsx(
10252
10239
  Card,
10253
10240
  {