@overmap-ai/forms 1.0.31 → 1.0.32-condition-manager.1
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 +28795 -18110
- package/dist/forms.umd.cjs +35305 -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,36 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
import { FieldSection } from '../FieldSection';
|
|
5
|
-
import { AnyField, FieldTypeIdentifier, FieldValue, GetInputProps, InputFieldLevelValidator, InputFormLevelValidator, ISerializedField, ISerializedOnlyField } from '../typings';
|
|
6
|
-
import { BaseSerializedField, BaseSerializedObject, FieldOptions } from './typings';
|
|
7
|
-
export declare abstract class BaseFormElement<TIdentifier extends FieldTypeIdentifier = FieldTypeIdentifier> {
|
|
8
|
-
readonly type: TIdentifier;
|
|
9
|
-
readonly identifier: string;
|
|
10
|
-
readonly description: string | null;
|
|
11
|
-
protected constructor(options: BaseSerializedObject);
|
|
12
|
-
getId(): string;
|
|
13
|
-
abstract getInput(props: GetInputProps<this>): ReactNode;
|
|
14
|
-
static deserialize(_data: ISerializedField): AnyField | FieldSection;
|
|
15
|
-
protected _serialize(): BaseSerializedObject<TIdentifier>;
|
|
16
|
-
}
|
|
17
|
-
export declare const emptyBaseField: {
|
|
18
|
-
label: string;
|
|
19
|
-
description: string;
|
|
20
|
-
required: boolean;
|
|
21
|
-
};
|
|
22
|
-
export interface FieldCreationSchemaObject {
|
|
23
|
-
field: AnyField;
|
|
24
|
-
showDirectly: boolean;
|
|
25
|
-
}
|
|
26
|
-
export declare abstract class BaseField<TValue extends FieldValue, TIdentifier extends FieldTypeIdentifier = FieldTypeIdentifier> extends BaseFormElement<TIdentifier> {
|
|
1
|
+
import { BaseFormElement } from '../BaseFormElement';
|
|
2
|
+
import { BaseSerializedField, FieldOptions, FieldValidator } from './typings';
|
|
3
|
+
export declare abstract class BaseField<TIdentifier extends string, TValue, TSerializedValue, This extends BaseField<TIdentifier, TValue, TSerializedValue, This>> extends BaseFormElement<TIdentifier, This> {
|
|
27
4
|
static readonly fieldTypeName: string;
|
|
28
5
|
static readonly fieldTypeDescription: string;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
6
|
+
label: string;
|
|
7
|
+
description: string | null;
|
|
8
|
+
required: boolean;
|
|
9
|
+
private fieldValidators;
|
|
10
|
+
image: File | Promise<File> | undefined;
|
|
34
11
|
/**
|
|
35
12
|
* By default, validation doesn't execute on `onChange` events when editing fields
|
|
36
13
|
* until the field has been `touched`. This can be overridden by setting this to `false`
|
|
@@ -39,14 +16,16 @@ export declare abstract class BaseField<TValue extends FieldValue, TIdentifier e
|
|
|
39
16
|
*/
|
|
40
17
|
readonly onlyValidateAfterTouched: boolean;
|
|
41
18
|
protected constructor(options: FieldOptions<TValue>);
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
abstract
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
19
|
+
getError(value: TValue): string | undefined;
|
|
20
|
+
serialize(): BaseSerializedField<TIdentifier>;
|
|
21
|
+
getOptions(): FieldOptions<TValue>;
|
|
22
|
+
setOptions(options: Partial<FieldOptions<TValue>>): void;
|
|
23
|
+
abstract isSerializedValueValid(value: unknown): value is TSerializedValue;
|
|
24
|
+
abstract serializeValue(value: TValue): TSerializedValue;
|
|
25
|
+
abstract isValueValid(value: unknown): value is TValue;
|
|
26
|
+
abstract areValuesEqual(value1: TValue, value2: TValue): boolean;
|
|
27
|
+
abstract deserializeValue(value: TSerializedValue): TValue;
|
|
28
|
+
isValueBlank(value: TValue): boolean;
|
|
29
|
+
abstract blankValue(): TValue;
|
|
30
|
+
getFieldValidators(): FieldValidator<TValue>[];
|
|
52
31
|
}
|
|
@@ -1,16 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { BaseSerializedObject, FormElementOptions } from '../BaseFormElement';
|
|
2
|
+
import { AnyField } from '../typings';
|
|
3
|
+
export interface BaseSerializedField<TIdentifier extends string> extends BaseSerializedObject<TIdentifier> {
|
|
4
|
+
label: string;
|
|
3
5
|
description?: string | null;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
+
required: boolean;
|
|
7
|
+
image?: File | Promise<File>;
|
|
6
8
|
}
|
|
7
|
-
export interface
|
|
9
|
+
export interface FieldOptions<TValue> extends FormElementOptions {
|
|
8
10
|
label: string;
|
|
11
|
+
description?: string | null;
|
|
9
12
|
required: boolean;
|
|
10
13
|
image?: File | Promise<File>;
|
|
14
|
+
fieldValidators?: FieldValidator<TValue>[];
|
|
11
15
|
}
|
|
12
|
-
export interface
|
|
13
|
-
|
|
14
|
-
|
|
16
|
+
export interface FieldCreationSchemaObject {
|
|
17
|
+
field: AnyField;
|
|
18
|
+
showDirectly: boolean;
|
|
15
19
|
}
|
|
16
|
-
export type
|
|
20
|
+
export type FieldValidator<TValue> = (value: TValue) => string | null | undefined;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { Observable } from '../../Observable/Observable';
|
|
3
|
+
import { BaseSerializedObject, FieldRenderProps, FormElementOptions } from './typings';
|
|
4
|
+
export declare abstract class BaseFormElement<TIdentifier extends string, This extends BaseFormElement<TIdentifier, This>> extends Observable<This> {
|
|
5
|
+
abstract readonly type: TIdentifier;
|
|
6
|
+
identifier: string;
|
|
7
|
+
protected constructor(options: FormElementOptions);
|
|
8
|
+
getOptions(): FormElementOptions;
|
|
9
|
+
setOptions(options: Partial<FormElementOptions>): void;
|
|
10
|
+
abstract duplicate(identifier: string): BaseFormElement<TIdentifier, This>;
|
|
11
|
+
serialize(): BaseSerializedObject<TIdentifier>;
|
|
12
|
+
abstract render(props: FieldRenderProps): ReactNode;
|
|
13
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { TextSize } from '@overmap-ai/blocks';
|
|
2
|
+
export interface FormElementOptions {
|
|
3
|
+
identifier: string;
|
|
4
|
+
}
|
|
5
|
+
export interface BaseSerializedObject<TIdentifier extends string> {
|
|
6
|
+
identifier: string;
|
|
7
|
+
type: TIdentifier;
|
|
8
|
+
}
|
|
9
|
+
export interface FieldRenderProps {
|
|
10
|
+
formId: string;
|
|
11
|
+
size?: TextSize;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
onValuesChange?: (identifier: string, value: any) => void;
|
|
14
|
+
showInputOnly?: boolean;
|
|
15
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BaseField, FieldCreationSchemaObject, FieldOptions } from '../BaseField';
|
|
2
|
+
import { BaseSerializedSelectField, SelectFieldOption } from './typings';
|
|
3
|
+
export interface BaseOptionsFieldOptions<TValue> extends FieldOptions<TValue> {
|
|
4
|
+
options: string[] | SelectFieldOption[];
|
|
5
|
+
}
|
|
6
|
+
export declare abstract class BaseOptionsField<TIdentifier extends string, TValue, TSerializedValue, This extends BaseOptionsField<TIdentifier, TValue, TSerializedValue, This>> extends BaseField<TIdentifier, TValue, TSerializedValue, This> {
|
|
7
|
+
options: SelectFieldOption[];
|
|
8
|
+
readonly onlyValidateAfterTouched = false;
|
|
9
|
+
protected constructor(options: BaseOptionsFieldOptions<TValue>);
|
|
10
|
+
serialize(): BaseSerializedSelectField<TIdentifier>;
|
|
11
|
+
getOptions(): BaseOptionsFieldOptions<TValue>;
|
|
12
|
+
setOptions(options: Partial<BaseOptionsFieldOptions<TValue>>): void;
|
|
13
|
+
static getFieldCreationSchema(parentPath?: string): FieldCreationSchemaObject[];
|
|
14
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BaseSerializedField } from '../BaseField';
|
|
2
|
+
export interface SelectFieldOption {
|
|
3
|
+
value: string;
|
|
4
|
+
label: string;
|
|
5
|
+
}
|
|
6
|
+
export interface BaseSerializedSelectField<TIdentifier extends string> extends BaseSerializedField<TIdentifier> {
|
|
7
|
+
type: TIdentifier;
|
|
8
|
+
options: SelectFieldOption[];
|
|
9
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { BaseField, FieldOptions, FieldValidator } from '../BaseField';
|
|
2
|
+
import { NumberField } from '../NumberField';
|
|
3
|
+
import { BaseSerializedStringField } from './typings';
|
|
4
|
+
export interface BaseStringFieldOptions extends FieldOptions<string> {
|
|
5
|
+
minLength?: number;
|
|
6
|
+
maxLength?: number;
|
|
7
|
+
placeholder?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare abstract class BaseStringField<TIdentifier extends string, This extends BaseStringField<TIdentifier, This>> extends BaseField<TIdentifier, string, string, This> {
|
|
10
|
+
minLength?: number;
|
|
11
|
+
maxLength: number;
|
|
12
|
+
placeholder?: string;
|
|
13
|
+
protected constructor(options: BaseStringFieldOptions);
|
|
14
|
+
static getFieldCreationSchema(parentPath?: string): {
|
|
15
|
+
field: NumberField;
|
|
16
|
+
showDirectly: boolean;
|
|
17
|
+
}[];
|
|
18
|
+
getFieldValidators(): FieldValidator<string>[];
|
|
19
|
+
serialize(): BaseSerializedStringField<TIdentifier>;
|
|
20
|
+
getOptions(): BaseStringFieldOptions;
|
|
21
|
+
setOptions(options: Partial<BaseStringFieldOptions>): void;
|
|
22
|
+
serializeValue(value: string): string;
|
|
23
|
+
deserializeValue(value: string): string;
|
|
24
|
+
isSerializedValueValid(value: unknown): value is string;
|
|
25
|
+
isValueValid(value: unknown): value is string;
|
|
26
|
+
blankValue(): string;
|
|
27
|
+
areValuesEqual(value1: string, value2: string): boolean;
|
|
28
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseSerializedField } from '../BaseField';
|
|
2
|
-
export interface BaseSerializedStringField extends BaseSerializedField {
|
|
2
|
+
export interface BaseSerializedStringField<TIdentifier extends string> extends BaseSerializedField<TIdentifier> {
|
|
3
3
|
minimum_length?: number;
|
|
4
4
|
maximum_length: number;
|
|
5
5
|
placeholder?: string;
|
|
@@ -1,22 +1,25 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { BaseField, FieldOptions } from '../BaseField';
|
|
3
|
+
import { FieldRenderProps } from '../BaseFormElement';
|
|
4
|
+
import { SerializedField } from '../typings';
|
|
5
5
|
import { SerializedBooleanField } from './typings';
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
description: string;
|
|
10
|
-
required: boolean;
|
|
11
|
-
};
|
|
12
|
-
export declare class BooleanField extends BaseField<boolean, "boolean"> {
|
|
6
|
+
export type BooleanFieldOptions = FieldOptions<boolean>;
|
|
7
|
+
export declare class BooleanField extends BaseField<"boolean", boolean, boolean, BooleanField> {
|
|
8
|
+
readonly type = "boolean";
|
|
13
9
|
static readonly fieldTypeName = "Checkbox";
|
|
14
10
|
static readonly fieldTypeDescription = "Perfect for both optional and required yes/no questions.";
|
|
15
|
-
readonly onlyValidateAfterTouched
|
|
16
|
-
|
|
17
|
-
constructor(options: ChildFieldOptions<boolean>);
|
|
18
|
-
protected isBlank(value: boolean | undefined): boolean;
|
|
11
|
+
readonly onlyValidateAfterTouched: boolean;
|
|
12
|
+
constructor(options: BooleanFieldOptions);
|
|
19
13
|
serialize(): SerializedBooleanField;
|
|
20
|
-
|
|
21
|
-
|
|
14
|
+
getOptions(): BooleanFieldOptions;
|
|
15
|
+
setOptions(options: Partial<BooleanFieldOptions>): void;
|
|
16
|
+
duplicate(identifier: string): BooleanField;
|
|
17
|
+
static deserialize(data: SerializedField): BooleanField;
|
|
18
|
+
serializeValue(value: boolean): boolean;
|
|
19
|
+
deserializeValue(value: boolean): boolean;
|
|
20
|
+
render(props: FieldRenderProps): ReactNode;
|
|
21
|
+
isSerializedValueValid(value: unknown): value is boolean;
|
|
22
|
+
isValueValid(value: unknown): value is boolean;
|
|
23
|
+
blankValue(): boolean;
|
|
24
|
+
areValuesEqual(value1: boolean, value2: boolean): boolean;
|
|
22
25
|
}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FieldRenderProps } from '../BaseFormElement';
|
|
2
2
|
import { BooleanField } from './BooleanField';
|
|
3
|
-
|
|
3
|
+
interface BooleanInputProps extends FieldRenderProps {
|
|
4
|
+
field: BooleanField;
|
|
5
|
+
}
|
|
6
|
+
export declare const BooleanInput: import('react').MemoExoticComponent<(props: BooleanInputProps) => import("react/jsx-runtime").JSX.Element>;
|
|
7
|
+
export {};
|
|
@@ -1,31 +1,24 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { MultiStringField } from '../MultiStringField';
|
|
5
|
-
import { GetInputProps, ISerializedField } from '../typings';
|
|
2
|
+
import { FieldRenderProps } from '../BaseFormElement';
|
|
3
|
+
import { BaseOptionsField, BaseOptionsFieldOptions } from '../BaseOptionsField';
|
|
6
4
|
import { SerializedCheckboxListField } from './typings';
|
|
7
|
-
export
|
|
8
|
-
type: string;
|
|
9
|
-
options: never[];
|
|
10
|
-
label: string;
|
|
11
|
-
description: string;
|
|
12
|
-
required: boolean;
|
|
13
|
-
};
|
|
14
|
-
export interface CheckboxListFieldConfig extends ChildFieldOptions<string[]> {
|
|
15
|
-
options: SelectFieldOption[];
|
|
5
|
+
export interface CheckboxListFieldOptions extends BaseOptionsFieldOptions<string[]> {
|
|
16
6
|
}
|
|
17
|
-
export declare class CheckboxListField extends
|
|
18
|
-
readonly
|
|
7
|
+
export declare class CheckboxListField extends BaseOptionsField<"checkbox-list", string[], string[], CheckboxListField> {
|
|
8
|
+
readonly type = "checkbox-list";
|
|
19
9
|
readonly onlyValidateAfterTouched = false;
|
|
20
10
|
static readonly fieldTypeName = "Checkbox list";
|
|
21
11
|
static readonly fieldTypeDescription = "Allows the user to select a multiple options from a list.";
|
|
22
|
-
|
|
23
|
-
constructor(config: CheckboxListFieldConfig);
|
|
12
|
+
constructor(options: CheckboxListFieldOptions);
|
|
24
13
|
serialize(): SerializedCheckboxListField;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
14
|
+
getOptions(): CheckboxListFieldOptions;
|
|
15
|
+
duplicate(identifier: string): CheckboxListField;
|
|
16
|
+
static deserialize(data: SerializedCheckboxListField): CheckboxListField;
|
|
17
|
+
serializeValue(value: string[]): string[];
|
|
18
|
+
deserializeValue(value: string[]): string[];
|
|
19
|
+
render(props: FieldRenderProps): ReactNode;
|
|
20
|
+
isSerializedValueValid(value: unknown): value is string[];
|
|
21
|
+
isValueValid(value: unknown): value is string[];
|
|
22
|
+
blankValue(): string[];
|
|
23
|
+
areValuesEqual(value1: string[], value2: string[]): boolean;
|
|
31
24
|
}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FieldRenderProps } from '../BaseFormElement';
|
|
2
2
|
import { CheckboxListField } from './CheckboxListField';
|
|
3
|
-
|
|
3
|
+
interface CheckboxListInputProps extends FieldRenderProps {
|
|
4
|
+
field: CheckboxListField;
|
|
5
|
+
}
|
|
6
|
+
export declare const CheckboxListInput: import('react').NamedExoticComponent<CheckboxListInputProps>;
|
|
7
|
+
export {};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { BaseSerializedField } from '../BaseField';
|
|
2
|
-
import { SelectFieldOption } from '../
|
|
3
|
-
export interface SerializedCheckboxListField extends BaseSerializedField {
|
|
4
|
-
type: "checkbox-list";
|
|
2
|
+
import { SelectFieldOption } from '../BaseOptionsField';
|
|
3
|
+
export interface SerializedCheckboxListField extends BaseSerializedField<"checkbox-list"> {
|
|
5
4
|
options: SelectFieldOption[];
|
|
6
5
|
}
|
|
@@ -1,21 +1,29 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { GetInputProps, ISerializedField } from '../typings';
|
|
2
|
+
import { BaseField, FieldOptions } from '../BaseField';
|
|
3
|
+
import { FieldRenderProps } from '../BaseFormElement';
|
|
5
4
|
import { SerializedDateField } from './typings';
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
description: string;
|
|
10
|
-
required: boolean;
|
|
5
|
+
export type SerializedDateRange = {
|
|
6
|
+
to: string | null;
|
|
7
|
+
from: string | null;
|
|
11
8
|
};
|
|
12
|
-
export
|
|
9
|
+
export interface DateFieldOptions extends FieldOptions<Date | null> {
|
|
10
|
+
}
|
|
11
|
+
export declare class DateField extends BaseField<"date", Date | null, string | null, DateField> {
|
|
12
|
+
readonly type = "date";
|
|
13
13
|
static readonly fieldTypeName = "Date";
|
|
14
14
|
static readonly fieldTypeDescription = "Allows specifying a date.";
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
constructor(options: ChildFieldOptions<string>);
|
|
15
|
+
readonly onlyValidateAfterTouched: boolean;
|
|
16
|
+
constructor(options: DateFieldOptions);
|
|
18
17
|
serialize(): SerializedDateField;
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
getOptions(): DateFieldOptions;
|
|
19
|
+
duplicate(identifier: string): DateField;
|
|
20
|
+
static deserialize(data: SerializedDateField): DateField;
|
|
21
|
+
setOptions(options: Partial<DateFieldOptions>): void;
|
|
22
|
+
serializeValue(value: Date | null): string | null;
|
|
23
|
+
deserializeValue(value: string | null): Date | null;
|
|
24
|
+
render(props: FieldRenderProps): ReactNode;
|
|
25
|
+
isSerializedValueValid(value: unknown): value is string | null;
|
|
26
|
+
isValueValid(value: unknown): value is Date | null;
|
|
27
|
+
blankValue(): Date | null;
|
|
28
|
+
areValuesEqual(value1: Date | null, value2: Date | null): boolean;
|
|
21
29
|
}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FieldRenderProps } from '../BaseFormElement';
|
|
2
2
|
import { DateField } from './DateField';
|
|
3
|
-
|
|
3
|
+
interface DateInputProps extends FieldRenderProps {
|
|
4
|
+
field: DateField;
|
|
5
|
+
}
|
|
6
|
+
export declare const DateInput: import('react').MemoExoticComponent<(props: DateInputProps) => import("react/jsx-runtime").JSX.Element>;
|
|
7
|
+
export {};
|
|
@@ -1,36 +1,47 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { BaseFormElement,
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
interface FieldSectionOptions extends Omit<BaseSerializedObject, "type"> {
|
|
2
|
+
import { Condition, FieldConditionManager } from '../../conditions';
|
|
3
|
+
import { FieldValues } from '../../typings';
|
|
4
|
+
import { BaseFormElement, FieldRenderProps, FormElementOptions } from '../BaseFormElement';
|
|
5
|
+
import { Field, FieldsManager } from '../typings';
|
|
6
|
+
import { FieldSectionConditions, SerializedFieldSection } from './typings';
|
|
7
|
+
export interface FieldSectionOptions extends FormElementOptions {
|
|
9
8
|
label?: string | null;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
fields:
|
|
9
|
+
description?: string | null;
|
|
10
|
+
conditions?: FieldSectionConditions;
|
|
11
|
+
fields: Field[];
|
|
13
12
|
}
|
|
14
|
-
export declare class FieldSection extends BaseFormElement<"section"> {
|
|
13
|
+
export declare class FieldSection extends BaseFormElement<"section", FieldSection> implements FieldConditionManager<Condition>, FieldsManager {
|
|
15
14
|
static readonly fieldTypeName = "Section";
|
|
16
15
|
static readonly fieldTypeDescription = "Sections can be useful for grouping fields together. They can also be conditionally shown or hidden.";
|
|
17
|
-
readonly
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
readonly type = "section";
|
|
17
|
+
label: string | null;
|
|
18
|
+
description: string | null;
|
|
19
|
+
conditions: FieldSectionConditions;
|
|
20
|
+
fields: Field[];
|
|
20
21
|
constructor(options: FieldSectionOptions);
|
|
21
|
-
static getFieldCreationSchema(options: ISerializedField[], parentPath?: string): ({
|
|
22
|
-
field: BooleanField;
|
|
23
|
-
showDirectly: boolean;
|
|
24
|
-
} | {
|
|
25
|
-
field: FieldSection;
|
|
26
|
-
showDirectly: boolean;
|
|
27
|
-
})[];
|
|
28
|
-
static deserialize(data: ISerializedField): FieldSection;
|
|
29
|
-
conditional(): this is {
|
|
30
|
-
condition: SerializedCondition;
|
|
31
|
-
};
|
|
32
22
|
serialize(): SerializedFieldSection;
|
|
33
|
-
|
|
34
|
-
|
|
23
|
+
static deserialize(data: SerializedFieldSection): FieldSection;
|
|
24
|
+
getOptions(): FieldSectionOptions;
|
|
25
|
+
duplicate(identifier: string): FieldSection;
|
|
26
|
+
setOptions(options: Partial<FieldSectionOptions>): void;
|
|
27
|
+
getErrors(values: FieldValues): Record<string, string>;
|
|
28
|
+
private fieldObserver;
|
|
29
|
+
private initFields;
|
|
30
|
+
getFields(): Field[];
|
|
31
|
+
addField(field: Field): void;
|
|
32
|
+
addFields(fields: Field[]): void;
|
|
33
|
+
moveField(sourceIndex: number, targetIndex: number): void;
|
|
34
|
+
removeField(field: Field): void;
|
|
35
|
+
removeFields(fields: Field[]): void;
|
|
36
|
+
private conditionObserver;
|
|
37
|
+
private initConditions;
|
|
38
|
+
getConditions(identifier: string): Condition[];
|
|
39
|
+
addCondition(identifier: string, condition: Condition): void;
|
|
40
|
+
addConditions(identifier: string, conditions: Condition[]): void;
|
|
41
|
+
removeCondition(identifier: string, condition: Condition): void;
|
|
42
|
+
removeConditions(identifier: string, conditions: Condition[]): void;
|
|
43
|
+
getConditionals(): Set<string>;
|
|
44
|
+
addConditional(identifier: string): void;
|
|
45
|
+
removeConditional(identifier: string): void;
|
|
46
|
+
render(props: FieldRenderProps): ReactNode;
|
|
35
47
|
}
|
|
36
|
-
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FieldRenderProps } from '../BaseFormElement';
|
|
2
2
|
import { FieldSection } from './FieldSection';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export declare const FieldSectionLayout: import('react').
|
|
3
|
+
interface FieldSectionLayoutProps extends FieldRenderProps {
|
|
4
|
+
fieldSection: FieldSection;
|
|
5
|
+
}
|
|
6
|
+
export declare const FieldSectionLayout: import('react').NamedExoticComponent<FieldSectionLayoutProps>;
|
|
7
|
+
export {};
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export interface SerializedFieldSection extends BaseSerializedObject {
|
|
1
|
+
import { Condition, SerializedCondition } from '../../conditions';
|
|
2
|
+
import { BaseSerializedObject } from '../BaseFormElement';
|
|
3
|
+
import { SerializedOnlyField } from '../typings';
|
|
4
|
+
export type FieldSectionConditions = Record<string, Condition[]>;
|
|
5
|
+
export type SerializedFieldSectionConditions = Record<string, SerializedCondition[]>;
|
|
6
|
+
export interface SerializedFieldSection extends BaseSerializedObject<"section"> {
|
|
8
7
|
label: string | null;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
fields: Exclude<ISerializedField, SerializedFieldSection>[];
|
|
8
|
+
description?: string | null;
|
|
9
|
+
conditions: SerializedFieldSectionConditions;
|
|
10
|
+
fields: SerializedOnlyField[];
|
|
13
11
|
}
|
|
@@ -1,27 +1,26 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { GetInputProps, ISerializedField } from '../typings';
|
|
2
|
+
import { FieldRenderProps } from '../BaseFormElement';
|
|
3
|
+
import { BaseOptionsField, BaseOptionsFieldOptions } from '../BaseOptionsField';
|
|
5
4
|
import { SerializedMultiSelectField } from './typings';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
*/
|
|
9
|
-
export type MultiSelectFieldOptions = Omit<BaseSelectFieldOptions<SelectFieldOptionValue[], "multi-select">, "type">;
|
|
10
|
-
export declare const emptyMultiSelectField: {
|
|
11
|
-
type: string;
|
|
12
|
-
options: never[];
|
|
13
|
-
label: string;
|
|
14
|
-
description: string;
|
|
15
|
-
required: boolean;
|
|
5
|
+
export type MultiSelectFieldOptions = BaseOptionsFieldOptions<string[]> & {
|
|
6
|
+
placeholder?: string;
|
|
16
7
|
};
|
|
17
|
-
export declare class MultiSelectField extends
|
|
8
|
+
export declare class MultiSelectField extends BaseOptionsField<"multi-select", string[], string[], MultiSelectField> {
|
|
9
|
+
readonly type = "multi-select";
|
|
18
10
|
static readonly fieldTypeName = "Multi-select";
|
|
19
11
|
static readonly fieldTypeDescription = "Allows the user to select a multiple options from a list of options.";
|
|
20
|
-
|
|
12
|
+
placeholder?: string;
|
|
21
13
|
constructor(options: MultiSelectFieldOptions);
|
|
22
|
-
protected isBlank(value: SelectFieldOptionValue[] | undefined): boolean;
|
|
23
|
-
isEqual(value1: SelectFieldOptionValue[] | undefined, value2: SelectFieldOptionValue[] | undefined): boolean;
|
|
24
14
|
serialize(): SerializedMultiSelectField;
|
|
25
|
-
|
|
26
|
-
|
|
15
|
+
getOptions(): MultiSelectFieldOptions;
|
|
16
|
+
duplicate(identifier: string): MultiSelectField;
|
|
17
|
+
setOptions(options: Partial<MultiSelectFieldOptions>): void;
|
|
18
|
+
static deserialize(data: SerializedMultiSelectField): MultiSelectField;
|
|
19
|
+
serializeValue(value: string[]): string[];
|
|
20
|
+
deserializeValue(value: string[]): string[];
|
|
21
|
+
render(props: FieldRenderProps): ReactNode;
|
|
22
|
+
isSerializedValueValid(value: unknown): value is string[];
|
|
23
|
+
isValueValid(value: unknown): value is string[];
|
|
24
|
+
blankValue(): string[];
|
|
25
|
+
areValuesEqual(value1: string[], value2: string[]): boolean;
|
|
27
26
|
}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FieldRenderProps } from '../BaseFormElement';
|
|
2
2
|
import { MultiSelectField } from './MultiSelectField';
|
|
3
|
-
export
|
|
3
|
+
export interface MultiSelectInputProps extends FieldRenderProps {
|
|
4
|
+
field: MultiSelectField;
|
|
5
|
+
}
|
|
6
|
+
export declare const MultiSelectInput: import('react').MemoExoticComponent<(props: MultiSelectInputProps) => import("react/jsx-runtime").JSX.Element>;
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export interface SerializedMultiSelectField extends BaseSerializedField {
|
|
4
|
-
type: "multi-select";
|
|
5
|
-
options: SelectFieldOption[];
|
|
1
|
+
import { BaseSerializedSelectField } from '../BaseOptionsField';
|
|
2
|
+
export interface SerializedMultiSelectField extends BaseSerializedSelectField<"multi-select"> {
|
|
6
3
|
placeholder?: string;
|
|
7
4
|
}
|