@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.
- package/dist/forms/fields/StringOrTextFields/StringField/StringField.d.ts +1 -2
- package/dist/forms/fields/hooks.d.ts +1 -1
- package/dist/forms/index.d.ts +1 -1
- package/dist/forms/renderer/PatchForm/Field.d.ts +4 -1
- package/dist/overmap-core.js +6 -19
- package/dist/overmap-core.js.map +1 -1
- package/dist/overmap-core.umd.cjs +6 -19
- package/dist/overmap-core.umd.cjs.map +1 -1
- package/dist/sdk/classes/OutboxCoordinator.d.ts +1 -0
- package/dist/store/slices/categorySlice.d.ts +21 -21
- package/dist/store/slices/issueSlice.d.ts +19 -19
- package/dist/store/slices/projectFileSlice.d.ts +20 -20
- package/dist/store/slices/userFormSlice.d.ts +10 -10
- package/dist/store/slices/workspaceSlice.d.ts +21 -21
- package/dist/store/store.d.ts +64 -63
- package/dist/typings/models/store.d.ts +1 -0
- package/package.json +1 -1
|
@@ -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
|
|
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;
|
package/dist/forms/index.d.ts
CHANGED
|
@@ -11,5 +11,8 @@ interface PatchFieldProps {
|
|
|
11
11
|
name: string;
|
|
12
12
|
render: (args: RenderArgs) => ReactNode;
|
|
13
13
|
}
|
|
14
|
-
export declare const PatchField:
|
|
14
|
+
export declare const PatchField: {
|
|
15
|
+
(props: PatchFieldProps): null;
|
|
16
|
+
displayName: string;
|
|
17
|
+
};
|
|
15
18
|
export {};
|
package/dist/overmap-core.js
CHANGED
|
@@ -9645,23 +9645,10 @@ const FormSubmissionBrowser = memo(function FormSubmissionBrowser2(props) {
|
|
|
9645
9645
|
}
|
|
9646
9646
|
);
|
|
9647
9647
|
});
|
|
9648
|
-
const PatchField =
|
|
9649
|
-
|
|
9650
|
-
|
|
9651
|
-
|
|
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
|
|
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) ?
|
|
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
|
{
|