@overmap-ai/forms 1.0.39-add-urlfield-with-url-input.0 → 1.0.39-field-groups.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.
Files changed (71) hide show
  1. package/dist/form/adapters.d.ts +3 -0
  2. package/dist/form/builder/Root.d.ts +0 -1
  3. package/dist/form/builder/components/FieldSettingsPopover.d.ts +0 -1
  4. package/dist/form/builder/context.d.ts +4 -0
  5. package/dist/form/conditions/OTPFieldCondition/index.d.ts +1 -1
  6. package/dist/form/conditions/PassFailFieldCondition/index.d.ts +1 -1
  7. package/dist/form/conditions/URLFieldCondition/index.d.ts +1 -1
  8. package/dist/form/cva.d.ts +6 -0
  9. package/dist/form/fields/BaseField/BaseField.d.ts +2 -10
  10. package/dist/form/fields/BaseField/index.d.ts +1 -1
  11. package/dist/form/fields/BaseField/typings.d.ts +2 -2
  12. package/dist/form/fields/BaseFormElement/BaseFormElement.d.ts +2 -2
  13. package/dist/form/fields/BaseFormElement/index.d.ts +1 -1
  14. package/dist/form/fields/BaseFormElement/typings.d.ts +0 -7
  15. package/dist/form/fields/BaseOptionsField/BaseOptionsField.d.ts +0 -1
  16. package/dist/form/fields/BaseOptionsField/index.d.ts +1 -1
  17. package/dist/form/fields/BaseStringField/index.d.ts +1 -1
  18. package/dist/form/fields/BooleanField/BooleanField.d.ts +1 -5
  19. package/dist/form/fields/BooleanField/index.d.ts +1 -1
  20. package/dist/form/fields/CheckboxListField/CheckboxListField.d.ts +1 -5
  21. package/dist/form/fields/CheckboxListField/index.d.ts +1 -1
  22. package/dist/form/fields/DateField/DateField.d.ts +1 -5
  23. package/dist/form/fields/DateField/index.d.ts +1 -1
  24. package/dist/form/fields/FieldSection/FieldSection.d.ts +2 -4
  25. package/dist/form/fields/FieldSection/index.d.ts +1 -1
  26. package/dist/form/fields/MultiSelectField/MultiSelectField.d.ts +1 -4
  27. package/dist/form/fields/MultiSelectField/index.d.ts +1 -1
  28. package/dist/form/fields/MultiStringField/MultiStringField.d.ts +1 -5
  29. package/dist/form/fields/MultiStringField/index.d.ts +1 -1
  30. package/dist/form/fields/NumberField/NumberField.d.ts +1 -4
  31. package/dist/form/fields/NumberField/index.d.ts +1 -1
  32. package/dist/form/fields/OTPField/OTPField.d.ts +1 -4
  33. package/dist/form/fields/PassFailField/PassFailField.d.ts +1 -5
  34. package/dist/form/fields/PassFailField/index.d.ts +1 -1
  35. package/dist/form/fields/RadioField/RadioField.d.ts +1 -5
  36. package/dist/form/fields/RadioField/index.d.ts +1 -1
  37. package/dist/form/fields/RatingField/RatingField.d.ts +1 -4
  38. package/dist/form/fields/RatingField/cva.d.ts +3 -0
  39. package/dist/form/fields/RatingField/index.d.ts +1 -1
  40. package/dist/form/fields/ScanField/ScanField.d.ts +1 -5
  41. package/dist/form/fields/ScanField/index.d.ts +1 -1
  42. package/dist/form/fields/SelectField/SelectField.d.ts +1 -4
  43. package/dist/form/fields/SelectField/index.d.ts +1 -1
  44. package/dist/form/fields/StringField/StringField.d.ts +1 -4
  45. package/dist/form/fields/StringField/index.d.ts +1 -1
  46. package/dist/form/fields/TextField/TextField.d.ts +1 -4
  47. package/dist/form/fields/TextField/index.d.ts +1 -1
  48. package/dist/form/fields/URLField/URLField.d.ts +1 -4
  49. package/dist/form/fields/URLField/index.d.ts +0 -1
  50. package/dist/form/fields/UploadField/UploadField.d.ts +1 -5
  51. package/dist/form/fields/UploadField/index.d.ts +1 -1
  52. package/dist/form/fields/components/InputWithLabel.d.ts +2 -3
  53. package/dist/form/fields/constants.d.ts +13 -36
  54. package/dist/form/fields/enums.d.ts +9 -0
  55. package/dist/form/fields/hooks.d.ts +15 -29
  56. package/dist/form/fields/index.d.ts +1 -0
  57. package/dist/form/fields/typings.d.ts +1 -0
  58. package/dist/form/index.d.ts +1 -1
  59. package/dist/form/renderer/FieldsRenderer.d.ts +3 -7
  60. package/dist/form/renderer/context.d.ts +1 -1
  61. package/dist/form/schema/FieldSchema.d.ts +1 -1
  62. package/dist/form/typings.d.ts +4 -2
  63. package/dist/form/utils.d.ts +2 -3
  64. package/dist/forms.js +4892 -4859
  65. package/dist/forms.umd.cjs +61 -61
  66. package/package.json +2 -2
  67. package/dist/form/builder/constants.d.ts +0 -1
  68. package/dist/form/builder/hooks.d.ts +0 -7
  69. package/dist/form/constants.d.ts +0 -1
  70. package/dist/form/fields/URLField/constants.d.ts +0 -1
  71. package/dist/form/schema/context.d.ts +0 -2
