@overmap-ai/forms 1.0.35-gcs.1 → 1.0.35-gcs.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.
- package/dist/FileCard/FileCard.d.ts +4 -3
- package/dist/ImageCard/ImageCard.d.ts +4 -3
- package/dist/ImageFile/index.d.ts +0 -1
- package/dist/VideoCard/VideoCard.d.ts +8 -0
- package/dist/VideoCard/index.d.ts +1 -0
- package/dist/VideoFile/VideoFile.d.ts +5 -0
- package/dist/VideoFile/index.d.ts +1 -0
- package/dist/form/components/DisplayFile.d.ts +2 -0
- package/dist/form/conditions/utils.d.ts +3 -0
- package/dist/form/fields/BaseFormElement/typings.d.ts +1 -0
- package/dist/form/fields/hooks.d.ts +2 -2
- package/dist/form/schema/FieldSchema.d.ts +5 -2
- package/dist/forms.js +2529 -2425
- package/dist/forms.umd.cjs +56 -51
- package/dist/index.d.ts +3 -0
- package/package.json +3 -8
- /package/dist/{ImageFile/hooks.d.ts → hooks.d.ts} +0 -0
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { Card } from '@overmap-ai/blocks';
|
|
2
|
+
import { ComponentProps, ReactNode } from 'react';
|
|
3
|
+
export interface FileCardProps extends Omit<ComponentProps<typeof Card>, "children"> {
|
|
3
4
|
file: File | null;
|
|
4
5
|
error?: string;
|
|
5
6
|
rightSlot?: ReactNode;
|
|
6
7
|
}
|
|
7
|
-
export declare const FileCard: import('react').NamedExoticComponent<FileCardProps
|
|
8
|
+
export declare const FileCard: import('react').NamedExoticComponent<FileCardProps>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { Card } from '@overmap-ai/blocks';
|
|
2
|
+
import { ComponentProps, ReactNode } from 'react';
|
|
3
|
+
export interface ImageCardProps extends Omit<ComponentProps<typeof Card>, "children"> {
|
|
3
4
|
file: File | null;
|
|
4
5
|
error?: string;
|
|
5
6
|
rightSlot?: ReactNode;
|
|
6
7
|
}
|
|
7
|
-
export declare const ImageCard: import('react').NamedExoticComponent<ImageCardProps
|
|
8
|
+
export declare const ImageCard: import('react').NamedExoticComponent<ImageCardProps>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Card } from '@overmap-ai/blocks';
|
|
2
|
+
import { ComponentProps, ReactNode } from 'react';
|
|
3
|
+
export interface VideoCardProps extends Omit<ComponentProps<typeof Card>, "children"> {
|
|
4
|
+
file: File | null;
|
|
5
|
+
error?: string;
|
|
6
|
+
rightSlot?: ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export declare const VideoCard: import('react').NamedExoticComponent<VideoCardProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './VideoCard';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './VideoFile';
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import { FieldsRendererSize } from '../renderer';
|
|
1
2
|
import { UUIDFile } from '../UUIDFile';
|
|
2
3
|
import { UUIDPromise } from '../UUIDPromise';
|
|
3
4
|
interface DisplayFileProps {
|
|
4
5
|
file: UUIDFile | UUIDPromise<UUIDFile>;
|
|
5
6
|
disabled?: boolean;
|
|
6
7
|
onRemove: () => void;
|
|
8
|
+
size: FieldsRendererSize;
|
|
7
9
|
}
|
|
8
10
|
export declare const DisplayFile: import('react').MemoExoticComponent<(props: DisplayFileProps) => import("react/jsx-runtime").JSX.Element>;
|
|
9
11
|
export {};
|
|
@@ -2,3 +2,6 @@ import { Condition, SerializedCondition } from './typings';
|
|
|
2
2
|
import { Field } from '../fields';
|
|
3
3
|
export declare const deserializeCondition: (field: Field, serializedCondition: SerializedCondition) => Condition;
|
|
4
4
|
export declare const deserializeConditions: (fields: Field[], serializedConditions: SerializedCondition[]) => Condition[];
|
|
5
|
+
export declare const serializeConditions: (fields: Field[], conditions: Condition[]) => SerializedCondition[];
|
|
6
|
+
export declare const cleanSerializedConditions: (fields: Field[], serializedConditions: SerializedCondition[]) => SerializedCondition[];
|
|
7
|
+
export declare const cleanConditions: (fields: Field[], conditions: Condition[]) => Condition[];
|
|
@@ -9,6 +9,7 @@ export interface BaseSerializedFormElement<TType extends string> {
|
|
|
9
9
|
export interface FieldRenderProps {
|
|
10
10
|
formId: string;
|
|
11
11
|
size: FieldsRendererSize;
|
|
12
|
+
index: number;
|
|
12
13
|
disabled?: boolean;
|
|
13
14
|
onValuesChange?: (identifier: string, value: any) => void;
|
|
14
15
|
showInputOnly?: boolean;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { AnyField, AnyFormElement, ValueOfField } from './typings';
|
|
3
3
|
import { FieldRenderProps } from './BaseFormElement';
|
|
4
|
-
export declare const
|
|
5
|
-
export declare const useFieldInputs: (fields: AnyFormElement[], props: FieldRenderProps) => ReactNode;
|
|
4
|
+
export declare const useFieldInputs: (fields: AnyFormElement[], props: Omit<FieldRenderProps, "index">) => ReactNode;
|
|
6
5
|
export declare const useFormikInput: <TField extends AnyField>(props: FieldRenderProps & {
|
|
7
6
|
field: TField;
|
|
8
7
|
}) => readonly [{
|
|
@@ -27,5 +26,6 @@ export declare const useFormikInput: <TField extends AnyField>(props: FieldRende
|
|
|
27
26
|
}, {
|
|
28
27
|
readonly "aria-labelledby": string;
|
|
29
28
|
readonly formId: string;
|
|
29
|
+
readonly index: number;
|
|
30
30
|
readonly disabled?: boolean;
|
|
31
31
|
}];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DirectedGraph } from 'graphology';
|
|
2
2
|
import { FieldFilesAndPromises, FieldValues, SerializedFieldValues } from '../typings';
|
|
3
3
|
import { ReseedOptions } from '../builder/list/sectionSerialization';
|
|
4
|
-
import { SerializedCondition } from '../conditions';
|
|
4
|
+
import { Condition, SerializedCondition } from '../conditions';
|
|
5
5
|
import { Field, FieldSection, FieldSectionManager, SerializedFieldSection } from '../fields';
|
|
6
6
|
import { Observable } from '../Observable';
|
|
7
7
|
export declare class FieldSchema extends Observable<FieldSchema> implements FieldSectionManager {
|
|
@@ -25,7 +25,10 @@ export declare class FieldSchema extends Observable<FieldSchema> implements Fiel
|
|
|
25
25
|
serializeValues(values: FieldValues, clean?: boolean): SerializedFieldValues;
|
|
26
26
|
initializeValues(values: FieldValues): FieldValues;
|
|
27
27
|
validateValues(values: FieldValues): import('formik').FormikErrors<FieldValues> | undefined;
|
|
28
|
-
deserializeConditions(
|
|
28
|
+
deserializeConditions(serializedConditions: SerializedCondition[]): Condition[];
|
|
29
|
+
cleanConditions(conditions: Condition[]): Condition[];
|
|
30
|
+
serializeConditions(conditions: Condition[]): SerializedCondition[];
|
|
31
|
+
cleanSerializedConditions(serializedConditions: SerializedCondition[]): SerializedCondition[];
|
|
29
32
|
changedFieldValues(values1: FieldValues, values2: FieldValues): FieldValues;
|
|
30
33
|
unchangedFieldValues(values1: FieldValues, values2: FieldValues): FieldValues;
|
|
31
34
|
areValuesEqual(values1: FieldValues, values2: FieldValues): boolean;
|