@overmap-ai/forms 1.0.32-react-flow-david-fixes.41 → 1.0.33-toast-migration.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/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/{fields/UploadField → UUIDPromise}/UUIDPromise.d.ts +3 -3
- 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 +1 -1
- package/dist/form/builder/components/CreateFieldDropdownMenu.d.ts +8 -0
- package/dist/form/builder/components/FieldBuilder.d.ts +2 -2
- package/dist/form/builder/components/FieldBuilderWithActions.d.ts +9 -0
- package/dist/form/builder/components/index.d.ts +2 -1
- package/dist/form/builder/hooks.d.ts +1 -1
- package/dist/form/builder/list/FieldSectionWithActions.d.ts +1 -1
- package/dist/form/builder/utils.d.ts +2 -2
- 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 +7 -8
- package/dist/form/conditions/BaseCondition/typings.d.ts +4 -4
- package/dist/form/conditions/BooleanFieldCondition/BooleanFieldCondition.d.ts +4 -6
- package/dist/form/conditions/CheckboxListFieldCondition/CheckboxListFieldCondition.d.ts +4 -6
- 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 +5 -7
- package/dist/form/conditions/MultiSelectFieldCondition/MultiSelectFieldCondition.d.ts +4 -14
- package/dist/form/conditions/MultiStringFieldCondition/MultiStringFieldCondition.d.ts +4 -6
- package/dist/form/conditions/NumberFieldCondition/NumberFieldCondition.d.ts +4 -17
- package/dist/form/conditions/OTPFieldCondition/OTPFieldCondition.d.ts +4 -6
- package/dist/form/conditions/PassFailFieldCondition/PassFailFieldCondition.d.ts +18 -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 +4 -6
- package/dist/form/conditions/RatingFieldCondition/RatingFieldCondition.d.ts +21 -0
- package/dist/form/conditions/RatingFieldCondition/RatingFieldConditionCell.d.ts +6 -0
- package/dist/form/conditions/RatingFieldCondition/index.d.ts +3 -0
- package/dist/form/conditions/RatingFieldCondition/typings.d.ts +4 -0
- package/dist/form/conditions/ScanFieldCondition/ScanFieldCondition.d.ts +4 -6
- package/dist/form/conditions/SelectFieldCondition/SelectFieldCondition.d.ts +4 -6
- package/dist/form/conditions/StringFieldCondition/StringFieldCondition.d.ts +4 -6
- package/dist/form/conditions/TextFieldCondition/TextFieldCondition.d.ts +4 -6
- package/dist/form/conditions/UploadFieldCondition/UploadFieldCondition.d.ts +8 -8
- package/dist/form/conditions/constants.d.ts +32 -0
- package/dist/form/conditions/index.d.ts +3 -0
- package/dist/form/conditions/typings.d.ts +6 -3
- package/dist/form/conditions/utils.d.ts +4 -5
- package/dist/form/fields/BaseField/BaseField.d.ts +6 -7
- package/dist/form/fields/BaseField/typings.d.ts +3 -4
- package/dist/form/fields/BaseFormElement/BaseFormElement.d.ts +9 -9
- package/dist/form/fields/BaseFormElement/typings.d.ts +3 -3
- package/dist/form/fields/BaseOptionsField/BaseOptionsField.d.ts +7 -7
- package/dist/form/fields/BaseOptionsField/typings.d.ts +2 -2
- package/dist/form/fields/BaseStringField/BaseStringField.d.ts +4 -4
- package/dist/form/fields/BaseStringField/typings.d.ts +1 -1
- package/dist/form/fields/BooleanField/BooleanField.d.ts +3 -4
- package/dist/form/fields/BooleanField/BooleanInput.d.ts +1 -1
- package/dist/form/fields/CheckboxListField/CheckboxListField.d.ts +2 -2
- package/dist/form/fields/DateField/DateField.d.ts +2 -2
- package/dist/form/fields/DateField/DateInput.d.ts +1 -1
- package/dist/form/fields/FieldSection/FieldSection.d.ts +6 -8
- package/dist/form/fields/FieldSection/typings.d.ts +2 -2
- package/dist/form/fields/MultiSelectField/MultiSelectField.d.ts +2 -2
- package/dist/form/fields/MultiSelectField/MultiSelectInput.d.ts +1 -1
- package/dist/form/fields/MultiStringField/MultiStringField.d.ts +2 -2
- package/dist/form/fields/MultiStringField/MultiStringInput.d.ts +1 -1
- package/dist/form/fields/NumberField/NumberField.d.ts +2 -2
- package/dist/form/fields/NumberField/NumberInput.d.ts +1 -1
- package/dist/form/fields/OneTimePasswordField/OTPField.d.ts +2 -2
- package/dist/form/fields/OneTimePasswordField/typings.d.ts +1 -1
- 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 +2 -2
- package/dist/form/fields/RadioField/RadioInput.d.ts +1 -1
- package/dist/form/fields/RatingField/RatingField.d.ts +32 -0
- package/dist/form/fields/RatingField/RatingInput.d.ts +7 -0
- package/dist/form/fields/RatingField/index.d.ts +3 -0
- package/dist/form/fields/RatingField/typings.d.ts +4 -0
- package/dist/form/fields/ScanField/ScanField.d.ts +2 -2
- package/dist/form/fields/ScanField/ScanInput.d.ts +1 -1
- package/dist/form/fields/SelectField/SelectField.d.ts +2 -2
- package/dist/form/fields/SelectField/SelectInput.d.ts +1 -1
- package/dist/form/fields/StringField/StringField.d.ts +1 -1
- package/dist/form/fields/StringField/StringInput.d.ts +1 -1
- package/dist/form/fields/TextField/TextField.d.ts +1 -1
- package/dist/form/fields/TextField/TextInput.d.ts +1 -1
- package/dist/form/fields/UploadField/UploadField.d.ts +11 -10
- package/dist/form/fields/UploadField/UploadInput.d.ts +1 -1
- package/dist/form/fields/UploadField/index.d.ts +0 -1
- package/dist/form/fields/UploadField/utils.d.ts +0 -3
- package/dist/form/fields/components/InputWithLabel.d.ts +1 -1
- package/dist/form/fields/constants.d.ts +7 -3
- package/dist/form/fields/hooks.d.ts +1 -1
- package/dist/form/fields/index.d.ts +2 -0
- package/dist/form/fields/typings.d.ts +14 -16
- package/dist/form/fields/utils.d.ts +7 -2
- package/dist/form/index.d.ts +3 -0
- package/dist/form/modifiers/file.d.ts +3 -2
- package/dist/form/modifiers/index.d.ts +1 -0
- package/dist/form/modifiers/passFailStatus.d.ts +6 -0
- package/dist/form/modifiers/utils.d.ts +1 -1
- package/dist/form/schema/FieldSchema.d.ts +7 -6
- package/dist/form/typings.d.ts +6 -2
- package/dist/form/utils.d.ts +5 -11
- package/dist/forms.js +2185 -742
- package/dist/forms.js.map +1 -0
- package/dist/forms.umd.cjs +2183 -740
- package/dist/forms.umd.cjs.map +1 -0
- package/package.json +37 -51
- package/dist/form/builder/components/FieldWithActions.d.ts +0 -10
- /package/dist/form/{observable → Observable}/Observable.d.ts +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Observable';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './UUIDFile';
|
|
@@ -4,7 +4,7 @@ export declare class UUIDPromise<T> extends Promise<T> {
|
|
|
4
4
|
get uuid(): string;
|
|
5
5
|
private set uuid(value);
|
|
6
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>) |
|
|
8
|
-
catch<TResult2 = never>(onRejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) |
|
|
9
|
-
finally(onFinally?: (() => void) |
|
|
7
|
+
then<TResult1 = T, TResult2 = never>(onFulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null, onRejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null): UUIDPromise<TResult1 | TResult2>;
|
|
8
|
+
catch<TResult2 = never>(onRejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null): UUIDPromise<T | TResult2>;
|
|
9
|
+
finally(onFinally?: (() => void) | null): UUIDPromise<T>;
|
|
10
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;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
|
-
import { SerializedFieldSection } from '../fields';
|
|
3
2
|
import { FormBuilderSaveHandler } from './typings';
|
|
3
|
+
import { SerializedFieldSection } from '../fields';
|
|
4
4
|
export interface FormBuilderRootProps extends PropsWithChildren {
|
|
5
5
|
initialTitle?: string;
|
|
6
6
|
initialDescription?: string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { MenuRootProps, MenuVariantProps } from '@overmap-ai/blocks';
|
|
2
|
+
import { ReactElement } from 'react';
|
|
3
|
+
import { FieldType } from '../../fields';
|
|
4
|
+
export interface CreateFieldDropdownMenuProps extends MenuRootProps, MenuVariantProps {
|
|
5
|
+
children: ReactElement;
|
|
6
|
+
onSelectFieldType: (type: Exclude<FieldType, "section">) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const CreateFieldDropdownMenu: import('react').NamedExoticComponent<CreateFieldDropdownMenuProps>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Field, FieldSection } from '../../fields';
|
|
2
|
+
interface FieldWithActionsProps {
|
|
3
|
+
field: Field;
|
|
4
|
+
fieldIndex: number;
|
|
5
|
+
fieldSection: FieldSection;
|
|
6
|
+
sectionIndex: number;
|
|
7
|
+
}
|
|
8
|
+
export declare const FieldBuilderWithActions: import('react').MemoExoticComponent<(props: FieldWithActionsProps) => import("react/jsx-runtime").JSX.Element>;
|
|
9
|
+
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
export * from './CreateFieldDropdownMenu';
|
|
1
2
|
export * from './FieldBuilder';
|
|
3
|
+
export * from './FieldBuilderWithActions';
|
|
2
4
|
export * from './FieldDropdownMenu';
|
|
3
5
|
export * from './FieldSectionDropdownMenu';
|
|
4
6
|
export * from './FieldSettingsPopover';
|
|
5
|
-
export * from './FieldWithActions';
|
|
@@ -2,6 +2,6 @@ import { FieldType } from '../fields';
|
|
|
2
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" | "checkbox-list" | "pass-fail" | "multi-select" | "multi-string" | "rating" | "qr" | "upload" | "otp";
|
|
6
6
|
onSelect: () => void;
|
|
7
7
|
}[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FieldSection } from '../../fields';
|
|
2
2
|
export interface FieldSectionWithActionsProps {
|
|
3
3
|
fieldSection: FieldSection;
|
|
4
|
-
|
|
4
|
+
sectionIndex: number;
|
|
5
5
|
}
|
|
6
6
|
export declare const FieldSectionWithActions: import('react').MemoExoticComponent<(props: FieldSectionWithActionsProps) => import("react/jsx-runtime").JSX.Element>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BooleanFieldCondition, CheckboxListFieldCondition, DateFieldCondition, MultiSelectFieldCondition, MultiStringFieldCondition, NumberFieldCondition, OTPFieldCondition, RadioFieldCondition, ScanFieldCondition, SelectFieldCondition, StringFieldCondition, TextFieldCondition, UploadFieldCondition } from '../conditions';
|
|
1
|
+
import { BooleanFieldCondition, CheckboxListFieldCondition, DateFieldCondition, MultiSelectFieldCondition, MultiStringFieldCondition, NumberFieldCondition, OTPFieldCondition, PassFailFieldCondition, RadioFieldCondition, RatingFieldCondition, ScanFieldCondition, SelectFieldCondition, StringFieldCondition, TextFieldCondition, UploadFieldCondition } from '../conditions';
|
|
2
2
|
import { Field, FieldCreationSchemaObject, FieldType } from '../fields';
|
|
3
3
|
export declare const createField: (type: Exclude<FieldType, "section">) => Field;
|
|
4
|
-
export declare const createCondition: (field: Field) => BooleanFieldCondition | CheckboxListFieldCondition | DateFieldCondition | MultiSelectFieldCondition | MultiStringFieldCondition | NumberFieldCondition | OTPFieldCondition | RadioFieldCondition | ScanFieldCondition | SelectFieldCondition | StringFieldCondition | TextFieldCondition | UploadFieldCondition;
|
|
4
|
+
export declare const createCondition: (field: Field) => BooleanFieldCondition | CheckboxListFieldCondition | DateFieldCondition | MultiSelectFieldCondition | MultiStringFieldCondition | NumberFieldCondition | OTPFieldCondition | PassFailFieldCondition | RadioFieldCondition | RatingFieldCondition | ScanFieldCondition | SelectFieldCondition | StringFieldCondition | TextFieldCondition | UploadFieldCondition;
|
|
5
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';
|
|
@@ -1,25 +1,24 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
+
import { BaseSerializedCondition, ConditionRenderProps } from './typings';
|
|
2
3
|
import { AnyField, TypeOfField, ValueOfField } from '../../fields';
|
|
3
4
|
import { AnyConditionModifierConfig } from '../../modifiers';
|
|
4
|
-
import { Observable } from '../../
|
|
5
|
-
|
|
6
|
-
export interface ConditionOptions<TField, TConditionValue, TModifiers extends string> {
|
|
5
|
+
import { Observable } from '../../Observable';
|
|
6
|
+
export interface BaseConditionOptions<TField, TConditionValue, TModifiers extends string> {
|
|
7
7
|
id: string;
|
|
8
8
|
field: TField;
|
|
9
9
|
conditionValue: TConditionValue | undefined;
|
|
10
10
|
conditionModifier: TModifiers;
|
|
11
11
|
}
|
|
12
|
-
export declare abstract class BaseCondition<TField extends AnyField, TConditionValue, TSerializedConditionValue, TModifiers extends string, This extends BaseCondition<TField, TConditionValue, TSerializedConditionValue, TModifiers, This>> extends Observable<This> {
|
|
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
13
|
readonly id: string;
|
|
14
14
|
conditionValue: TConditionValue | undefined;
|
|
15
15
|
conditionModifier: TModifiers;
|
|
16
16
|
field: TField;
|
|
17
|
-
abstract readonly
|
|
18
|
-
|
|
19
|
-
abstract readonly modifiers: Record<TModifiers, AnyConditionModifierConfig<ValueOfField<TField>, TConditionValue, TSerializedConditionValue>>;
|
|
20
|
-
protected constructor(config: ConditionOptions<TField, TConditionValue, TModifiers>);
|
|
17
|
+
abstract readonly modifiers: Record<TModifiers, AnyConditionModifierConfig<TValue, TConditionValue, TSerializedConditionValue>>;
|
|
18
|
+
protected constructor(config: BaseConditionOptions<TField, TConditionValue, TModifiers>);
|
|
21
19
|
serialize(): BaseSerializedCondition<TypeOfField<TField>, TSerializedConditionValue, TModifiers>;
|
|
22
20
|
getConditionValue: () => TConditionValue | undefined;
|
|
21
|
+
transformValue(value: ValueOfField<TField>): TValue;
|
|
23
22
|
setConditionValue: (conditionValue: TConditionValue | undefined) => void;
|
|
24
23
|
getConditionModifier: () => TModifiers;
|
|
25
24
|
setConditionModifier: (modifier: TModifiers) => void;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { AnyField } from '../../fields';
|
|
2
2
|
import { BaseCondition } from './BaseCondition';
|
|
3
|
-
export type AnyCondition = BaseCondition<AnyField, any, any, any, any>;
|
|
4
|
-
export type ModifiersOfCondition<TCondition> = TCondition extends BaseCondition<infer _TValue, infer _TConditionValue, infer _TSerializedConditionValue, infer TConditionModifiers, infer _This> ? TConditionModifiers : never;
|
|
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
5
|
export interface ConditionRenderProps<TCondition> {
|
|
6
6
|
onRemove: (condition: TCondition) => void;
|
|
7
7
|
}
|
|
8
8
|
export interface BaseConditionCellProps<TCondition> extends ConditionRenderProps<TCondition> {
|
|
9
9
|
condition: TCondition;
|
|
10
10
|
}
|
|
11
|
-
export interface BaseSerializedCondition<
|
|
11
|
+
export interface BaseSerializedCondition<TType extends string, TSerializedConditionValue, TModifier extends string> {
|
|
12
12
|
id: string;
|
|
13
|
-
type:
|
|
13
|
+
type: TType;
|
|
14
14
|
fieldId: string;
|
|
15
15
|
conditionValue: TSerializedConditionValue;
|
|
16
16
|
conditionModifier: TModifier;
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { BooleanField } from '../../fields';
|
|
3
|
-
import { BaseCondition, ConditionOptions, ConditionRenderProps } from '../BaseCondition';
|
|
4
2
|
import { BooleanConditionModifiers, SerializedBooleanCondition } from './typings';
|
|
5
|
-
|
|
3
|
+
import { BooleanField, ValueOfField } from '../../fields';
|
|
4
|
+
import { BaseCondition, BaseConditionOptions, ConditionRenderProps } from '../BaseCondition';
|
|
5
|
+
export interface BooleanFieldConditionOptions extends BaseConditionOptions<BooleanField, boolean, BooleanConditionModifiers> {
|
|
6
6
|
}
|
|
7
|
-
export declare class BooleanFieldCondition extends BaseCondition<BooleanField, boolean, boolean, BooleanConditionModifiers, BooleanFieldCondition> {
|
|
8
|
-
readonly defaultConditionModifier = "equals";
|
|
9
|
-
readonly defaultConditionValue: undefined;
|
|
7
|
+
export declare class BooleanFieldCondition extends BaseCondition<BooleanField, ValueOfField<BooleanField>, boolean, boolean, BooleanConditionModifiers, BooleanFieldCondition> {
|
|
10
8
|
readonly modifiers: {
|
|
11
9
|
equals: import('../..').FieldConditionModifierConfig<boolean, boolean, boolean, boolean, boolean, boolean>;
|
|
12
10
|
notEquals: import('../..').FieldConditionModifierConfig<boolean, boolean, boolean, boolean, boolean, boolean>;
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { CheckboxListField } from '../../fields';
|
|
3
|
-
import { BaseCondition, ConditionOptions, ConditionRenderProps } from '../BaseCondition';
|
|
4
2
|
import { CheckboxListConditionModifiers, SerializedCheckboxListCondition } from './typings';
|
|
5
|
-
|
|
3
|
+
import { CheckboxListField, ValueOfField } from '../../fields';
|
|
4
|
+
import { BaseCondition, BaseConditionOptions, ConditionRenderProps } from '../BaseCondition';
|
|
5
|
+
export interface CheckboxListFieldConditionOptions extends BaseConditionOptions<CheckboxListField, string[], CheckboxListConditionModifiers> {
|
|
6
6
|
}
|
|
7
|
-
export declare class CheckboxListFieldCondition extends BaseCondition<CheckboxListField, string[], string[], CheckboxListConditionModifiers, CheckboxListFieldCondition> {
|
|
8
|
-
readonly defaultConditionModifier = "equals";
|
|
9
|
-
readonly defaultConditionValue: string[] | undefined;
|
|
7
|
+
export declare class CheckboxListFieldCondition extends BaseCondition<CheckboxListField, ValueOfField<CheckboxListField>, string[], string[], CheckboxListConditionModifiers, CheckboxListFieldCondition> {
|
|
10
8
|
readonly modifiers: {
|
|
11
9
|
equals: import('../..').FieldConditionModifierConfig<string[], string[], string[], string[], string[], string[]>;
|
|
12
10
|
notEquals: import('../..').FieldConditionModifierConfig<string[], string[], string[], string[], string[], string[]>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FieldValues } from '../../typings';
|
|
2
|
+
import { Condition } from '../typings';
|
|
3
|
+
import { Observable } from '../../Observable';
|
|
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 { ConditionsChangeEventHandler } from './typings';
|
|
3
|
+
import { ConditionManager } from './ConditionManager';
|
|
4
|
+
export declare const useConditionManager: (conditions: Condition[], onConditionsChange: ConditionsChangeEventHandler) => ConditionManager;
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
1
|
import { DateRange } from 'react-day-picker';
|
|
3
|
-
import {
|
|
4
|
-
import { BaseCondition, ConditionOptions, ConditionRenderProps } from '../BaseCondition';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
5
3
|
import { DateConditionModifiers, SerializedDateCondition } from './typings';
|
|
6
|
-
|
|
4
|
+
import { DateField, SerializedDateRange, ValueOfField } from '../../fields';
|
|
5
|
+
import { BaseCondition, BaseConditionOptions, ConditionRenderProps } from '../BaseCondition';
|
|
6
|
+
export interface DateFieldConditionOptions extends BaseConditionOptions<DateField, Date | DateRange, DateConditionModifiers> {
|
|
7
7
|
}
|
|
8
|
-
export declare class DateFieldCondition extends BaseCondition<DateField, Date | DateRange, string | SerializedDateRange, DateConditionModifiers, DateFieldCondition> {
|
|
9
|
-
readonly defaultConditionModifier = "equals";
|
|
10
|
-
readonly defaultConditionValue: undefined;
|
|
8
|
+
export declare class DateFieldCondition extends BaseCondition<DateField, ValueOfField<DateField>, Date | DateRange, string | SerializedDateRange, DateConditionModifiers, DateFieldCondition> {
|
|
11
9
|
readonly modifiers: {
|
|
12
10
|
equals: import('../..').FieldConditionModifierConfig<Date | null, Date | DateRange, string | SerializedDateRange, Date, Date, string>;
|
|
13
11
|
notEquals: import('../..').FieldConditionModifierConfig<Date | null, Date | DateRange, string | SerializedDateRange, Date, Date, string>;
|
|
@@ -1,19 +1,10 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { MultiSelectField } from '../../fields';
|
|
3
|
-
import { BaseCondition, ConditionOptions, ConditionRenderProps } from '../BaseCondition';
|
|
4
2
|
import { MultiSelectConditionModifiers, SerializedMultiSelectCondition } from './typings';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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> {
|
|
3
|
+
import { MultiSelectField, ValueOfField } from '../../fields';
|
|
4
|
+
import { BaseCondition, BaseConditionOptions, ConditionRenderProps } from '../BaseCondition';
|
|
5
|
+
export interface MultiSelectFieldConditionOptions extends BaseConditionOptions<MultiSelectField, string[], MultiSelectConditionModifiers> {
|
|
13
6
|
}
|
|
14
|
-
export declare class MultiSelectFieldCondition extends BaseCondition<MultiSelectField, string[], string[], MultiSelectConditionModifiers, MultiSelectFieldCondition> {
|
|
15
|
-
readonly defaultConditionValue: string[] | undefined;
|
|
16
|
-
readonly defaultConditionModifier: keyof typeof modifiers;
|
|
7
|
+
export declare class MultiSelectFieldCondition extends BaseCondition<MultiSelectField, ValueOfField<MultiSelectField>, string[], string[], MultiSelectConditionModifiers, MultiSelectFieldCondition> {
|
|
17
8
|
readonly modifiers: {
|
|
18
9
|
equals: import('../..').FieldConditionModifierConfig<string[], string[], string[], string[], string[], string[]>;
|
|
19
10
|
notEquals: import('../..').FieldConditionModifierConfig<string[], string[], string[], string[], string[], string[]>;
|
|
@@ -25,4 +16,3 @@ export declare class MultiSelectFieldCondition extends BaseCondition<MultiSelect
|
|
|
25
16
|
static deserialize(serializedCondition: SerializedMultiSelectCondition, field: MultiSelectField): MultiSelectFieldCondition;
|
|
26
17
|
render(props: ConditionRenderProps<MultiSelectFieldCondition>): ReactNode;
|
|
27
18
|
}
|
|
28
|
-
export {};
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { MultiStringField } from '../../fields';
|
|
3
|
-
import { BaseCondition, ConditionOptions, ConditionRenderProps } from '../BaseCondition';
|
|
4
2
|
import { MultiStringConditionModifiers, SerializedMultiStringCondition } from './typings';
|
|
5
|
-
|
|
3
|
+
import { MultiStringField, ValueOfField } from '../../fields';
|
|
4
|
+
import { BaseCondition, BaseConditionOptions, ConditionRenderProps } from '../BaseCondition';
|
|
5
|
+
export interface MultiStringFieldConditionOptions extends BaseConditionOptions<MultiStringField, string[], MultiStringConditionModifiers> {
|
|
6
6
|
}
|
|
7
|
-
export declare class MultiStringFieldCondition extends BaseCondition<MultiStringField, string[], string[], MultiStringConditionModifiers, MultiStringFieldCondition> {
|
|
8
|
-
readonly defaultConditionValue: undefined;
|
|
9
|
-
readonly defaultConditionModifier = "equals";
|
|
7
|
+
export declare class MultiStringFieldCondition extends BaseCondition<MultiStringField, ValueOfField<MultiStringField>, string[], string[], MultiStringConditionModifiers, MultiStringFieldCondition> {
|
|
10
8
|
readonly modifiers: {
|
|
11
9
|
equals: import('../..').FieldConditionModifierConfig<string[], string[], string[], string[], string[], string[]>;
|
|
12
10
|
notEquals: import('../..').FieldConditionModifierConfig<string[], string[], string[], string[], string[], string[]>;
|
|
@@ -1,22 +1,10 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { NumberField, NumberRange } from '../../fields';
|
|
3
|
-
import { BaseCondition, ConditionOptions, ConditionRenderProps } from '../BaseCondition';
|
|
4
2
|
import { NumberConditionModifiers, SerializedNumberCondition } from './typings';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
lessThan: import('../..').FieldConditionModifierConfig<number | null, number | NumberRange, number | NumberRange, number, number, number>;
|
|
9
|
-
lessThanOrEquals: import('../..').FieldConditionModifierConfig<number | null, number | NumberRange, number | NumberRange, number, number, number>;
|
|
10
|
-
greaterThan: import('../..').FieldConditionModifierConfig<number | null, number | NumberRange, number | NumberRange, number, number, number>;
|
|
11
|
-
greaterThanOrEquals: import('../..').FieldConditionModifierConfig<number | null, number | NumberRange, number | NumberRange, number, number, number>;
|
|
12
|
-
inRange: import('../..').FieldConditionModifierConfig<number | null, number | NumberRange, number | NumberRange, number, NumberRange, NumberRange>;
|
|
13
|
-
notInRange: import('../..').FieldConditionModifierConfig<number | null, number | NumberRange, number | NumberRange, number, NumberRange, NumberRange>;
|
|
14
|
-
};
|
|
15
|
-
export interface NumberFieldConditionOptions extends ConditionOptions<NumberField, number | NumberRange, NumberConditionModifiers> {
|
|
3
|
+
import { NumberField, NumberRange, ValueOfField } from '../../fields';
|
|
4
|
+
import { BaseCondition, BaseConditionOptions, ConditionRenderProps } from '../BaseCondition';
|
|
5
|
+
export interface NumberFieldConditionOptions extends BaseConditionOptions<NumberField, number | NumberRange, NumberConditionModifiers> {
|
|
16
6
|
}
|
|
17
|
-
export declare class NumberFieldCondition extends BaseCondition<NumberField, number | NumberRange, number | NumberRange, NumberConditionModifiers, NumberFieldCondition> {
|
|
18
|
-
readonly defaultConditionValue: number | undefined;
|
|
19
|
-
readonly defaultConditionModifier: keyof typeof modifiers;
|
|
7
|
+
export declare class NumberFieldCondition extends BaseCondition<NumberField, ValueOfField<NumberField>, number | NumberRange, number | NumberRange, NumberConditionModifiers, NumberFieldCondition> {
|
|
20
8
|
readonly modifiers: {
|
|
21
9
|
equals: import('../..').FieldConditionModifierConfig<number | null, number | NumberRange, number | NumberRange, number, number, number>;
|
|
22
10
|
notEquals: import('../..').FieldConditionModifierConfig<number | null, number | NumberRange, number | NumberRange, number, number, number>;
|
|
@@ -31,4 +19,3 @@ export declare class NumberFieldCondition extends BaseCondition<NumberField, num
|
|
|
31
19
|
static deserialize(serializedCondition: SerializedNumberCondition, field: NumberField): NumberFieldCondition;
|
|
32
20
|
render(props: ConditionRenderProps<NumberFieldCondition>): ReactNode;
|
|
33
21
|
}
|
|
34
|
-
export {};
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { OTPField } from '../../fields';
|
|
3
|
-
import { BaseCondition, ConditionOptions, ConditionRenderProps } from '../BaseCondition';
|
|
4
2
|
import { OTPConditionModifiers, SerializedOTPCondition } from './typings';
|
|
5
|
-
|
|
3
|
+
import { OTPField, ValueOfField } from '../../fields';
|
|
4
|
+
import { BaseCondition, BaseConditionOptions, ConditionRenderProps } from '../BaseCondition';
|
|
5
|
+
export interface OTPFieldConditionOptions extends BaseConditionOptions<OTPField, string, OTPConditionModifiers> {
|
|
6
6
|
}
|
|
7
|
-
export declare class OTPFieldCondition extends BaseCondition<OTPField, string, string, OTPConditionModifiers, OTPFieldCondition> {
|
|
8
|
-
readonly defaultConditionValue: undefined;
|
|
9
|
-
readonly defaultConditionModifier = "equals";
|
|
7
|
+
export declare class OTPFieldCondition extends BaseCondition<OTPField, ValueOfField<OTPField>, string, string, OTPConditionModifiers, OTPFieldCondition> {
|
|
10
8
|
readonly modifiers: {
|
|
11
9
|
equals: import('../..').FieldConditionModifierConfig<string, string, string, string, string, string>;
|
|
12
10
|
notEquals: import('../..').FieldConditionModifierConfig<string, string, string, string, string, string>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { PassFailFieldConditionModifiers, SerializedPassFailFieldCondition } from './typings';
|
|
3
|
+
import { PassFailField, PassFailFieldStatus, ValueOfField } from '../../fields';
|
|
4
|
+
import { BaseCondition, BaseConditionOptions, ConditionRenderProps } from '../BaseCondition';
|
|
5
|
+
export interface PassFailFieldConditionOptions extends BaseConditionOptions<PassFailField, PassFailFieldStatus | PassFailFieldStatus[], PassFailFieldConditionModifiers> {
|
|
6
|
+
}
|
|
7
|
+
export declare class PassFailFieldCondition extends BaseCondition<PassFailField, ValueOfField<PassFailField>["status"], PassFailFieldStatus | PassFailFieldStatus[], PassFailFieldStatus | PassFailFieldStatus[], PassFailFieldConditionModifiers, PassFailFieldCondition> {
|
|
8
|
+
readonly modifiers: {
|
|
9
|
+
readonly equals: import('../..').FieldConditionModifierConfig<PassFailFieldStatus | null, PassFailFieldStatus | PassFailFieldStatus[], PassFailFieldStatus | PassFailFieldStatus[], PassFailFieldStatus, PassFailFieldStatus, PassFailFieldStatus>;
|
|
10
|
+
readonly notEquals: import('../..').FieldConditionModifierConfig<PassFailFieldStatus | null, PassFailFieldStatus | PassFailFieldStatus[], PassFailFieldStatus | PassFailFieldStatus[], PassFailFieldStatus, PassFailFieldStatus, PassFailFieldStatus>;
|
|
11
|
+
readonly includes: import('../..').FieldConditionModifierConfig<PassFailFieldStatus | null, PassFailFieldStatus | PassFailFieldStatus[], PassFailFieldStatus | PassFailFieldStatus[], PassFailFieldStatus, PassFailFieldStatus[], PassFailFieldStatus[]>;
|
|
12
|
+
readonly excludes: import('../..').FieldConditionModifierConfig<PassFailFieldStatus | null, PassFailFieldStatus | PassFailFieldStatus[], PassFailFieldStatus | PassFailFieldStatus[], PassFailFieldStatus, PassFailFieldStatus[], PassFailFieldStatus[]>;
|
|
13
|
+
};
|
|
14
|
+
constructor(options: PassFailFieldConditionOptions);
|
|
15
|
+
static deserialize(serializedCondition: SerializedPassFailFieldCondition, field: PassFailField): PassFailFieldCondition;
|
|
16
|
+
transformValue(value: ValueOfField<PassFailField>): ValueOfField<PassFailField>["status"];
|
|
17
|
+
render(props: ConditionRenderProps<PassFailFieldCondition>): ReactNode;
|
|
18
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { BaseConditionCellProps } from '../BaseCondition';
|
|
2
|
+
import { PassFailFieldCondition } from './PassFailFieldCondition';
|
|
3
|
+
interface PassFailFieldConditionCellProps extends BaseConditionCellProps<PassFailFieldCondition> {
|
|
4
|
+
}
|
|
5
|
+
export declare const PassFailFieldConditionCell: (props: PassFailFieldConditionCellProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { PassFailField, PassFailFieldStatus, TypeOfField } from '../../fields';
|
|
2
|
+
import { BaseSerializedCondition } from '../BaseCondition';
|
|
3
|
+
export type PassFailFieldConditionModifiers = "equals" | "notEquals" | "includes" | "excludes";
|
|
4
|
+
export type SerializedPassFailFieldCondition = BaseSerializedCondition<TypeOfField<PassFailField>, PassFailFieldStatus | PassFailFieldStatus[], PassFailFieldConditionModifiers>;
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { RadioField } from '../../fields';
|
|
3
|
-
import { BaseCondition, ConditionOptions, ConditionRenderProps } from '../BaseCondition';
|
|
4
2
|
import { RadioConditionModifiers, SerializedRadioCondition } from './typings';
|
|
5
|
-
|
|
3
|
+
import { RadioField, ValueOfField } from '../../fields';
|
|
4
|
+
import { BaseCondition, BaseConditionOptions, ConditionRenderProps } from '../BaseCondition';
|
|
5
|
+
export interface RadioFieldConditionOptions extends BaseConditionOptions<RadioField, string | string[], RadioConditionModifiers> {
|
|
6
6
|
}
|
|
7
|
-
export declare class RadioFieldCondition extends BaseCondition<RadioField, string | string[], string | string[], RadioConditionModifiers, RadioFieldCondition> {
|
|
8
|
-
readonly defaultConditionValue: undefined;
|
|
9
|
-
readonly defaultConditionModifier = "equals";
|
|
7
|
+
export declare class RadioFieldCondition extends BaseCondition<RadioField, ValueOfField<RadioField>, string | string[], string | string[], RadioConditionModifiers, RadioFieldCondition> {
|
|
10
8
|
readonly modifiers: {
|
|
11
9
|
equals: import('../..').FieldConditionModifierConfig<string | null, string | string[], string | string[], string, string, string>;
|
|
12
10
|
notEquals: import('../..').FieldConditionModifierConfig<string | null, string | string[], string | string[], string, string, string>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { RatingConditionModifiers, SerializedRatingCondition } from './typings';
|
|
3
|
+
import { NumberRange, RatingField, ValueOfField } from '../../fields';
|
|
4
|
+
import { BaseCondition, BaseConditionOptions, ConditionRenderProps } from '../BaseCondition';
|
|
5
|
+
export interface RatingFieldConditionOptions extends BaseConditionOptions<RatingField, number | NumberRange, RatingConditionModifiers> {
|
|
6
|
+
}
|
|
7
|
+
export declare class RatingFieldCondition extends BaseCondition<RatingField, ValueOfField<RatingField>, number | NumberRange, number | NumberRange, RatingConditionModifiers, RatingFieldCondition> {
|
|
8
|
+
readonly modifiers: {
|
|
9
|
+
equals: import('../..').FieldConditionModifierConfig<number | null, number | NumberRange, number | NumberRange, number, number, number>;
|
|
10
|
+
notEquals: import('../..').FieldConditionModifierConfig<number | null, number | NumberRange, number | NumberRange, number, number, number>;
|
|
11
|
+
lessThan: import('../..').FieldConditionModifierConfig<number | null, number | NumberRange, number | NumberRange, number, number, number>;
|
|
12
|
+
lessThanOrEquals: import('../..').FieldConditionModifierConfig<number | null, number | NumberRange, number | NumberRange, number, number, number>;
|
|
13
|
+
greaterThan: import('../..').FieldConditionModifierConfig<number | null, number | NumberRange, number | NumberRange, number, number, number>;
|
|
14
|
+
greaterThanOrEquals: import('../..').FieldConditionModifierConfig<number | null, number | NumberRange, number | NumberRange, number, number, number>;
|
|
15
|
+
inRange: import('../..').FieldConditionModifierConfig<number | null, number | NumberRange, number | NumberRange, number, NumberRange, NumberRange>;
|
|
16
|
+
notInRange: import('../..').FieldConditionModifierConfig<number | null, number | NumberRange, number | NumberRange, number, NumberRange, NumberRange>;
|
|
17
|
+
};
|
|
18
|
+
constructor(options: RatingFieldConditionOptions);
|
|
19
|
+
static deserialize(serializedCondition: SerializedRatingCondition, field: RatingField): RatingFieldCondition;
|
|
20
|
+
render(props: ConditionRenderProps<RatingFieldCondition>): ReactNode;
|
|
21
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { BaseConditionCellProps } from '../BaseCondition';
|
|
2
|
+
import { RatingFieldCondition } from './RatingFieldCondition';
|
|
3
|
+
interface RatingFieldConditionCellProps extends BaseConditionCellProps<RatingFieldCondition> {
|
|
4
|
+
}
|
|
5
|
+
export declare const RatingFieldConditionCell: (props: RatingFieldConditionCellProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { NumberRange, RatingField, TypeOfField } from '../../fields';
|
|
2
|
+
import { BaseSerializedCondition } from '../BaseCondition';
|
|
3
|
+
export type RatingConditionModifiers = "equals" | "notEquals" | "lessThan" | "lessThanOrEquals" | "greaterThan" | "greaterThanOrEquals" | "inRange" | "notInRange";
|
|
4
|
+
export type SerializedRatingCondition = BaseSerializedCondition<TypeOfField<RatingField>, number | NumberRange, RatingConditionModifiers>;
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { ScanField } from '../../fields';
|
|
3
|
-
import { BaseCondition, ConditionOptions, ConditionRenderProps } from '../BaseCondition';
|
|
4
2
|
import { ScanConditionModifiers, SerializedScanCondition } from './typings';
|
|
5
|
-
|
|
3
|
+
import { ScanField, ValueOfField } from '../../fields';
|
|
4
|
+
import { BaseCondition, BaseConditionOptions, ConditionRenderProps } from '../BaseCondition';
|
|
5
|
+
export interface ScanFieldConditionOptions extends BaseConditionOptions<ScanField, string, ScanConditionModifiers> {
|
|
6
6
|
}
|
|
7
|
-
export declare class ScanFieldCondition extends BaseCondition<ScanField, string, string, ScanConditionModifiers, ScanFieldCondition> {
|
|
8
|
-
readonly defaultConditionValue: undefined;
|
|
9
|
-
readonly defaultConditionModifier = "equals";
|
|
7
|
+
export declare class ScanFieldCondition extends BaseCondition<ScanField, ValueOfField<ScanField>, string, string, ScanConditionModifiers, ScanFieldCondition> {
|
|
10
8
|
readonly modifiers: {
|
|
11
9
|
equals: import('../..').FieldConditionModifierConfig<string, string, string, string, string, string>;
|
|
12
10
|
notEquals: import('../..').FieldConditionModifierConfig<string, string, string, string, string, string>;
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { SelectField } from '../../fields';
|
|
3
|
-
import { BaseCondition,
|
|
2
|
+
import { SelectField, ValueOfField } from '../../fields';
|
|
3
|
+
import { BaseCondition, BaseConditionOptions, ConditionRenderProps } from '../BaseCondition';
|
|
4
4
|
import { SelectConditionModifiers, SerializedSelectCondition } from './typings';
|
|
5
|
-
export interface SelectFieldConditionOptions extends
|
|
5
|
+
export interface SelectFieldConditionOptions extends BaseConditionOptions<SelectField, string | string[], SelectConditionModifiers> {
|
|
6
6
|
}
|
|
7
|
-
export declare class SelectFieldCondition extends BaseCondition<SelectField, string | string[], string | string[], SelectConditionModifiers, SelectFieldCondition> {
|
|
8
|
-
readonly defaultConditionValue: undefined;
|
|
9
|
-
readonly defaultConditionModifier = "equals";
|
|
7
|
+
export declare class SelectFieldCondition extends BaseCondition<SelectField, ValueOfField<SelectField>, string | string[], string | string[], SelectConditionModifiers, SelectFieldCondition> {
|
|
10
8
|
readonly modifiers: {
|
|
11
9
|
equals: import('../..').FieldConditionModifierConfig<string | null, string | string[], string | string[], string, string, string>;
|
|
12
10
|
notEquals: import('../..').FieldConditionModifierConfig<string | null, string | string[], string | string[], string, string, string>;
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { StringField } from '../../fields';
|
|
3
|
-
import { BaseCondition, ConditionOptions, ConditionRenderProps } from '../BaseCondition';
|
|
4
2
|
import { SerializedStringCondition, StringConditionModifiers } from './typings';
|
|
5
|
-
|
|
3
|
+
import { StringField, ValueOfField } from '../../fields';
|
|
4
|
+
import { BaseCondition, BaseConditionOptions, ConditionRenderProps } from '../BaseCondition';
|
|
5
|
+
export interface StringFieldConditionOptions extends BaseConditionOptions<StringField, string, StringConditionModifiers> {
|
|
6
6
|
}
|
|
7
|
-
export declare class StringFieldCondition extends BaseCondition<StringField, string, string, StringConditionModifiers, StringFieldCondition> {
|
|
8
|
-
readonly defaultConditionValue: undefined;
|
|
9
|
-
readonly defaultConditionModifier = "equals";
|
|
7
|
+
export declare class StringFieldCondition extends BaseCondition<StringField, ValueOfField<StringField>, string, string, StringConditionModifiers, StringFieldCondition> {
|
|
10
8
|
readonly modifiers: {
|
|
11
9
|
equals: import('../..').FieldConditionModifierConfig<string, string, string, string, string, string>;
|
|
12
10
|
notEquals: import('../..').FieldConditionModifierConfig<string, string, string, string, string, string>;
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { TextField } from '../../fields';
|
|
3
|
-
import { BaseCondition, ConditionOptions, ConditionRenderProps } from '../BaseCondition';
|
|
4
2
|
import { SerializedTextCondition, TextConditionModifiers } from './typings';
|
|
5
|
-
|
|
3
|
+
import { TextField, ValueOfField } from '../../fields';
|
|
4
|
+
import { BaseCondition, BaseConditionOptions, ConditionRenderProps } from '../BaseCondition';
|
|
5
|
+
export interface TextFieldConditionOptions extends BaseConditionOptions<TextField, string, TextConditionModifiers> {
|
|
6
6
|
field: TextField;
|
|
7
7
|
}
|
|
8
|
-
export declare class TextFieldCondition extends BaseCondition<TextField, string, string, TextConditionModifiers, TextFieldCondition> {
|
|
9
|
-
readonly defaultConditionValue: undefined;
|
|
10
|
-
readonly defaultConditionModifier = "equals";
|
|
8
|
+
export declare class TextFieldCondition extends BaseCondition<TextField, ValueOfField<TextField>, string, string, TextConditionModifiers, TextFieldCondition> {
|
|
11
9
|
readonly modifiers: {
|
|
12
10
|
equals: import('../..').FieldConditionModifierConfig<string, string, string, string, string, string>;
|
|
13
11
|
notEquals: import('../..').FieldConditionModifierConfig<string, string, string, string, string, string>;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import { BaseCondition, ConditionOptions, ConditionRenderProps } from '../BaseCondition';
|
|
2
|
+
import { UUIDPromise } from '../../UUIDPromise';
|
|
4
3
|
import { SerializedUploadCondition, UploadConditionModifiers } from './typings';
|
|
5
|
-
|
|
4
|
+
import { UploadField, ValueOfField } from '../../fields';
|
|
5
|
+
import { UUIDFile } from '../../UUIDFile';
|
|
6
|
+
import { BaseCondition, BaseConditionOptions, ConditionRenderProps } from '../BaseCondition';
|
|
7
|
+
export interface UploadFieldConditionOptions extends BaseConditionOptions<UploadField, boolean, UploadConditionModifiers> {
|
|
6
8
|
}
|
|
7
|
-
export declare class UploadFieldCondition extends BaseCondition<UploadField, boolean, boolean, UploadConditionModifiers, UploadFieldCondition> {
|
|
8
|
-
readonly defaultConditionValue: undefined;
|
|
9
|
-
readonly defaultConditionModifier = "equals";
|
|
9
|
+
export declare class UploadFieldCondition extends BaseCondition<UploadField, ValueOfField<UploadField>, boolean, boolean, UploadConditionModifiers, UploadFieldCondition> {
|
|
10
10
|
readonly modifiers: {
|
|
11
|
-
equals: import('../..').FieldConditionModifierConfig<(
|
|
12
|
-
notEquals: import('../..').FieldConditionModifierConfig<(
|
|
11
|
+
equals: import('../..').FieldConditionModifierConfig<(UUIDFile | UUIDPromise<UUIDFile>)[], boolean, boolean, UUIDFile[], boolean, boolean>;
|
|
12
|
+
notEquals: import('../..').FieldConditionModifierConfig<(UUIDFile | UUIDPromise<UUIDFile>)[], boolean, boolean, UUIDFile[], boolean, boolean>;
|
|
13
13
|
};
|
|
14
14
|
constructor(options: UploadFieldConditionOptions);
|
|
15
15
|
static deserialize(serializedCondition: SerializedUploadCondition, field: UploadField): UploadFieldCondition;
|