@overmap-ai/forms 1.0.30 → 1.0.32-condition-manager.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.
- package/dist/ImageViewer/context.d.ts +2 -2
- package/dist/ImageViewer/typings.d.ts +1 -1
- package/dist/Scanner/Scanner.d.ts +7 -0
- package/dist/Scanner/ScannerProvider.d.ts +2 -0
- package/dist/Scanner/constants.d.ts +3 -0
- package/dist/Scanner/context.d.ts +3 -0
- package/dist/Scanner/hooks.d.ts +1 -0
- package/dist/Scanner/index.d.ts +4 -0
- package/dist/Scanner/typings.d.ts +5 -0
- package/dist/form/Observable/Observable.d.ts +5 -0
- package/dist/form/Observable/index.d.ts +1 -0
- package/dist/form/UUIDFile/UUIDFile.d.ts +5 -0
- package/dist/form/UUIDFile/index.d.ts +1 -0
- package/dist/form/UUIDPromise/UUIDPromise.d.ts +10 -0
- package/dist/form/UUIDPromise/index.d.ts +2 -0
- package/dist/form/UUIDPromise/utils.d.ts +4 -0
- package/dist/form/builder/Root.d.ts +15 -0
- package/dist/form/builder/components/FieldBuilder.d.ts +8 -0
- package/dist/form/builder/components/FieldDropdownMenu.d.ts +9 -0
- package/dist/form/builder/components/FieldSectionDropdownMenu.d.ts +9 -0
- package/dist/form/builder/{FieldWithActions.d.ts → components/FieldWithActions.d.ts} +4 -3
- package/dist/form/builder/components/index.d.ts +5 -0
- package/dist/form/builder/constants.d.ts +2 -19
- package/dist/form/builder/context.d.ts +3 -1
- package/dist/form/builder/flow/FieldSectionConditionEdge.d.ts +3 -0
- package/dist/form/builder/flow/FieldSectionNode.d.ts +3 -0
- package/dist/form/builder/flow/FlowBuilder.d.ts +1 -0
- package/dist/form/builder/flow/constants.d.ts +3 -0
- package/dist/form/builder/flow/index.d.ts +2 -0
- package/dist/form/builder/flow/layout.d.ts +2 -0
- package/dist/form/builder/flow/typings.d.ts +15 -0
- package/dist/form/builder/hooks.d.ts +4 -4
- package/dist/form/builder/index.d.ts +8 -1
- package/dist/form/builder/list/FieldSectionBuilder.d.ts +5 -0
- package/dist/form/builder/list/FieldSectionConditionalItem.d.ts +7 -0
- package/dist/form/builder/list/FieldSectionWithActions.d.ts +6 -0
- package/dist/form/builder/list/ListBuilder.d.ts +1 -0
- package/dist/form/builder/list/index.d.ts +1 -0
- package/dist/form/builder/preview/Preview.d.ts +4 -0
- package/dist/form/builder/preview/index.d.ts +1 -0
- package/dist/form/builder/utils.d.ts +5 -24
- package/dist/form/components/DisplayFile.d.ts +9 -0
- package/dist/form/components/index.d.ts +1 -0
- package/dist/form/conditions/BaseCondition/BaseCondition.d.ts +30 -0
- package/dist/form/conditions/BaseCondition/index.d.ts +2 -0
- package/dist/form/conditions/BaseCondition/typings.d.ts +18 -0
- package/dist/form/conditions/BooleanFieldCondition/BooleanFieldCondition.d.ts +17 -0
- package/dist/form/conditions/BooleanFieldCondition/BooleanFieldConditionCell.d.ts +6 -0
- package/dist/form/conditions/BooleanFieldCondition/index.d.ts +3 -0
- package/dist/form/conditions/BooleanFieldCondition/typings.d.ts +4 -0
- package/dist/form/conditions/CheckboxListFieldCondition/CheckboxListFieldCondition.d.ts +20 -0
- package/dist/form/conditions/CheckboxListFieldCondition/CheckboxListFieldConditionCell.d.ts +6 -0
- package/dist/form/conditions/CheckboxListFieldCondition/index.d.ts +3 -0
- package/dist/form/conditions/CheckboxListFieldCondition/typings.d.ts +4 -0
- package/dist/form/conditions/ConditionManager/ConditionManager.d.ts +15 -0
- package/dist/form/conditions/ConditionManager/hooks.d.ts +4 -0
- package/dist/form/conditions/ConditionManager/index.d.ts +3 -0
- package/dist/form/conditions/ConditionManager/typings.d.ts +2 -0
- package/dist/form/conditions/DateFieldCondition/DateFieldCondition.d.ts +22 -0
- package/dist/form/conditions/DateFieldCondition/DateFieldConditionCell.d.ts +6 -0
- package/dist/form/conditions/DateFieldCondition/index.d.ts +3 -0
- package/dist/form/conditions/DateFieldCondition/typings.d.ts +4 -0
- package/dist/form/conditions/MultiSelectFieldCondition/MultiSelectFieldCondition.d.ts +28 -0
- package/dist/form/conditions/MultiSelectFieldCondition/MultiSelectFieldConditionCell.d.ts +6 -0
- package/dist/form/conditions/MultiSelectFieldCondition/index.d.ts +3 -0
- package/dist/form/conditions/MultiSelectFieldCondition/typings.d.ts +4 -0
- package/dist/form/conditions/MultiStringFieldCondition/MultiStringFieldCondition.d.ts +20 -0
- package/dist/form/conditions/MultiStringFieldCondition/MultiStringFieldConditionCell.d.ts +6 -0
- package/dist/form/conditions/MultiStringFieldCondition/index.d.ts +3 -0
- package/dist/form/conditions/MultiStringFieldCondition/typings.d.ts +4 -0
- package/dist/form/conditions/NumberFieldCondition/NumberFieldCondition.d.ts +34 -0
- package/dist/form/conditions/NumberFieldCondition/NumberFieldConditionCell.d.ts +6 -0
- package/dist/form/conditions/NumberFieldCondition/index.d.ts +3 -0
- package/dist/form/conditions/NumberFieldCondition/typings.d.ts +4 -0
- package/dist/form/conditions/OTPFieldCondition/OTPFieldCondition.d.ts +19 -0
- package/dist/form/conditions/OTPFieldCondition/OTPFieldConditionCell.d.ts +6 -0
- package/dist/form/conditions/OTPFieldCondition/index.d.ts +3 -0
- package/dist/form/conditions/OTPFieldCondition/typings.d.ts +4 -0
- package/dist/form/conditions/PassFailFieldCondition/PassFailFieldCondition.d.ts +20 -0
- package/dist/form/conditions/PassFailFieldCondition/PassFailFieldConditionCell.d.ts +6 -0
- package/dist/form/conditions/PassFailFieldCondition/index.d.ts +3 -0
- package/dist/form/conditions/PassFailFieldCondition/typings.d.ts +4 -0
- package/dist/form/conditions/RadioFieldCondition/RadioFieldCondition.d.ts +19 -0
- package/dist/form/conditions/RadioFieldCondition/RadioFieldConditionCell.d.ts +6 -0
- package/dist/form/conditions/RadioFieldCondition/index.d.ts +3 -0
- package/dist/form/conditions/RadioFieldCondition/typings.d.ts +4 -0
- package/dist/form/conditions/ScanFieldCondition/ScanFieldCondition.d.ts +19 -0
- package/dist/form/conditions/ScanFieldCondition/ScanFieldConditionCell.d.ts +6 -0
- package/dist/form/conditions/ScanFieldCondition/index.d.ts +3 -0
- package/dist/form/conditions/ScanFieldCondition/typings.d.ts +4 -0
- package/dist/form/conditions/SelectFieldCondition/SelectFieldCondition.d.ts +19 -0
- package/dist/form/conditions/SelectFieldCondition/SelectFieldConditionCell.d.ts +6 -0
- package/dist/form/conditions/SelectFieldCondition/index.d.ts +3 -0
- package/dist/form/conditions/SelectFieldCondition/typings.d.ts +4 -0
- package/dist/form/conditions/StringFieldCondition/StringFieldCondition.d.ts +19 -0
- package/dist/form/conditions/StringFieldCondition/StringFieldConditionCell.d.ts +6 -0
- package/dist/form/conditions/StringFieldCondition/index.d.ts +3 -0
- package/dist/form/conditions/StringFieldCondition/typings.d.ts +4 -0
- package/dist/form/conditions/TextFieldCondition/TextFieldCondition.d.ts +20 -0
- package/dist/form/conditions/TextFieldCondition/TextFieldConditionCell.d.ts +6 -0
- package/dist/form/conditions/TextFieldCondition/index.d.ts +3 -0
- package/dist/form/conditions/TextFieldCondition/typings.d.ts +4 -0
- package/dist/form/conditions/UploadFieldCondition/UploadFieldCondition.d.ts +19 -0
- package/dist/form/conditions/UploadFieldCondition/UploadFieldConditionCell.d.ts +6 -0
- package/dist/form/conditions/UploadFieldCondition/index.d.ts +3 -0
- package/dist/form/conditions/UploadFieldCondition/typings.d.ts +4 -0
- package/dist/form/conditions/components/ConditionModifierDropdown.d.ts +9 -0
- package/dist/form/conditions/components/DayPickerPopover.d.ts +4 -0
- package/dist/form/conditions/components/MultiStringPopover.d.ts +9 -0
- package/dist/form/conditions/components/NumberInputPopover.d.ts +9 -0
- package/dist/form/conditions/components/RemoveConditionButton.d.ts +11 -0
- package/dist/form/conditions/components/SelectFieldOptionMultiSelectGroup.d.ts +6 -0
- package/dist/form/conditions/components/SelectFieldOptionSelectGroup.d.ts +6 -0
- package/dist/form/conditions/components/TextInputPopover.d.ts +9 -0
- package/dist/form/conditions/components/constants.d.ts +4 -0
- package/dist/form/conditions/components/index.d.ts +9 -0
- package/dist/form/conditions/index.d.ts +18 -0
- package/dist/form/conditions/typings.d.ts +28 -0
- package/dist/form/conditions/utils.d.ts +6 -0
- package/dist/form/fields/BaseField/BaseField.d.ts +20 -41
- package/dist/form/fields/BaseField/index.d.ts +0 -1
- package/dist/form/fields/BaseField/typings.d.ts +13 -9
- package/dist/form/fields/BaseFormElement/BaseFormElement.d.ts +13 -0
- package/dist/form/fields/BaseFormElement/index.d.ts +2 -0
- package/dist/form/fields/BaseFormElement/typings.d.ts +15 -0
- package/dist/form/fields/BaseOptionsField/BaseOptionsField.d.ts +14 -0
- package/dist/form/fields/BaseOptionsField/index.d.ts +2 -0
- package/dist/form/fields/BaseOptionsField/typings.d.ts +9 -0
- package/dist/form/fields/BaseStringField/BaseStringField.d.ts +28 -0
- package/dist/form/fields/BaseStringField/index.d.ts +2 -0
- package/dist/form/fields/{StringOrTextField → BaseStringField}/typings.d.ts +1 -1
- package/dist/form/fields/BooleanField/BooleanField.d.ts +19 -16
- package/dist/form/fields/BooleanField/BooleanInput.d.ts +6 -2
- package/dist/form/fields/BooleanField/typings.d.ts +1 -2
- package/dist/form/fields/CheckboxListField/CheckboxListField.d.ts +16 -23
- package/dist/form/fields/CheckboxListField/CheckboxListInput.d.ts +6 -2
- package/dist/form/fields/CheckboxListField/typings.d.ts +2 -3
- package/dist/form/fields/DateField/DateField.d.ts +22 -14
- package/dist/form/fields/DateField/DateInput.d.ts +6 -2
- package/dist/form/fields/DateField/typings.d.ts +1 -2
- package/dist/form/fields/FieldSection/FieldSection.d.ts +39 -28
- package/dist/form/fields/FieldSection/FieldSectionLayout.d.ts +6 -5
- package/dist/form/fields/FieldSection/typings.d.ts +9 -11
- package/dist/form/fields/MultiSelectField/MultiSelectField.d.ts +18 -19
- package/dist/form/fields/MultiSelectField/MultiSelectInput.d.ts +5 -2
- package/dist/form/fields/MultiSelectField/typings.d.ts +2 -5
- package/dist/form/fields/MultiStringField/MultiStringField.d.ts +21 -29
- package/dist/form/fields/MultiStringField/MultiStringInput.d.ts +6 -6
- package/dist/form/fields/MultiStringField/typings.d.ts +5 -3
- package/dist/form/fields/NumberField/NumberField.d.ts +24 -23
- package/dist/form/fields/NumberField/NumberInput.d.ts +6 -2
- package/dist/form/fields/NumberField/typings.d.ts +1 -2
- package/dist/form/fields/OneTimePasswordField/OTPField.d.ts +38 -0
- package/dist/form/fields/OneTimePasswordField/OTPInput.d.ts +7 -0
- package/dist/form/fields/OneTimePasswordField/index.d.ts +3 -0
- package/dist/form/fields/OneTimePasswordField/typings.d.ts +8 -0
- package/dist/form/fields/PassFailField/PassFailField.d.ts +30 -0
- package/dist/form/fields/PassFailField/PassFailInput.d.ts +7 -0
- package/dist/form/fields/PassFailField/constants.d.ts +7 -0
- package/dist/form/fields/PassFailField/index.d.ts +5 -0
- package/dist/form/fields/PassFailField/typings.d.ts +17 -0
- package/dist/form/fields/PassFailField/utils.d.ts +7 -0
- package/dist/form/fields/RadioField/RadioField.d.ts +18 -24
- package/dist/form/fields/RadioField/RadioInput.d.ts +6 -2
- package/dist/form/fields/RadioField/typings.d.ts +2 -3
- package/dist/form/fields/ScanField/ScanField.d.ts +18 -14
- package/dist/form/fields/ScanField/ScanInput.d.ts +4 -5
- package/dist/form/fields/ScanField/typings.d.ts +1 -2
- package/dist/form/fields/SelectField/SelectField.d.ts +18 -17
- package/dist/form/fields/SelectField/SelectInput.d.ts +6 -2
- package/dist/form/fields/SelectField/typings.d.ts +2 -5
- package/dist/form/fields/StringField/StringField.d.ts +11 -19
- package/dist/form/fields/StringField/StringInput.d.ts +6 -2
- package/dist/form/fields/StringField/typings.d.ts +2 -6
- package/dist/form/fields/TextField/TextField.d.ts +10 -15
- package/dist/form/fields/TextField/TextInput.d.ts +6 -2
- package/dist/form/fields/TextField/typings.d.ts +2 -3
- package/dist/form/fields/UploadField/UploadField.d.ts +22 -23
- package/dist/form/fields/UploadField/UploadInput.d.ts +6 -2
- package/dist/form/fields/UploadField/typings.d.ts +1 -2
- package/dist/form/fields/_utils.d.ts +1 -0
- package/dist/form/fields/constants.d.ts +19 -111
- package/dist/form/fields/hooks.d.ts +30 -4
- package/dist/form/fields/index.d.ts +7 -3
- package/dist/form/fields/typings.d.ts +47 -34
- package/dist/form/fields/utils.d.ts +15 -16
- package/dist/form/index.d.ts +7 -1
- package/dist/form/modifiers/boolean.d.ts +3 -0
- package/dist/form/modifiers/conditionModifier.d.ts +17 -0
- package/dist/form/modifiers/date.d.ts +9 -0
- package/dist/form/modifiers/file.d.ts +4 -0
- package/dist/form/modifiers/index.d.ts +8 -0
- package/dist/form/modifiers/number.d.ts +10 -0
- package/dist/form/modifiers/passFailStatus.d.ts +6 -0
- package/dist/form/modifiers/string.d.ts +12 -0
- package/dist/form/modifiers/typings.d.ts +11 -0
- package/dist/form/modifiers/utils.d.ts +2 -0
- package/dist/form/renderer/{FormRenderer/FormRenderer.d.ts → FormRenderer.d.ts} +4 -4
- package/dist/form/renderer/constants.d.ts +2 -0
- package/dist/form/renderer/context.d.ts +2 -0
- package/dist/form/renderer/index.d.ts +1 -2
- package/dist/form/schema/FieldSchema.d.ts +22 -0
- package/dist/form/schema/context.d.ts +2 -0
- package/dist/form/schema/index.d.ts +1 -0
- package/dist/form/typings.d.ts +10 -19
- package/dist/form/utils.d.ts +11 -7
- package/dist/forms.js +28800 -18113
- package/dist/forms.umd.cjs +35307 -63
- package/dist/index.d.ts +1 -0
- package/package.json +9 -5
- package/dist/form/builder/DropDispatch.d.ts +0 -27
- package/dist/form/builder/FieldActions.d.ts +0 -13
- package/dist/form/builder/FieldBuilder.d.ts +0 -10
- package/dist/form/builder/FieldSectionWithActions.d.ts +0 -10
- package/dist/form/builder/FieldsEditor.d.ts +0 -1
- package/dist/form/builder/FormBuilder.d.ts +0 -26
- package/dist/form/fields/BaseField/hooks.d.ts +0 -393
- package/dist/form/fields/BaseSelectField/BaseSelectField.d.ts +0 -35
- package/dist/form/fields/BaseSelectField/index.d.ts +0 -2
- package/dist/form/fields/BaseSelectField/typings.d.ts +0 -6
- package/dist/form/fields/CustomField/CustomField.d.ts +0 -23
- package/dist/form/fields/CustomField/FieldInputClonerField/FieldInputCloner.d.ts +0 -7
- package/dist/form/fields/CustomField/FieldInputClonerField/FieldInputClonerField.d.ts +0 -18
- package/dist/form/fields/CustomField/FieldInputClonerField/index.d.ts +0 -3
- package/dist/form/fields/CustomField/FieldInputClonerField/typings.d.ts +0 -4
- package/dist/form/fields/CustomField/index.d.ts +0 -1
- package/dist/form/fields/StringOrTextField/StringOrTextField.d.ts +0 -34
- package/dist/form/fields/StringOrTextField/index.d.ts +0 -2
- package/dist/form/renderer/FormRenderer/constants.d.ts +0 -2
- package/dist/form/renderer/PatchForm/Field.d.ts +0 -17
- package/dist/form/renderer/PatchForm/Provider.d.ts +0 -28
- package/dist/form/renderer/PatchForm/index.d.ts +0 -2
- /package/dist/form/builder/{FieldSettingsPopover.d.ts → components/FieldSettingsPopover.d.ts} +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export type ImageViewerContextType = (func: (close: () => void) =>
|
|
1
|
+
import { ImageViewerConfig } from './typings';
|
|
2
|
+
export type ImageViewerContextType = (func: (close: () => void) => ImageViewerConfig) => void;
|
|
3
3
|
export declare const ImageViewerContext: import('react').Context<ImageViewerContextType>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Overlay } from '@overmap-ai/blocks';
|
|
2
|
+
import { ComponentProps, ReactElement } from 'react';
|
|
3
|
+
import { ZxingOptions } from './typings';
|
|
4
|
+
export interface ScannerProps extends ComponentProps<typeof Overlay.Root>, ZxingOptions {
|
|
5
|
+
children?: ReactElement;
|
|
6
|
+
}
|
|
7
|
+
export declare const Scanner: import('react').NamedExoticComponent<ScannerProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useScanner: () => import('./context').ScannerContextType;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Observable';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './UUIDFile';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare class UUIDPromise<T> extends Promise<T> {
|
|
2
|
+
private _uuid;
|
|
3
|
+
constructor(executor: (...args: Parameters<ConstructorParameters<typeof Promise<T>>[0]>) => void, uuid: string);
|
|
4
|
+
get uuid(): string;
|
|
5
|
+
private set uuid(value);
|
|
6
|
+
static from<T>(promise: Promise<T> | PromiseLike<T>, uuid: string): UUIDPromise<T>;
|
|
7
|
+
then<TResult1 = T, TResult2 = never>(onFulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onRejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): UUIDPromise<TResult1 | TResult2>;
|
|
8
|
+
catch<TResult2 = never>(onRejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): UUIDPromise<T | TResult2>;
|
|
9
|
+
finally(onFinally?: (() => void) | undefined | null): UUIDPromise<T>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { UUIDFile } from '../UUIDFile';
|
|
2
|
+
import { UUIDPromise } from './UUIDPromise';
|
|
3
|
+
export declare function isFileAndPromiseArray(value: unknown): value is (UUIDPromise<UUIDFile> | UUIDFile)[];
|
|
4
|
+
export declare function areFileAndPromiseArraysEqual(value1: (UUIDPromise<UUIDFile> | UUIDFile)[], value2: (UUIDPromise<UUIDFile> | UUIDFile)[]): boolean;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { SerializedFieldSection } from '../fields';
|
|
3
|
+
import { FormBuilderSaveHandler } from './typings';
|
|
4
|
+
export interface FormBuilderRootProps extends PropsWithChildren {
|
|
5
|
+
initialTitle?: string;
|
|
6
|
+
initialDescription?: string;
|
|
7
|
+
initialFields?: SerializedFieldSection[];
|
|
8
|
+
onSave: FormBuilderSaveHandler;
|
|
9
|
+
onCancel?: () => void;
|
|
10
|
+
hideTitle?: boolean;
|
|
11
|
+
hideDescription?: boolean;
|
|
12
|
+
enableReinitialize?: boolean;
|
|
13
|
+
disableRequiredFields?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare const FormBuilderRoot: import('react').NamedExoticComponent<FormBuilderRootProps>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Field } from '../../fields';
|
|
2
|
+
import { NestedFieldPath } from '../typings';
|
|
3
|
+
export interface FieldBuilderProps {
|
|
4
|
+
index: number;
|
|
5
|
+
parentPath: NestedFieldPath;
|
|
6
|
+
field: Field;
|
|
7
|
+
}
|
|
8
|
+
export declare const FieldBuilder: import('react').MemoExoticComponent<(props: FieldBuilderProps) => import("react/jsx-runtime").JSX.Element>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { MenuRootProps, MenuVariantProps } from '@overmap-ai/blocks';
|
|
2
|
+
import { ReactElement } from 'react';
|
|
3
|
+
import { Field } from '../../fields';
|
|
4
|
+
export interface FieldDropdownMenuProps extends MenuRootProps, MenuVariantProps {
|
|
5
|
+
children: ReactElement;
|
|
6
|
+
fields: Field[];
|
|
7
|
+
onSelectField: (field: Field) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const FieldDropdownMenu: import('react').NamedExoticComponent<FieldDropdownMenuProps>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { MenuRootProps, MenuVariantProps } from '@overmap-ai/blocks';
|
|
2
|
+
import { ReactElement } from 'react';
|
|
3
|
+
import { FieldSection } from '../../fields';
|
|
4
|
+
export interface FieldSectionDropdownMenuProps extends MenuRootProps, MenuVariantProps {
|
|
5
|
+
children: ReactElement;
|
|
6
|
+
fieldSections: FieldSection[];
|
|
7
|
+
onSelectFieldCondition: (field: FieldSection) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const FieldSectionDropdownMenu: import('react').NamedExoticComponent<FieldSectionDropdownMenuProps>;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Field, FieldSection } from '../../fields';
|
|
2
2
|
interface FieldWithActionsProps {
|
|
3
|
-
field:
|
|
3
|
+
field: Field;
|
|
4
|
+
fieldSection: FieldSection;
|
|
4
5
|
index: number;
|
|
5
6
|
sectionIndex: number;
|
|
6
|
-
remove: () => void;
|
|
7
|
+
remove: (field: Field) => void;
|
|
7
8
|
}
|
|
8
9
|
export declare const FieldWithActions: import('react').MemoExoticComponent<(props: FieldWithActionsProps) => import("react/jsx-runtime").JSX.Element>;
|
|
9
10
|
export {};
|
|
@@ -1,20 +1,3 @@
|
|
|
1
|
-
import { FieldSection } from '../fields';
|
|
2
1
|
export declare const formId = "form-builder";
|
|
3
|
-
export declare const
|
|
4
|
-
export declare const
|
|
5
|
-
export declare const CompleteFieldTypeToClsMapping: {
|
|
6
|
-
section: typeof FieldSection;
|
|
7
|
-
date: typeof import('..').DateField;
|
|
8
|
-
number: typeof import('..').NumberField;
|
|
9
|
-
boolean: typeof import('..').BooleanField;
|
|
10
|
-
select: typeof import('..').SelectField;
|
|
11
|
-
string: typeof import('..').StringField;
|
|
12
|
-
text: typeof import('..').TextField;
|
|
13
|
-
custom: typeof import('../fields/CustomField').CustomField;
|
|
14
|
-
upload: typeof import('..').UploadField;
|
|
15
|
-
qr: typeof import('..').ScanField;
|
|
16
|
-
"multi-string": typeof import('..').MultiStringField;
|
|
17
|
-
"multi-select": typeof import('..').MultiSelectField;
|
|
18
|
-
radio: typeof import('..').RadioField;
|
|
19
|
-
"checkbox-list": typeof import('..').CheckboxListField;
|
|
20
|
-
};
|
|
2
|
+
export declare const UNLABELLED_FIELD_LABEL = "Unlabelled";
|
|
3
|
+
export declare const UNLABELLED_SECTION_LABEL = "Unlabelled";
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
interface IFormBuilderContext {
|
|
2
|
+
hideTitle: boolean;
|
|
3
|
+
hideDescription: boolean;
|
|
2
4
|
disableRequiredFields: boolean;
|
|
3
|
-
|
|
5
|
+
onCancel?: () => void;
|
|
4
6
|
}
|
|
5
7
|
export declare const FormBuilderContext: import('react').Context<IFormBuilderContext>;
|
|
6
8
|
export {};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { EdgeProps } from '@xyflow/react';
|
|
2
|
+
import { FieldSectionConditionEdge } from './typings';
|
|
3
|
+
export declare const FieldSectionConditionEdgeComponent: import('react').MemoExoticComponent<(props: EdgeProps<FieldSectionConditionEdge>) => import("react/jsx-runtime").JSX.Element>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const FormBuilderFlowBuilder: import('react').MemoExoticComponent<() => import("react/jsx-runtime").JSX.Element>;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { FieldSectionConditionEdge, FieldSectionNode, LayoutDirection } from './typings';
|
|
2
|
+
export declare const getLayoutedNodesAndEdges: (nodes: FieldSectionNode[], edges: FieldSectionConditionEdge[], direction: LayoutDirection) => [FieldSectionNode[], FieldSectionConditionEdge[]];
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Edge, Node } from '@xyflow/react';
|
|
2
|
+
import { FieldSection } from '../../fields';
|
|
3
|
+
export type LayoutDirection = "LR" | "TB";
|
|
4
|
+
export type FieldSectionNodeData = {
|
|
5
|
+
fieldSection: FieldSection;
|
|
6
|
+
index: number;
|
|
7
|
+
layoutDirection: LayoutDirection;
|
|
8
|
+
};
|
|
9
|
+
export type FieldSectionNode = Node<FieldSectionNodeData, "fieldSection">;
|
|
10
|
+
export type FieldSectionConditionEdgeData = {
|
|
11
|
+
targetSection: FieldSection;
|
|
12
|
+
sourceSection: FieldSection;
|
|
13
|
+
layoutDirection: LayoutDirection;
|
|
14
|
+
};
|
|
15
|
+
export type FieldSectionConditionEdge = Edge<FieldSectionConditionEdgeData, "fieldSectionCondition">;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const useFieldTypeItems: (onSelect?: (type: Exclude<
|
|
1
|
+
import { FieldType } from '../fields';
|
|
2
|
+
export declare const useFieldTypeItems: (onSelect?: (type: Exclude<FieldType, "section">) => void) => {
|
|
3
3
|
children: string;
|
|
4
4
|
icon: import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
value: "string" | "number" | "boolean" | "select" | "text" | "radio" | "date" | "
|
|
5
|
+
value: "string" | "number" | "boolean" | "select" | "text" | "radio" | "date" | "upload" | "checkbox-list" | "pass-fail" | "multi-select" | "multi-string" | "qr" | "otp";
|
|
6
6
|
onSelect: () => void;
|
|
7
|
-
}[]
|
|
7
|
+
}[];
|
|
@@ -1,2 +1,9 @@
|
|
|
1
1
|
export type * from './typings';
|
|
2
|
-
export
|
|
2
|
+
export declare const FormBuilder: {
|
|
3
|
+
Root: import('react').NamedExoticComponent<import('./Root').FormBuilderRootProps>;
|
|
4
|
+
FlowBuilder: import('react').MemoExoticComponent<() => import("react/jsx-runtime").JSX.Element>;
|
|
5
|
+
ListBuilder: import('react').MemoExoticComponent<() => import("react/jsx-runtime").JSX.Element>;
|
|
6
|
+
Preview: import('react').NamedExoticComponent<import('./preview').FormBuilderPreviewProps>;
|
|
7
|
+
};
|
|
8
|
+
export { createCondition } from './utils';
|
|
9
|
+
export { createField } from './utils';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { FieldSection } from '../../fields';
|
|
2
|
+
export interface FieldSectionBuilderProps {
|
|
3
|
+
fieldSection: FieldSection;
|
|
4
|
+
}
|
|
5
|
+
export declare const FieldSectionBuilder: import('react').MemoExoticComponent<(props: FieldSectionBuilderProps) => import("react/jsx-runtime").JSX.Element>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { FieldSection } from '../../fields';
|
|
2
|
+
interface FieldSectionConditionalItemProps {
|
|
3
|
+
sourceFieldSection: FieldSection;
|
|
4
|
+
targetFieldSection: FieldSection;
|
|
5
|
+
}
|
|
6
|
+
export declare const FieldSectionConditionalItem: import('react').NamedExoticComponent<FieldSectionConditionalItemProps>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { FieldSection } from '../../fields';
|
|
2
|
+
export interface FieldSectionWithActionsProps {
|
|
3
|
+
fieldSection: FieldSection;
|
|
4
|
+
index: number;
|
|
5
|
+
}
|
|
6
|
+
export declare const FieldSectionWithActions: import('react').MemoExoticComponent<(props: FieldSectionWithActionsProps) => import("react/jsx-runtime").JSX.Element>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const FormBuilderListBuilder: import('react').MemoExoticComponent<() => import("react/jsx-runtime").JSX.Element>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ListBuilder';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Preview';
|
|
@@ -1,24 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export declare const isSection: (field: ISerializedField) => field is SerializedFieldSection;
|
|
7
|
-
export declare const emptySection: (id?: string, fields?: ISerializedOnlyField[]) => SerializedFieldSection;
|
|
8
|
-
export declare const wrapRootFieldsWithFieldSection: (fields: ISerializedField[]) => SerializedFieldSection[];
|
|
9
|
-
export declare function reorder<T>(list: T[], source: number, destination: number): T[];
|
|
10
|
-
export declare function replace<T>(list: T[], index: number, value: T): T[];
|
|
11
|
-
export declare function insert<T>(list: T[] | undefined, index: number, value: T): T[];
|
|
12
|
-
export declare function remove<T>(list: T[], index: number): T[];
|
|
13
|
-
export declare const makeIdentifier: () => string;
|
|
14
|
-
export declare const findFieldByIdentifier: (fields: ISerializedField[], identifier?: string) => ISerializedField | null;
|
|
15
|
-
export declare const makeConditionalSourceFields: (sections: SerializedFieldSection[], index: number) => (import('..').SerializedTextField | import('..').SerializedBooleanField | import('..').SerializedNumberField | import('..').SerializedDateField | import('..').SerializedStringField | import('..').SerializedSelectField | import('..').SerializedMultiStringField | import('..').SerializedMultiSelectField | import('..').SerializedUploadField | import('..').SerializedScanField | import('..').SerializedRadioField | import('..').SerializedCheckboxListField)[];
|
|
16
|
-
export type NewFieldInitialValues = Omit<ISerializedField, "identifier"> & {
|
|
17
|
-
label: string;
|
|
18
|
-
};
|
|
19
|
-
export declare const createNewField: (parentPath: NestedFieldPath, index: number, initialValues: NewFieldInitialValues, values: FormBuilderValues, setFieldValue: FormikHelpers<unknown>["setFieldValue"]) => void;
|
|
20
|
-
export declare const createNewEmptySection: (index: number, values: FormBuilderValues, setFieldValue: FormikHelpers<unknown>["setFieldValue"]) => void;
|
|
21
|
-
export declare const useFieldReordering: () => {
|
|
22
|
-
reorderSection: (dropState: DropState, sectionId: string, sectionIndex: number, destinationIndex: number, values: FormBuilderValues, setFieldValue: FormikHelpers<unknown>["setFieldValue"]) => void;
|
|
23
|
-
reorderField: (srcSection: SerializedFieldSection | undefined, srcSectionIndex: string | number | undefined, srcFieldIndex: number, destSection: SerializedFieldSection | undefined, destSectionIndex: string | number | undefined, destFieldIndex: number, setFieldValue: FormikHelpers<unknown>["setFieldValue"]) => void;
|
|
24
|
-
};
|
|
1
|
+
import { BooleanFieldCondition, CheckboxListFieldCondition, DateFieldCondition, MultiSelectFieldCondition, MultiStringFieldCondition, NumberFieldCondition, OTPFieldCondition, PassFailFieldCondition, RadioFieldCondition, ScanFieldCondition, SelectFieldCondition, StringFieldCondition, TextFieldCondition, UploadFieldCondition } from '../conditions';
|
|
2
|
+
import { Field, FieldCreationSchemaObject, FieldType } from '../fields';
|
|
3
|
+
export declare const createField: (type: Exclude<FieldType, "section">) => Field;
|
|
4
|
+
export declare const createCondition: (field: Field) => BooleanFieldCondition | CheckboxListFieldCondition | DateFieldCondition | MultiSelectFieldCondition | MultiStringFieldCondition | NumberFieldCondition | OTPFieldCondition | PassFailFieldCondition | RadioFieldCondition | ScanFieldCondition | SelectFieldCondition | StringFieldCondition | TextFieldCondition | UploadFieldCondition;
|
|
5
|
+
export declare const getFieldCreationSchema: (type: FieldType, path: string) => FieldCreationSchemaObject[] | undefined;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { UUIDFile } from '../UUIDFile';
|
|
2
|
+
import { UUIDPromise } from '../UUIDPromise';
|
|
3
|
+
interface DisplayFileProps {
|
|
4
|
+
file: UUIDFile | UUIDPromise<UUIDFile>;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
onRemove: () => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const DisplayFile: import('react').MemoExoticComponent<(props: DisplayFileProps) => import("react/jsx-runtime").JSX.Element>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './DisplayFile';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { AnyField, TypeOfField, ValueOfField } from '../../fields';
|
|
3
|
+
import { AnyConditionModifierConfig } from '../../modifiers';
|
|
4
|
+
import { Observable } from '../../Observable';
|
|
5
|
+
import { BaseSerializedCondition, ConditionRenderProps } from './typings';
|
|
6
|
+
export interface ConditionOptions<TField, TConditionValue, TModifiers extends string> {
|
|
7
|
+
id: string;
|
|
8
|
+
field: TField;
|
|
9
|
+
conditionValue: TConditionValue | undefined;
|
|
10
|
+
conditionModifier: TModifiers;
|
|
11
|
+
}
|
|
12
|
+
export declare abstract class BaseCondition<TField extends AnyField, TValue, TConditionValue, TSerializedConditionValue, TModifiers extends string, This extends BaseCondition<TField, TValue, TConditionValue, TSerializedConditionValue, TModifiers, This>> extends Observable<This> {
|
|
13
|
+
readonly id: string;
|
|
14
|
+
conditionValue: TConditionValue | undefined;
|
|
15
|
+
conditionModifier: TModifiers;
|
|
16
|
+
field: TField;
|
|
17
|
+
abstract readonly defaultConditionValue: TConditionValue | undefined;
|
|
18
|
+
abstract readonly defaultConditionModifier: TModifiers;
|
|
19
|
+
abstract readonly modifiers: Record<TModifiers, AnyConditionModifierConfig<TValue, TConditionValue, TSerializedConditionValue>>;
|
|
20
|
+
protected constructor(config: ConditionOptions<TField, TConditionValue, TModifiers>);
|
|
21
|
+
serialize(): BaseSerializedCondition<TypeOfField<TField>, TSerializedConditionValue, TModifiers>;
|
|
22
|
+
getConditionValue: () => TConditionValue | undefined;
|
|
23
|
+
transformValue(value: ValueOfField<TField>): TValue;
|
|
24
|
+
setConditionValue: (conditionValue: TConditionValue | undefined) => void;
|
|
25
|
+
getConditionModifier: () => TModifiers;
|
|
26
|
+
setConditionModifier: (modifier: TModifiers) => void;
|
|
27
|
+
getConditionModifiers: () => [keyof typeof this.modifiers, AnyConditionModifierConfig<ValueOfField<TField>, TConditionValue, TSerializedConditionValue>][];
|
|
28
|
+
abstract render(props: ConditionRenderProps<this>): ReactNode;
|
|
29
|
+
apply: (value: ValueOfField<TField>) => boolean;
|
|
30
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { AnyField } from '../../fields';
|
|
2
|
+
import { BaseCondition } from './BaseCondition';
|
|
3
|
+
export type AnyCondition = BaseCondition<AnyField, any, any, any, any, any>;
|
|
4
|
+
export type ModifiersOfCondition<TCondition> = TCondition extends BaseCondition<infer _TField, infer _TValue, infer _TConditionValue, infer _TSerializedConditionValue, infer TConditionModifiers, infer _This> ? TConditionModifiers : never;
|
|
5
|
+
export interface ConditionRenderProps<TCondition> {
|
|
6
|
+
onRemove: (condition: TCondition) => void;
|
|
7
|
+
}
|
|
8
|
+
export interface BaseConditionCellProps<TCondition> extends ConditionRenderProps<TCondition> {
|
|
9
|
+
condition: TCondition;
|
|
10
|
+
}
|
|
11
|
+
export interface BaseSerializedCondition<TIdentifier extends string, TSerializedConditionValue, TModifier extends string> {
|
|
12
|
+
id: string;
|
|
13
|
+
type: TIdentifier;
|
|
14
|
+
fieldId: string;
|
|
15
|
+
conditionValue: TSerializedConditionValue;
|
|
16
|
+
conditionModifier: TModifier;
|
|
17
|
+
}
|
|
18
|
+
export type AnySerializedCondition = BaseSerializedCondition<any, any, any>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { BooleanField, ValueOfField } from '../../fields';
|
|
3
|
+
import { BaseCondition, ConditionOptions, ConditionRenderProps } from '../BaseCondition';
|
|
4
|
+
import { BooleanConditionModifiers, SerializedBooleanCondition } from './typings';
|
|
5
|
+
export interface BooleanFieldConditionOptions extends ConditionOptions<BooleanField, boolean, BooleanConditionModifiers> {
|
|
6
|
+
}
|
|
7
|
+
export declare class BooleanFieldCondition extends BaseCondition<BooleanField, ValueOfField<BooleanField>, boolean, boolean, BooleanConditionModifiers, BooleanFieldCondition> {
|
|
8
|
+
readonly defaultConditionModifier = "equals";
|
|
9
|
+
readonly defaultConditionValue: undefined;
|
|
10
|
+
readonly modifiers: {
|
|
11
|
+
equals: import('../..').FieldConditionModifierConfig<boolean, boolean, boolean, boolean, boolean, boolean>;
|
|
12
|
+
notEquals: import('../..').FieldConditionModifierConfig<boolean, boolean, boolean, boolean, boolean, boolean>;
|
|
13
|
+
};
|
|
14
|
+
constructor(options: BooleanFieldConditionOptions);
|
|
15
|
+
static deserialize(serializedCondition: SerializedBooleanCondition, field: BooleanField): BooleanFieldCondition;
|
|
16
|
+
render(props: ConditionRenderProps<BooleanFieldCondition>): ReactNode;
|
|
17
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { BaseConditionCellProps } from '../BaseCondition';
|
|
2
|
+
import { BooleanFieldCondition } from './BooleanFieldCondition';
|
|
3
|
+
interface BooleanFieldConditionCellProps extends BaseConditionCellProps<BooleanFieldCondition> {
|
|
4
|
+
}
|
|
5
|
+
export declare const BooleanFieldConditionCell: (props: BooleanFieldConditionCellProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { BooleanField, TypeOfField, ValueOfField } from '../../fields';
|
|
2
|
+
import { BaseSerializedCondition } from '../BaseCondition';
|
|
3
|
+
export type BooleanConditionModifiers = "equals" | "notEquals";
|
|
4
|
+
export type SerializedBooleanCondition = BaseSerializedCondition<TypeOfField<BooleanField>, ValueOfField<BooleanField>, BooleanConditionModifiers>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { CheckboxListField, ValueOfField } from '../../fields';
|
|
3
|
+
import { BaseCondition, ConditionOptions, ConditionRenderProps } from '../BaseCondition';
|
|
4
|
+
import { CheckboxListConditionModifiers, SerializedCheckboxListCondition } from './typings';
|
|
5
|
+
export interface CheckboxListFieldConditionOptions extends ConditionOptions<CheckboxListField, string[], CheckboxListConditionModifiers> {
|
|
6
|
+
}
|
|
7
|
+
export declare class CheckboxListFieldCondition extends BaseCondition<CheckboxListField, ValueOfField<CheckboxListField>, string[], string[], CheckboxListConditionModifiers, CheckboxListFieldCondition> {
|
|
8
|
+
readonly defaultConditionModifier = "equals";
|
|
9
|
+
readonly defaultConditionValue: string[] | undefined;
|
|
10
|
+
readonly modifiers: {
|
|
11
|
+
equals: import('../..').FieldConditionModifierConfig<string[], string[], string[], string[], string[], string[]>;
|
|
12
|
+
notEquals: import('../..').FieldConditionModifierConfig<string[], string[], string[], string[], string[], string[]>;
|
|
13
|
+
every: import('../..').FieldConditionModifierConfig<string[], string[], string[], string[], string[], string[]>;
|
|
14
|
+
some: import('../..').FieldConditionModifierConfig<string[], string[], string[], string[], string[], string[]>;
|
|
15
|
+
none: import('../..').FieldConditionModifierConfig<string[], string[], string[], string[], string[], string[]>;
|
|
16
|
+
};
|
|
17
|
+
constructor(options: CheckboxListFieldConditionOptions);
|
|
18
|
+
static deserialize(serializedCondition: SerializedCheckboxListCondition, field: CheckboxListField): CheckboxListFieldCondition;
|
|
19
|
+
render(props: ConditionRenderProps<CheckboxListFieldCondition>): ReactNode;
|
|
20
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { BaseConditionCellProps } from '../BaseCondition';
|
|
2
|
+
import { CheckboxListFieldCondition } from './CheckboxListFieldCondition';
|
|
3
|
+
interface CheckboxListFieldConditionCellProps extends BaseConditionCellProps<CheckboxListFieldCondition> {
|
|
4
|
+
}
|
|
5
|
+
export declare const CheckboxListFieldConditionCell: (props: CheckboxListFieldConditionCellProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { CheckboxListField, TypeOfField } from '../../fields';
|
|
2
|
+
import { BaseSerializedCondition } from '../BaseCondition';
|
|
3
|
+
export type CheckboxListConditionModifiers = "equals" | "notEquals" | "every" | "some" | "none";
|
|
4
|
+
export type SerializedCheckboxListCondition = BaseSerializedCondition<TypeOfField<CheckboxListField>, string[], CheckboxListConditionModifiers>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Observable } from '../../Observable';
|
|
2
|
+
import { FieldValues } from '../../typings';
|
|
3
|
+
import { Condition } from '../typings';
|
|
4
|
+
export declare class ConditionManager extends Observable<ConditionManager> {
|
|
5
|
+
private conditions;
|
|
6
|
+
constructor(conditions: Condition[]);
|
|
7
|
+
private conditionObserver;
|
|
8
|
+
private initConditions;
|
|
9
|
+
getConditions(): Condition[];
|
|
10
|
+
addCondition(condition: Condition): void;
|
|
11
|
+
addConditions(conditions: Condition[]): void;
|
|
12
|
+
removeCondition(condition: Condition): void;
|
|
13
|
+
removeConditions(conditions: Condition[]): void;
|
|
14
|
+
applyConditions(values: FieldValues): boolean;
|
|
15
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Condition } from '../typings';
|
|
2
|
+
import { ConditionManager } from './ConditionManager';
|
|
3
|
+
import { ConditionsChangeEventHandler } from './typings';
|
|
4
|
+
export declare const useConditionManager: (conditions: Condition[], onConditionsChange: ConditionsChangeEventHandler) => ConditionManager;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { DateRange } from 'react-day-picker';
|
|
3
|
+
import { DateField, SerializedDateRange, ValueOfField } from '../../fields';
|
|
4
|
+
import { BaseCondition, ConditionOptions, ConditionRenderProps } from '../BaseCondition';
|
|
5
|
+
import { DateConditionModifiers, SerializedDateCondition } from './typings';
|
|
6
|
+
export interface DateFieldConditionOptions extends ConditionOptions<DateField, Date | DateRange, DateConditionModifiers> {
|
|
7
|
+
}
|
|
8
|
+
export declare class DateFieldCondition extends BaseCondition<DateField, ValueOfField<DateField>, Date | DateRange, string | SerializedDateRange, DateConditionModifiers, DateFieldCondition> {
|
|
9
|
+
readonly defaultConditionModifier = "equals";
|
|
10
|
+
readonly defaultConditionValue: undefined;
|
|
11
|
+
readonly modifiers: {
|
|
12
|
+
equals: import('../..').FieldConditionModifierConfig<Date | null, Date | DateRange, string | SerializedDateRange, Date, Date, string>;
|
|
13
|
+
notEquals: import('../..').FieldConditionModifierConfig<Date | null, Date | DateRange, string | SerializedDateRange, Date, Date, string>;
|
|
14
|
+
before: import('../..').FieldConditionModifierConfig<Date | null, Date | DateRange, string | SerializedDateRange, Date, Date, string>;
|
|
15
|
+
after: import('../..').FieldConditionModifierConfig<Date | null, Date | DateRange, string | SerializedDateRange, Date, Date, string>;
|
|
16
|
+
in: import('../..').FieldConditionModifierConfig<Date | null, Date | DateRange, string | SerializedDateRange, Date, DateRange, SerializedDateRange>;
|
|
17
|
+
notIn: import('../..').FieldConditionModifierConfig<Date | null, Date | DateRange, string | SerializedDateRange, Date, DateRange, SerializedDateRange>;
|
|
18
|
+
};
|
|
19
|
+
constructor(options: DateFieldConditionOptions);
|
|
20
|
+
static deserialize(serializedCondition: SerializedDateCondition, field: DateField): DateFieldCondition;
|
|
21
|
+
render(props: ConditionRenderProps<DateFieldCondition>): ReactNode;
|
|
22
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { BaseConditionCellProps } from '../BaseCondition';
|
|
2
|
+
import { DateFieldCondition } from './DateFieldCondition';
|
|
3
|
+
interface DateFieldConditionCellProps extends BaseConditionCellProps<DateFieldCondition> {
|
|
4
|
+
}
|
|
5
|
+
export declare const DateFieldConditionCell: (props: DateFieldConditionCellProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { DateField, SerializedDateRange, TypeOfField } from '../../fields';
|
|
2
|
+
import { BaseSerializedCondition } from '../BaseCondition';
|
|
3
|
+
export type DateConditionModifiers = "equals" | "notEquals" | "before" | "after" | "in" | "notIn";
|
|
4
|
+
export type SerializedDateCondition = BaseSerializedCondition<TypeOfField<DateField>, string | SerializedDateRange, DateConditionModifiers>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { MultiSelectField, ValueOfField } from '../../fields';
|
|
3
|
+
import { BaseCondition, ConditionOptions, ConditionRenderProps } from '../BaseCondition';
|
|
4
|
+
import { MultiSelectConditionModifiers, SerializedMultiSelectCondition } from './typings';
|
|
5
|
+
declare const modifiers: {
|
|
6
|
+
equals: import('../..').FieldConditionModifierConfig<string[], string[], string[], string[], string[], string[]>;
|
|
7
|
+
notEquals: import('../..').FieldConditionModifierConfig<string[], string[], string[], string[], string[], string[]>;
|
|
8
|
+
every: import('../..').FieldConditionModifierConfig<string[], string[], string[], string[], string[], string[]>;
|
|
9
|
+
some: import('../..').FieldConditionModifierConfig<string[], string[], string[], string[], string[], string[]>;
|
|
10
|
+
none: import('../..').FieldConditionModifierConfig<string[], string[], string[], string[], string[], string[]>;
|
|
11
|
+
};
|
|
12
|
+
export interface MultiSelectFieldConditionOptions extends ConditionOptions<MultiSelectField, string[], MultiSelectConditionModifiers> {
|
|
13
|
+
}
|
|
14
|
+
export declare class MultiSelectFieldCondition extends BaseCondition<MultiSelectField, ValueOfField<MultiSelectField>, string[], string[], MultiSelectConditionModifiers, MultiSelectFieldCondition> {
|
|
15
|
+
readonly defaultConditionValue: string[] | undefined;
|
|
16
|
+
readonly defaultConditionModifier: keyof typeof modifiers;
|
|
17
|
+
readonly modifiers: {
|
|
18
|
+
equals: import('../..').FieldConditionModifierConfig<string[], string[], string[], string[], string[], string[]>;
|
|
19
|
+
notEquals: import('../..').FieldConditionModifierConfig<string[], string[], string[], string[], string[], string[]>;
|
|
20
|
+
every: import('../..').FieldConditionModifierConfig<string[], string[], string[], string[], string[], string[]>;
|
|
21
|
+
some: import('../..').FieldConditionModifierConfig<string[], string[], string[], string[], string[], string[]>;
|
|
22
|
+
none: import('../..').FieldConditionModifierConfig<string[], string[], string[], string[], string[], string[]>;
|
|
23
|
+
};
|
|
24
|
+
constructor(options: MultiSelectFieldConditionOptions);
|
|
25
|
+
static deserialize(serializedCondition: SerializedMultiSelectCondition, field: MultiSelectField): MultiSelectFieldCondition;
|
|
26
|
+
render(props: ConditionRenderProps<MultiSelectFieldCondition>): ReactNode;
|
|
27
|
+
}
|
|
28
|
+
export {};
|