@@ -0,0 +1,3 @@
1
+ import { FieldErrors as ReactHookFormFieldErrors } from 'react-hook-form';
2
+ import { FieldErrors } from './typings';
3
+ export declare function reactHookFormErrorAdapter(errors: FieldErrors): ReactHookFormFieldErrors;
@@ -5,7 +5,6 @@ export interface FormBuilderRootProps extends PropsWithChildren {
5
5
  initialFields?: SerializedFieldSection[];
6
6
  onSave: FormBuilderSaveHandler;
7
7
  onCancel?: () => void;
8
- enableReinitialize?: boolean;
9
8
  disableRequiredFields?: boolean;
10
9
  }
11
10
  export declare const FormBuilderRoot: import('react').NamedExoticComponent<FormBuilderRootProps>;
@@ -2,7 +2,6 @@ import { Popover } from '@overmap-ai/blocks';
2
2
  import { ComponentProps, ReactNode } from 'react';
3
3
  interface FieldSettingsPopoverProps extends Omit<ComponentProps<typeof Popover.Content>, "children"> {
4
4
  popoverInputs: ReactNode;
5
- hasError: boolean;
6
5
  }
7
6
  export declare const FieldSettingsPopover: import('react').MemoExoticComponent<(props: FieldSettingsPopoverProps) => import("react/jsx-runtime").JSX.Element>;
8
7
  export {};
@@ -1,5 +1,9 @@
1
+ import { FormBuilderSaveHandler } from './typings';
2
+ import { FieldSchema } from '../schema';
1
3
  interface IFormBuilderContext {
4
+ fieldSchema: FieldSchema;
2
5
  disableRequiredFields: boolean;
6
+ onSave: FormBuilderSaveHandler;
3
7
  onCancel?: () => void;
4
8
  }
5
9
  export declare const FormBuilderContext: import('react').Context<IFormBuilderContext>;
@@ -1,3 +1,3 @@
1
1
  export * from './OTPFieldCondition';
2
2
  export * from './OTPFieldConditionCell';
3
- export * from './typings';
3
+ export type * from './typings';
@@ -1,3 +1,3 @@
1
1
  export * from './PassFailFieldCondition';
2
2
  export * from './PassFailFieldConditionCell';
3
- export * from './typings';
3
+ export type * from './typings';
@@ -1,3 +1,3 @@
1
1
  export * from './URLFieldCondition';
2
2
  export * from './URLFieldConditionCell';
3
- export * from './typings';
3
+ export type * from './typings';
@@ -0,0 +1,6 @@
1
+ export declare const sectionSpacingCva: (props?: ({
2
+ size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
3
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
4
+ export declare const fieldSpacingCva: (props?: ({
5
+ size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
6
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
@@ -1,21 +1,13 @@
1
+ import { FieldError } from '../typings';
1
2
  import { BaseSerializedField, FieldOptions, FieldValidator } from './typings';
2
3
  import { BaseFormElement } from '../BaseFormElement';
3
4
  export declare abstract class BaseField<TType extends string, TValue, TSerializedValue, This extends BaseField<TType, TValue, TSerializedValue, This>> extends BaseFormElement<TType, This> {
4
- static readonly fieldTypeName: string;
5
- static readonly fieldTypeDescription: string;
6
5
  label: string;
7
6
  description: string | null;
8
7
  required: boolean;
9
8
  image: File | Promise<File> | undefined;
10
- /**
11
- * By default, validation doesn't execute on `onChange` events when editing fields
12
- * until the field has been `touched`. This can be overridden by setting this to `false`
13
- * if you want to validate on every `onChange` event. This is important for fields like booleans
14
- * which don't have a `onBlur` event (which is used to set the `touched` state).
15
- */
16
- readonly onlyValidateAfterTouched: boolean;
17
9
  protected constructor(options: FieldOptions);
18
- getError(value: TValue): string | undefined;
10
+ getError(value: TValue): FieldError | undefined;
19
11
  serialize(): BaseSerializedField<TType>;
20
12
  getOptions(): FieldOptions;
21
13
  setOptions(options: Partial<FieldOptions>): void;
@@ -1,2 +1,2 @@
1
1
  export * from './BaseField';
2
- export * from './typings';
2
+ export type * from './typings';
@@ -1,5 +1,5 @@
1
1
  import { BaseFormElementOptions, BaseSerializedFormElement } from '../BaseFormElement';
2
- import { AnyField } from '../typings';
2
+ import { AnyField, FieldError } from '../typings';
3
3
  export interface BaseSerializedField<TType extends string> extends BaseSerializedFormElement<TType> {
4
4
  label: string;
5
5
  description?: string | null;
@@ -16,4 +16,4 @@ export interface FieldCreationSchemaObject {
16
16
  field: AnyField;
17
17
  showDirectly: boolean;
18
18
  }
19
- export type FieldValidator<TValue> = (value: TValue) => string | null | undefined;
19
+ export type FieldValidator<TValue> = (value: TValue) => FieldError | undefined;
@@ -1,5 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
- import { BaseFormElementOptions, BaseSerializedFormElement, FieldRenderProps } from './typings';
2
+ import { BaseFormElementOptions, BaseSerializedFormElement } from './typings';
3
3
  import { Observable } from '../../Observable';
4
4
  export declare abstract class BaseFormElement<TType extends string, This extends BaseFormElement<TType, This>> extends Observable<This> {
5
5
  abstract readonly type: TType;
@@ -9,5 +9,5 @@ export declare abstract class BaseFormElement<TType extends string, This extends
9
9
  setOptions(options: Partial<BaseFormElementOptions>): void;
10
10
  abstract duplicate(identifier: string): BaseFormElement<TType, This>;
11
11
  serialize(): BaseSerializedFormElement<TType>;
12
- abstract render(props: FieldRenderProps): ReactNode;
12
+ abstract render(): ReactNode;
13
13
  }
@@ -1,2 +1,2 @@
1
1
  export * from './BaseFormElement';
2
- export * from './typings';
2
+ export type * from './typings';
@@ -1,4 +1,3 @@
1
- import { FieldsRendererSize } from '../../renderer';
2
1
  export interface BaseFormElementOptions {
3
2
  identifier: string;
4
3
  }
@@ -7,10 +6,4 @@ export interface BaseSerializedFormElement<TType extends string> {
7
6
  type: TType;
8
7
  }
9
8
  export interface FieldRenderProps {
10
- formId: string;
11
- size: FieldsRendererSize;
12
- index: number;
13
- disabled?: boolean;
14
- onValuesChange?: (identifier: string, value: any) => void;
15
- showInputOnly?: boolean;
16
9
  }
@@ -5,7 +5,6 @@ export interface BaseOptionsFieldOptions extends FieldOptions {
5
5
  }
6
6
  export declare abstract class BaseOptionsField<TType extends string, TValue, TSerializedValue, This extends BaseOptionsField<TType, TValue, TSerializedValue, This>> extends BaseField<TType, TValue, TSerializedValue, This> {
7
7
  options: SelectFieldOption[];
8
- readonly onlyValidateAfterTouched = false;
9
8
  protected constructor(options: BaseOptionsFieldOptions);
10
9
  serialize(): BaseSerializedOptionsField<TType>;
11
10
  getOptions(): BaseOptionsFieldOptions;
@@ -1,2 +1,2 @@
1
1
  export * from './BaseOptionsField';
2
- export * from './typings';
2
+ export type * from './typings';
@@ -1,2 +1,2 @@
1
1
  export * from './BaseStringField';
2
- export * from './typings';
2
+ export type * from './typings';
@@ -1,13 +1,9 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { SerializedBooleanField } from './typings';
3
3
  import { BaseField, FieldOptions } from '../BaseField';
4
- import { FieldRenderProps } from '../BaseFormElement';
5
4
  export type BooleanFieldOptions = FieldOptions;
6
5
  export declare class BooleanField extends BaseField<"boolean", boolean, boolean, BooleanField> {
7
6
  readonly type = "boolean";
8
- static readonly fieldTypeName = "Checkbox";
9
- static readonly fieldTypeDescription = "Perfect for both optional and required yes/no questions.";
10
- readonly onlyValidateAfterTouched: boolean;
11
7
  constructor(options: BooleanFieldOptions);
12
8
  serialize(): SerializedBooleanField;
13
9
  getOptions(): BooleanFieldOptions;
@@ -16,7 +12,7 @@ export declare class BooleanField extends BaseField<"boolean", boolean, boolean,
16
12
  static deserialize(data: SerializedBooleanField): BooleanField;
17
13
  serializeValue(value: boolean): boolean;
18
14
  deserializeValue(value: boolean): boolean;
19
- render(props: FieldRenderProps): ReactNode;
15
+ render(): ReactNode;
20
16
  isSerializedValue(value: unknown): value is boolean;
21
17
  isValue(value: unknown): value is boolean;
22
18
  blankValue(): boolean;
@@ -1,3 +1,3 @@
1
1
  export * from './BooleanField';
2
2
  export * from './BooleanFieldInput';
3
- export * from './typings';
3
+ export type * from './typings';
@@ -1,14 +1,10 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { SerializedCheckboxListField } from './typings';
3
- import { FieldRenderProps } from '../BaseFormElement';
4
3
  import { BaseOptionsField, BaseOptionsFieldOptions } from '../BaseOptionsField';
5
4
  export interface CheckboxListFieldOptions extends BaseOptionsFieldOptions {
6
5
  }
7
6
  export declare class CheckboxListField extends BaseOptionsField<"checkbox-list", string[], string[], CheckboxListField> {
8
7
  readonly type = "checkbox-list";
9
- readonly onlyValidateAfterTouched = false;
10
- static readonly fieldTypeName = "Checkbox list";
11
- static readonly fieldTypeDescription = "Allows the user to select a multiple options from a list.";
12
8
  constructor(options: CheckboxListFieldOptions);
13
9
  serialize(): SerializedCheckboxListField;
14
10
  getOptions(): CheckboxListFieldOptions;
@@ -16,7 +12,7 @@ export declare class CheckboxListField extends BaseOptionsField<"checkbox-list",
16
12
  static deserialize(data: SerializedCheckboxListField): CheckboxListField;
17
13
  serializeValue(value: string[]): string[];
18
14
  deserializeValue(value: string[]): string[];
19
- render(props: FieldRenderProps): ReactNode;
15
+ render(): ReactNode;
20
16
  isSerializedValue(value: unknown): value is string[];
21
17
  isValue(value: unknown): value is string[];
22
18
  blankValue(): string[];
@@ -1,3 +1,3 @@
1
1
  export * from './CheckboxListField';
2
2
  export * from './CheckboxListFieldInput';
3
- export * from './typings';
3
+ export type * from './typings';
@@ -1,7 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { SerializedDateField } from './typings';
3
3
  import { BaseField, FieldOptions } from '../BaseField';
4
- import { FieldRenderProps } from '../BaseFormElement';
5
4
  export type SerializedDateRange = {
6
5
  to: string | null;
7
6
  from: string | null;
@@ -10,9 +9,6 @@ export interface DateFieldOptions extends FieldOptions {
10
9
  }
11
10
  export declare class DateField extends BaseField<"date", Date | null, string | null, DateField> {
12
11
  readonly type = "date";
13
- static readonly fieldTypeName = "Date";
14
- static readonly fieldTypeDescription = "Allows specifying a date.";
15
- readonly onlyValidateAfterTouched: boolean;
16
12
  constructor(options: DateFieldOptions);
17
13
  serialize(): SerializedDateField;
18
14
  getOptions(): DateFieldOptions;
@@ -21,7 +17,7 @@ export declare class DateField extends BaseField<"date", Date | null, string | n
21
17
  setOptions(options: Partial<DateFieldOptions>): void;
22
18
  serializeValue(value: Date | null): string | null;
23
19
  deserializeValue(value: string | null): Date | null;
24
- render(props: FieldRenderProps): ReactNode;
20
+ render(): ReactNode;
25
21
  isSerializedValue(value: unknown): value is string | null;
26
22
  isValue(value: unknown): value is Date | null;
27
23
  blankValue(): Date | null;
@@ -1,3 +1,3 @@
1
1
  export * from './DateField';
2
2
  export * from './DateFieldInput';
3
- export * from './typings';
3
+ export type * from './typings';
@@ -2,7 +2,7 @@ import { ReactNode } from 'react';
2
2
  import { FieldValues } from '../../typings';
3
3
  import { Field, FieldsManager } from '../typings';
4
4
  import { Condition, FieldConditionManager } from '../../conditions';
5
- import { BaseFormElement, BaseFormElementOptions, FieldRenderProps } from '../BaseFormElement';
5
+ import { BaseFormElement, BaseFormElementOptions } from '../BaseFormElement';
6
6
  import { FieldSectionConditions, SerializedFieldSection } from './typings';
7
7
  export interface FieldSectionOptions extends BaseFormElementOptions {
8
8
  label?: string | null;
@@ -11,8 +11,6 @@ export interface FieldSectionOptions extends BaseFormElementOptions {
11
11
  fields: Field[];
12
12
  }
13
13
  export declare class FieldSection extends BaseFormElement<"section", FieldSection> implements FieldConditionManager<Condition>, FieldsManager {
14
- static readonly fieldTypeName = "Section";
15
- static readonly fieldTypeDescription = "Sections can be useful for grouping fields together. They can also be conditionally shown or hidden.";
16
14
  readonly type = "section";
17
15
  label: string | null;
18
16
  description: string | null;
@@ -41,5 +39,5 @@ export declare class FieldSection extends BaseFormElement<"section", FieldSectio
41
39
  getConditionals(): Set<string>;
42
40
  addConditional(identifier: string): void;
43
41
  removeConditional(identifier: string): void;
44
- render(props: FieldRenderProps): ReactNode;
42
+ render(): ReactNode;
45
43
  }
@@ -1,3 +1,3 @@
1
1
  export * from './FieldSection';
2
2
  export * from './FieldSectionLayout';
3
- export * from './typings';
3
+ export type * from './typings';
@@ -1,14 +1,11 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { SerializedMultiSelectField } from './typings';
3
- import { FieldRenderProps } from '../BaseFormElement';
4
3
  import { BaseOptionsField, BaseOptionsFieldOptions } from '../BaseOptionsField';
5
4
  export type MultiSelectFieldOptions = BaseOptionsFieldOptions & {
6
5
  placeholder?: string;
7
6
  };
8
7
  export declare class MultiSelectField extends BaseOptionsField<"multi-select", string[], string[], MultiSelectField> {
9
8
  readonly type = "multi-select";
10
- static readonly fieldTypeName = "Multi-select";
11
- static readonly fieldTypeDescription = "Allows the user to select a multiple options from a list of options.";
12
9
  placeholder?: string;
13
10
  constructor(options: MultiSelectFieldOptions);
14
11
  serialize(): SerializedMultiSelectField;
@@ -18,7 +15,7 @@ export declare class MultiSelectField extends BaseOptionsField<"multi-select", s
18
15
  static deserialize(data: SerializedMultiSelectField): MultiSelectField;
19
16
  serializeValue(value: string[]): string[];
20
17
  deserializeValue(value: string[]): string[];
21
- render(props: FieldRenderProps): ReactNode;
18
+ render(): ReactNode;
22
19
  isSerializedValue(value: unknown): value is string[];
23
20
  isValue(value: unknown): value is string[];
24
21
  blankValue(): string[];
@@ -1,3 +1,3 @@
1
1
  export * from './MultiSelectField';
2
2
  export * from './MultiSelectFieldInput';
3
- export * from './typings';
3
+ export type * from './typings';
@@ -1,7 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { SerializedMultiStringField } from './typings';
3
3
  import { BaseField, FieldOptions, FieldValidator } from '../BaseField';
4
- import { FieldRenderProps } from '../BaseFormElement';
5
4
  export interface MultiStringFieldOptions extends FieldOptions {
6
5
  minimum_length?: number;
7
6
  maximum_length?: number;
@@ -9,14 +8,11 @@ export interface MultiStringFieldOptions extends FieldOptions {
9
8
  }
10
9
  export declare class MultiStringField extends BaseField<"multi-string", string[], string[], MultiStringField> {
11
10
  readonly type = "multi-string";
12
- static readonly fieldTypeName = "Multi-string";
13
- static readonly fieldTypeDescription = "Allows the user to provide multiple unique strings.";
14
11
  minLength: number;
15
12
  maxLength: number;
16
13
  placeholder: string;
17
- readonly onlyValidateAfterTouched = false;
18
14
  constructor(options: MultiStringFieldOptions);
19
- render(props: FieldRenderProps): ReactNode;
15
+ render(): ReactNode;
20
16
  serialize(): SerializedMultiStringField;
21
17
  getOptions(): MultiStringFieldOptions;
22
18
  duplicate(identifier: string): MultiStringField;
@@ -1,3 +1,3 @@
1
1
  export * from './MultiStringField';
2
2
  export * from './MultiStringFieldInput';
3
- export * from './typings';
3
+ export type * from './typings';
@@ -1,7 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { SerializedNumberField } from './typings';
3
3
  import { BaseField, FieldOptions, FieldValidator } from '../BaseField';
4
- import { FieldRenderProps } from '../BaseFormElement';
5
4
  import { BooleanField } from '../BooleanField';
6
5
  export type NumberRange = {
7
6
  to: number | null;
@@ -15,8 +14,6 @@ export interface NumberFieldOptions extends FieldOptions {
15
14
  }
16
15
  export declare class NumberField extends BaseField<"number", number | null, number | null, NumberField> {
17
16
  readonly type = "number";
18
- static readonly fieldTypeName = "Number";
19
- static readonly fieldTypeDescription = "Allows specifying a number within a given range.";
20
17
  minimum: number | undefined;
21
18
  maximum: number | undefined;
22
19
  integers: boolean;
@@ -37,7 +34,7 @@ export declare class NumberField extends BaseField<"number", number | null, numb
37
34
  static deserialize(data: SerializedNumberField): NumberField;
38
35
  serializeValue(value: number | null): number | null;
39
36
  deserializeValue(value: number | null): number | null;
40
- render(props: FieldRenderProps): ReactNode;
37
+ render(): ReactNode;
41
38
  isSerializedValue(value: unknown): value is number;
42
39
  isValue(value: unknown): value is number | null;
43
40
  areValuesEqual(value1: number | null, value2: number | null): boolean;
@@ -1,3 +1,3 @@
1
1
  export * from './NumberField';
2
2
  export * from './NumberFieldInput';
3
- export * from './typings';
3
+ export type * from './typings';
@@ -1,7 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { OTPFieldValidationType, SerializedOTPField } from './typings';
3
3
  import { BaseField, FieldOptions, FieldValidator } from '../BaseField';
4
- import { FieldRenderProps } from '../BaseFormElement';
5
4
  import { NumberField } from '../NumberField';
6
5
  import { SelectField } from '../SelectField';
7
6
  export interface OTPFieldOptions extends FieldOptions {
@@ -10,8 +9,6 @@ export interface OTPFieldOptions extends FieldOptions {
10
9
  }
11
10
  export declare class OTPField extends BaseField<"otp", string, string, OTPField> {
12
11
  readonly type = "otp";
13
- static readonly fieldTypeName = "OTP";
14
- static readonly fieldTypeDescription = "Allows specifying a number within a given range.";
15
12
  length: number;
16
13
  validationType: OTPFieldValidationType;
17
14
  constructor(options: OTPFieldOptions);
@@ -30,7 +27,7 @@ export declare class OTPField extends BaseField<"otp", string, string, OTPField>
30
27
  static deserialize(data: SerializedOTPField): OTPField;
31
28
  serializeValue(value: string): string;
32
29
  deserializeValue(value: string): string;
33
- render(props: FieldRenderProps): ReactNode;
30
+ render(): ReactNode;
34
31
  isSerializedValue(value: unknown): value is string;
35
32
  isValue(value: unknown): value is string;
36
33
  blankValue(): string;
@@ -1,15 +1,11 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { PassFailFieldStatus, PassFailFieldValue, SerializedPassFailField, SerializedPassFailFieldValue } from './typings';
3
3
  import { BaseField, FieldCreationSchemaObject, FieldOptions, FieldValidator } from '../BaseField';
4
- import { FieldRenderProps } from '../BaseFormElement';
5
4
  export interface PassFailFieldOptions extends FieldOptions {
6
5
  showNotesAndFilesOn: PassFailFieldStatus[];
7
6
  }
8
7
  export declare class PassFailField extends BaseField<"pass-fail", PassFailFieldValue, SerializedPassFailFieldValue, PassFailField> {
9
8
  readonly type = "pass-fail";
10
- static readonly fieldTypeName = "Pass - Fail";
11
- static readonly fieldTypeDescription = "Track pass, fail, or N/A outcome.";
12
- readonly onlyValidateAfterTouched = false;
13
9
  showNotesAndFilesOn: PassFailFieldStatus[];
14
10
  constructor(options: PassFailFieldOptions);
15
11
  static getFieldCreationSchema(parentPath?: string): FieldCreationSchemaObject[];
@@ -21,7 +17,7 @@ export declare class PassFailField extends BaseField<"pass-fail", PassFailFieldV
21
17
  static deserialize(data: SerializedPassFailField): PassFailField;
22
18
  serializeValue(value: PassFailFieldValue): SerializedPassFailFieldValue;
23
19
  deserializeValue(value: SerializedPassFailFieldValue): PassFailFieldValue;
24
- render(props: FieldRenderProps): ReactNode;
20
+ render(): ReactNode;
25
21
  isSerializedValue(value: unknown): value is SerializedPassFailFieldValue;
26
22
  isValue(value: unknown): value is PassFailFieldValue;
27
23
  areValuesEqual(value1: PassFailFieldValue, value2: PassFailFieldValue): boolean;
@@ -1,5 +1,5 @@
1
1
  export * from './constants';
2
2
  export * from './PassFailField';
3
3
  export * from './PassFailFieldInput';
4
- export * from './typings';
4
+ export type * from './typings';
5
5
  export * from './utils';
@@ -1,14 +1,10 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { SerializedRadioField } from './typings';
3
- import { FieldRenderProps } from '../BaseFormElement';
4
3
  import { BaseOptionsField, BaseOptionsFieldOptions } from '../BaseOptionsField';
5
4
  export interface RadioFieldOptions extends BaseOptionsFieldOptions {
6
5
  }
7
6
  export declare class RadioField extends BaseOptionsField<"radio", string | null, string | null, RadioField> {
8
7
  readonly type = "radio";
9
- readonly onlyValidateAfterTouched = false;
10
- static readonly fieldTypeName = "Option list";
11
- static readonly fieldTypeDescription = "Allows the user to select a single option from a list of options.";
12
8
  constructor(options: RadioFieldOptions);
13
9
  serialize(): SerializedRadioField;
14
10
  getOptions(): RadioFieldOptions;
@@ -17,7 +13,7 @@ export declare class RadioField extends BaseOptionsField<"radio", string | null,
17
13
  static deserialize(data: SerializedRadioField): RadioField;
18
14
  serializeValue(value: string | null): string | null;
19
15
  deserializeValue(value: string | null): string | null;
20
- render(props: FieldRenderProps): ReactNode;
16
+ render(): ReactNode;
21
17
  isSerializedValue(value: unknown): value is string | null;
22
18
  isValue(value: unknown): value is string | null;
23
19
  blankValue(): string | null;
@@ -1,3 +1,3 @@
1
1
  export * from './RadioField';
2
2
  export * from './RadioFieldInput';
3
- export * from './typings';
3
+ export type * from './typings';
@@ -1,15 +1,12 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { SerializedRatingField } from './typings';
3
3
  import { BaseField, FieldOptions, FieldValidator } from '../BaseField';
4
- import { FieldRenderProps } from '../BaseFormElement';
5
4
  import { NumberField } from '../NumberField';
6
5
  export interface RatingFieldOptions extends FieldOptions {
7
6
  maxRating: number;
8
7
  }
9
8
  export declare class RatingField extends BaseField<"rating", number | null, number | null, RatingField> {
10
9
  readonly type = "rating";
11
- static readonly fieldTypeName = "Rating";
12
- static readonly fieldTypeDescription = "Allows users to select a rating value.";
13
10
  maxRating: number;
14
11
  constructor(options: RatingFieldOptions);
15
12
  static getFieldCreationSchema(parentPath?: string): {
@@ -24,7 +21,7 @@ export declare class RatingField extends BaseField<"rating", number | null, numb
24
21
  static deserialize(data: SerializedRatingField): RatingField;
25
22
  serializeValue(value: number | null): number | null;
26
23
  deserializeValue(value: number | null): number | null;
27
- render(props: FieldRenderProps): ReactNode;
24
+ render(): ReactNode;
28
25
  isSerializedValue(value: unknown): value is number | null;
29
26
  isValue(value: unknown): value is number | null;
30
27
  areValuesEqual(value1: number | null, value2: number | null): boolean;
@@ -0,0 +1,3 @@
1
+ export declare const ratingItemCva: (props?: ({
2
+ size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
3
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
@@ -1,3 +1,3 @@
1
1
  export * from './RatingField';
2
2
  export * from './RatingFieldInput';
3
- export * from './typings';
3
+ export type * from './typings';
@@ -1,14 +1,10 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { SerializedScanField } from './typings';
3
3
  import { BaseField, FieldOptions } from '../BaseField';
4
- import { FieldRenderProps } from '../BaseFormElement';
5
4
  export interface ScanFieldOptions extends FieldOptions {
6
5
  }
7
6
  export declare class ScanField extends BaseField<"qr", string, string, ScanField> {
8
7
  readonly type = "qr";
9
- static readonly fieldTypeName = "Scan";
10
- static readonly fieldTypeDescription = "Used for scanning/reading QR and barcodes.";
11
- readonly onlyValidateAfterTouched = false;
12
8
  constructor(options: ScanFieldOptions);
13
9
  serialize(): SerializedScanField;
14
10
  getOptions(): ScanFieldOptions;
@@ -17,7 +13,7 @@ export declare class ScanField extends BaseField<"qr", string, string, ScanField
17
13
  static deserialize(data: SerializedScanField): ScanField;
18
14
  serializeValue(value: string): string;
19
15
  deserializeValue(value: string): string;
20
- render(props: FieldRenderProps): ReactNode;
16
+ render(): ReactNode;
21
17
  isSerializedValue(value: unknown): value is string;
22
18
  isValue(value: unknown): value is string;
23
19
  blankValue(): string;
@@ -1,3 +1,3 @@
1
1
  export * from './ScanField';
2
2
  export * from './ScanFieldInput';
3
- export * from './typings';
3
+ export type * from './typings';
@@ -1,14 +1,11 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { SerializedSelectField } from './typings';
3
- import { FieldRenderProps } from '../BaseFormElement';
4
3
  import { BaseOptionsField, BaseOptionsFieldOptions } from '../BaseOptionsField';
5
4
  export type SelectFieldOptions = BaseOptionsFieldOptions & {
6
5
  placeholder?: string;
7
6
  };
8
7
  export declare class SelectField extends BaseOptionsField<"select", string | null, string | null, SelectField> {
9
8
  readonly type = "select";
10
- static readonly fieldTypeName = "Dropdown";
11
- static readonly fieldTypeDescription = "Allows the user to select a single option from a list of options.";
12
9
  placeholder?: string;
13
10
  constructor(options: SelectFieldOptions);
14
11
  serialize(): SerializedSelectField;
@@ -18,7 +15,7 @@ export declare class SelectField extends BaseOptionsField<"select", string | nul
18
15
  static deserialize(data: SerializedSelectField): SelectField;
19
16
  serializeValue(value: string | null): string | null;
20
17
  deserializeValue(value: string | null): string | null;
21
- render(props: FieldRenderProps): ReactNode;
18
+ render(): ReactNode;
22
19
  isSerializedValue(value: unknown): value is string | null;
23
20
  isValue(value: unknown): value is string | null;
24
21
  blankValue(): string | null;
@@ -1,3 +1,3 @@
1
1
  export * from './SelectField';
2
2
  export * from './SelectFieldInput';
3
- export * from './typings';
3
+ export type * from './typings';
@@ -1,18 +1,15 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { SerializedStringField } from './typings';
3
- import { FieldRenderProps } from '../BaseFormElement';
4
3
  import { BaseStringField, BaseStringFieldOptions } from '../BaseStringField';
5
4
  export interface StringFieldOptions extends BaseStringFieldOptions {
6
5
  }
7
6
  export declare class StringField extends BaseStringField<"string", StringField> {
8
7
  readonly type = "string";
9
- static readonly fieldTypeName = "Short Text";
10
- static readonly fieldTypeDescription = "Short text fields can hold up to 500 characters on a single line.";
11
8
  constructor(options: StringFieldOptions);
12
9
  serialize(): SerializedStringField;
13
10
  getOptions(): StringFieldOptions;
14
11
  duplicate(identifier: string): StringField;
15
12
  setOptions(options: Partial<StringFieldOptions>): void;
16
13
  static deserialize(data: SerializedStringField): StringField;
17
- render(props: FieldRenderProps): ReactNode;
14
+ render(): ReactNode;
18
15
  }
@@ -1,4 +1,4 @@
1
1
  export * from './constants';
2
2
  export * from './StringField';
3
3
  export * from './StringFieldInput';
4
- export * from './typings';
4
+ export type * from './typings';
@@ -1,17 +1,14 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { SerializedTextField } from './typings';
3
- import { FieldRenderProps } from '../BaseFormElement';
4
3
  import { BaseStringField, BaseStringFieldOptions } from '../BaseStringField';
5
4
  export type TextFieldOptions = BaseStringFieldOptions;
6
5
  export declare class TextField extends BaseStringField<"text", TextField> {
7
6
  readonly type = "text";
8
- static readonly fieldTypeName = "Paragraph";
9
- static readonly fieldTypeDescription = "Paragraph fields can hold up to 10000 characters and can have multiple lines.";
10
7
  constructor(options: TextFieldOptions);
11
8
  serialize(): SerializedTextField;
12
9
  getOptions(): TextFieldOptions;
13
10
  duplicate(identifier: string): TextField;
14
11
  setOptions(options: Partial<TextFieldOptions>): void;
15
12
  static deserialize(data: SerializedTextField): TextField;
16
- render(props: FieldRenderProps): ReactNode;
13
+ render(): ReactNode;
17
14
  }
@@ -1,4 +1,4 @@
1
1
  export * from './constants';
2
2
  export * from './TextField';
3
3
  export * from './TextFieldInput';
4
- export * from './typings';
4
+ export type * from './typings';