@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.
Files changed (233) hide show
  1. package/dist/ImageViewer/context.d.ts +2 -2
  2. package/dist/ImageViewer/typings.d.ts +1 -1
  3. package/dist/Scanner/Scanner.d.ts +7 -0
  4. package/dist/Scanner/ScannerProvider.d.ts +2 -0
  5. package/dist/Scanner/constants.d.ts +3 -0
  6. package/dist/Scanner/context.d.ts +3 -0
  7. package/dist/Scanner/hooks.d.ts +1 -0
  8. package/dist/Scanner/index.d.ts +4 -0
  9. package/dist/Scanner/typings.d.ts +5 -0
  10. package/dist/form/Observable/Observable.d.ts +5 -0
  11. package/dist/form/Observable/index.d.ts +1 -0
  12. package/dist/form/UUIDFile/UUIDFile.d.ts +5 -0
  13. package/dist/form/UUIDFile/index.d.ts +1 -0
  14. package/dist/form/UUIDPromise/UUIDPromise.d.ts +10 -0
  15. package/dist/form/UUIDPromise/index.d.ts +2 -0
  16. package/dist/form/UUIDPromise/utils.d.ts +4 -0
  17. package/dist/form/builder/Root.d.ts +15 -0
  18. package/dist/form/builder/components/FieldBuilder.d.ts +8 -0
  19. package/dist/form/builder/components/FieldDropdownMenu.d.ts +9 -0
  20. package/dist/form/builder/components/FieldSectionDropdownMenu.d.ts +9 -0
  21. package/dist/form/builder/{FieldWithActions.d.ts → components/FieldWithActions.d.ts} +4 -3
  22. package/dist/form/builder/components/index.d.ts +5 -0
  23. package/dist/form/builder/constants.d.ts +2 -19
  24. package/dist/form/builder/context.d.ts +3 -1
  25. package/dist/form/builder/flow/FieldSectionConditionEdge.d.ts +3 -0
  26. package/dist/form/builder/flow/FieldSectionNode.d.ts +3 -0
  27. package/dist/form/builder/flow/FlowBuilder.d.ts +1 -0
  28. package/dist/form/builder/flow/constants.d.ts +3 -0
  29. package/dist/form/builder/flow/index.d.ts +2 -0
  30. package/dist/form/builder/flow/layout.d.ts +2 -0
  31. package/dist/form/builder/flow/typings.d.ts +15 -0
  32. package/dist/form/builder/hooks.d.ts +4 -4
  33. package/dist/form/builder/index.d.ts +8 -1
  34. package/dist/form/builder/list/FieldSectionBuilder.d.ts +5 -0
  35. package/dist/form/builder/list/FieldSectionConditionalItem.d.ts +7 -0
  36. package/dist/form/builder/list/FieldSectionWithActions.d.ts +6 -0
  37. package/dist/form/builder/list/ListBuilder.d.ts +1 -0
  38. package/dist/form/builder/list/index.d.ts +1 -0
  39. package/dist/form/builder/preview/Preview.d.ts +4 -0
  40. package/dist/form/builder/preview/index.d.ts +1 -0
  41. package/dist/form/builder/utils.d.ts +5 -24
  42. package/dist/form/components/DisplayFile.d.ts +9 -0
  43. package/dist/form/components/index.d.ts +1 -0
  44. package/dist/form/conditions/BaseCondition/BaseCondition.d.ts +30 -0
  45. package/dist/form/conditions/BaseCondition/index.d.ts +2 -0
  46. package/dist/form/conditions/BaseCondition/typings.d.ts +18 -0
  47. package/dist/form/conditions/BooleanFieldCondition/BooleanFieldCondition.d.ts +17 -0
  48. package/dist/form/conditions/BooleanFieldCondition/BooleanFieldConditionCell.d.ts +6 -0
  49. package/dist/form/conditions/BooleanFieldCondition/index.d.ts +3 -0
  50. package/dist/form/conditions/BooleanFieldCondition/typings.d.ts +4 -0
  51. package/dist/form/conditions/CheckboxListFieldCondition/CheckboxListFieldCondition.d.ts +20 -0
  52. package/dist/form/conditions/CheckboxListFieldCondition/CheckboxListFieldConditionCell.d.ts +6 -0
  53. package/dist/form/conditions/CheckboxListFieldCondition/index.d.ts +3 -0
  54. package/dist/form/conditions/CheckboxListFieldCondition/typings.d.ts +4 -0
  55. package/dist/form/conditions/ConditionManager/ConditionManager.d.ts +15 -0
  56. package/dist/form/conditions/ConditionManager/hooks.d.ts +4 -0
  57. package/dist/form/conditions/ConditionManager/index.d.ts +3 -0
  58. package/dist/form/conditions/ConditionManager/typings.d.ts +2 -0
  59. package/dist/form/conditions/DateFieldCondition/DateFieldCondition.d.ts +22 -0
  60. package/dist/form/conditions/DateFieldCondition/DateFieldConditionCell.d.ts +6 -0
  61. package/dist/form/conditions/DateFieldCondition/index.d.ts +3 -0
  62. package/dist/form/conditions/DateFieldCondition/typings.d.ts +4 -0
  63. package/dist/form/conditions/MultiSelectFieldCondition/MultiSelectFieldCondition.d.ts +28 -0
  64. package/dist/form/conditions/MultiSelectFieldCondition/MultiSelectFieldConditionCell.d.ts +6 -0
  65. package/dist/form/conditions/MultiSelectFieldCondition/index.d.ts +3 -0
  66. package/dist/form/conditions/MultiSelectFieldCondition/typings.d.ts +4 -0
  67. package/dist/form/conditions/MultiStringFieldCondition/MultiStringFieldCondition.d.ts +20 -0
  68. package/dist/form/conditions/MultiStringFieldCondition/MultiStringFieldConditionCell.d.ts +6 -0
  69. package/dist/form/conditions/MultiStringFieldCondition/index.d.ts +3 -0
  70. package/dist/form/conditions/MultiStringFieldCondition/typings.d.ts +4 -0
  71. package/dist/form/conditions/NumberFieldCondition/NumberFieldCondition.d.ts +34 -0
  72. package/dist/form/conditions/NumberFieldCondition/NumberFieldConditionCell.d.ts +6 -0
  73. package/dist/form/conditions/NumberFieldCondition/index.d.ts +3 -0
  74. package/dist/form/conditions/NumberFieldCondition/typings.d.ts +4 -0
  75. package/dist/form/conditions/OTPFieldCondition/OTPFieldCondition.d.ts +19 -0
  76. package/dist/form/conditions/OTPFieldCondition/OTPFieldConditionCell.d.ts +6 -0
  77. package/dist/form/conditions/OTPFieldCondition/index.d.ts +3 -0
  78. package/dist/form/conditions/OTPFieldCondition/typings.d.ts +4 -0
  79. package/dist/form/conditions/PassFailFieldCondition/PassFailFieldCondition.d.ts +20 -0
  80. package/dist/form/conditions/PassFailFieldCondition/PassFailFieldConditionCell.d.ts +6 -0
  81. package/dist/form/conditions/PassFailFieldCondition/index.d.ts +3 -0
  82. package/dist/form/conditions/PassFailFieldCondition/typings.d.ts +4 -0
  83. package/dist/form/conditions/RadioFieldCondition/RadioFieldCondition.d.ts +19 -0
  84. package/dist/form/conditions/RadioFieldCondition/RadioFieldConditionCell.d.ts +6 -0
  85. package/dist/form/conditions/RadioFieldCondition/index.d.ts +3 -0
  86. package/dist/form/conditions/RadioFieldCondition/typings.d.ts +4 -0
  87. package/dist/form/conditions/ScanFieldCondition/ScanFieldCondition.d.ts +19 -0
  88. package/dist/form/conditions/ScanFieldCondition/ScanFieldConditionCell.d.ts +6 -0
  89. package/dist/form/conditions/ScanFieldCondition/index.d.ts +3 -0
  90. package/dist/form/conditions/ScanFieldCondition/typings.d.ts +4 -0
  91. package/dist/form/conditions/SelectFieldCondition/SelectFieldCondition.d.ts +19 -0
  92. package/dist/form/conditions/SelectFieldCondition/SelectFieldConditionCell.d.ts +6 -0
  93. package/dist/form/conditions/SelectFieldCondition/index.d.ts +3 -0
  94. package/dist/form/conditions/SelectFieldCondition/typings.d.ts +4 -0
  95. package/dist/form/conditions/StringFieldCondition/StringFieldCondition.d.ts +19 -0
  96. package/dist/form/conditions/StringFieldCondition/StringFieldConditionCell.d.ts +6 -0
  97. package/dist/form/conditions/StringFieldCondition/index.d.ts +3 -0
  98. package/dist/form/conditions/StringFieldCondition/typings.d.ts +4 -0
  99. package/dist/form/conditions/TextFieldCondition/TextFieldCondition.d.ts +20 -0
  100. package/dist/form/conditions/TextFieldCondition/TextFieldConditionCell.d.ts +6 -0
  101. package/dist/form/conditions/TextFieldCondition/index.d.ts +3 -0
  102. package/dist/form/conditions/TextFieldCondition/typings.d.ts +4 -0
  103. package/dist/form/conditions/UploadFieldCondition/UploadFieldCondition.d.ts +19 -0
  104. package/dist/form/conditions/UploadFieldCondition/UploadFieldConditionCell.d.ts +6 -0
  105. package/dist/form/conditions/UploadFieldCondition/index.d.ts +3 -0
  106. package/dist/form/conditions/UploadFieldCondition/typings.d.ts +4 -0
  107. package/dist/form/conditions/components/ConditionModifierDropdown.d.ts +9 -0
  108. package/dist/form/conditions/components/DayPickerPopover.d.ts +4 -0
  109. package/dist/form/conditions/components/MultiStringPopover.d.ts +9 -0
  110. package/dist/form/conditions/components/NumberInputPopover.d.ts +9 -0
  111. package/dist/form/conditions/components/RemoveConditionButton.d.ts +11 -0
  112. package/dist/form/conditions/components/SelectFieldOptionMultiSelectGroup.d.ts +6 -0
  113. package/dist/form/conditions/components/SelectFieldOptionSelectGroup.d.ts +6 -0
  114. package/dist/form/conditions/components/TextInputPopover.d.ts +9 -0
  115. package/dist/form/conditions/components/constants.d.ts +4 -0
  116. package/dist/form/conditions/components/index.d.ts +9 -0
  117. package/dist/form/conditions/index.d.ts +18 -0
  118. package/dist/form/conditions/typings.d.ts +28 -0
  119. package/dist/form/conditions/utils.d.ts +6 -0
  120. package/dist/form/fields/BaseField/BaseField.d.ts +20 -41
  121. package/dist/form/fields/BaseField/index.d.ts +0 -1
  122. package/dist/form/fields/BaseField/typings.d.ts +13 -9
  123. package/dist/form/fields/BaseFormElement/BaseFormElement.d.ts +13 -0
  124. package/dist/form/fields/BaseFormElement/index.d.ts +2 -0
  125. package/dist/form/fields/BaseFormElement/typings.d.ts +15 -0
  126. package/dist/form/fields/BaseOptionsField/BaseOptionsField.d.ts +14 -0
  127. package/dist/form/fields/BaseOptionsField/index.d.ts +2 -0
  128. package/dist/form/fields/BaseOptionsField/typings.d.ts +9 -0
  129. package/dist/form/fields/BaseStringField/BaseStringField.d.ts +28 -0
  130. package/dist/form/fields/BaseStringField/index.d.ts +2 -0
  131. package/dist/form/fields/{StringOrTextField → BaseStringField}/typings.d.ts +1 -1
  132. package/dist/form/fields/BooleanField/BooleanField.d.ts +19 -16
  133. package/dist/form/fields/BooleanField/BooleanInput.d.ts +6 -2
  134. package/dist/form/fields/BooleanField/typings.d.ts +1 -2
  135. package/dist/form/fields/CheckboxListField/CheckboxListField.d.ts +16 -23
  136. package/dist/form/fields/CheckboxListField/CheckboxListInput.d.ts +6 -2
  137. package/dist/form/fields/CheckboxListField/typings.d.ts +2 -3
  138. package/dist/form/fields/DateField/DateField.d.ts +22 -14
  139. package/dist/form/fields/DateField/DateInput.d.ts +6 -2
  140. package/dist/form/fields/DateField/typings.d.ts +1 -2
  141. package/dist/form/fields/FieldSection/FieldSection.d.ts +39 -28
  142. package/dist/form/fields/FieldSection/FieldSectionLayout.d.ts +6 -5
  143. package/dist/form/fields/FieldSection/typings.d.ts +9 -11
  144. package/dist/form/fields/MultiSelectField/MultiSelectField.d.ts +18 -19
  145. package/dist/form/fields/MultiSelectField/MultiSelectInput.d.ts +5 -2
  146. package/dist/form/fields/MultiSelectField/typings.d.ts +2 -5
  147. package/dist/form/fields/MultiStringField/MultiStringField.d.ts +21 -29
  148. package/dist/form/fields/MultiStringField/MultiStringInput.d.ts +6 -6
  149. package/dist/form/fields/MultiStringField/typings.d.ts +5 -3
  150. package/dist/form/fields/NumberField/NumberField.d.ts +24 -23
  151. package/dist/form/fields/NumberField/NumberInput.d.ts +6 -2
  152. package/dist/form/fields/NumberField/typings.d.ts +1 -2
  153. package/dist/form/fields/OneTimePasswordField/OTPField.d.ts +38 -0
  154. package/dist/form/fields/OneTimePasswordField/OTPInput.d.ts +7 -0
  155. package/dist/form/fields/OneTimePasswordField/index.d.ts +3 -0
  156. package/dist/form/fields/OneTimePasswordField/typings.d.ts +8 -0
  157. package/dist/form/fields/PassFailField/PassFailField.d.ts +30 -0
  158. package/dist/form/fields/PassFailField/PassFailInput.d.ts +7 -0
  159. package/dist/form/fields/PassFailField/constants.d.ts +7 -0
  160. package/dist/form/fields/PassFailField/index.d.ts +5 -0
  161. package/dist/form/fields/PassFailField/typings.d.ts +17 -0
  162. package/dist/form/fields/PassFailField/utils.d.ts +7 -0
  163. package/dist/form/fields/RadioField/RadioField.d.ts +18 -24
  164. package/dist/form/fields/RadioField/RadioInput.d.ts +6 -2
  165. package/dist/form/fields/RadioField/typings.d.ts +2 -3
  166. package/dist/form/fields/ScanField/ScanField.d.ts +18 -14
  167. package/dist/form/fields/ScanField/ScanInput.d.ts +4 -5
  168. package/dist/form/fields/ScanField/typings.d.ts +1 -2
  169. package/dist/form/fields/SelectField/SelectField.d.ts +18 -17
  170. package/dist/form/fields/SelectField/SelectInput.d.ts +6 -2
  171. package/dist/form/fields/SelectField/typings.d.ts +2 -5
  172. package/dist/form/fields/StringField/StringField.d.ts +11 -19
  173. package/dist/form/fields/StringField/StringInput.d.ts +6 -2
  174. package/dist/form/fields/StringField/typings.d.ts +2 -6
  175. package/dist/form/fields/TextField/TextField.d.ts +10 -15
  176. package/dist/form/fields/TextField/TextInput.d.ts +6 -2
  177. package/dist/form/fields/TextField/typings.d.ts +2 -3
  178. package/dist/form/fields/UploadField/UploadField.d.ts +22 -23
  179. package/dist/form/fields/UploadField/UploadInput.d.ts +6 -2
  180. package/dist/form/fields/UploadField/typings.d.ts +1 -2
  181. package/dist/form/fields/_utils.d.ts +1 -0
  182. package/dist/form/fields/constants.d.ts +19 -111
  183. package/dist/form/fields/hooks.d.ts +30 -4
  184. package/dist/form/fields/index.d.ts +7 -3
  185. package/dist/form/fields/typings.d.ts +47 -34
  186. package/dist/form/fields/utils.d.ts +15 -16
  187. package/dist/form/index.d.ts +7 -1
  188. package/dist/form/modifiers/boolean.d.ts +3 -0
  189. package/dist/form/modifiers/conditionModifier.d.ts +17 -0
  190. package/dist/form/modifiers/date.d.ts +9 -0
  191. package/dist/form/modifiers/file.d.ts +4 -0
  192. package/dist/form/modifiers/index.d.ts +8 -0
  193. package/dist/form/modifiers/number.d.ts +10 -0
  194. package/dist/form/modifiers/passFailStatus.d.ts +6 -0
  195. package/dist/form/modifiers/string.d.ts +12 -0
  196. package/dist/form/modifiers/typings.d.ts +11 -0
  197. package/dist/form/modifiers/utils.d.ts +2 -0
  198. package/dist/form/renderer/{FormRenderer/FormRenderer.d.ts → FormRenderer.d.ts} +4 -4
  199. package/dist/form/renderer/constants.d.ts +2 -0
  200. package/dist/form/renderer/context.d.ts +2 -0
  201. package/dist/form/renderer/index.d.ts +1 -2
  202. package/dist/form/schema/FieldSchema.d.ts +22 -0
  203. package/dist/form/schema/context.d.ts +2 -0
  204. package/dist/form/schema/index.d.ts +1 -0
  205. package/dist/form/typings.d.ts +10 -19
  206. package/dist/form/utils.d.ts +11 -7
  207. package/dist/forms.js +28795 -18110
  208. package/dist/forms.umd.cjs +35305 -63
  209. package/dist/index.d.ts +1 -0
  210. package/package.json +9 -5
  211. package/dist/form/builder/DropDispatch.d.ts +0 -27
  212. package/dist/form/builder/FieldActions.d.ts +0 -13
  213. package/dist/form/builder/FieldBuilder.d.ts +0 -10
  214. package/dist/form/builder/FieldSectionWithActions.d.ts +0 -10
  215. package/dist/form/builder/FieldsEditor.d.ts +0 -1
  216. package/dist/form/builder/FormBuilder.d.ts +0 -26
  217. package/dist/form/fields/BaseField/hooks.d.ts +0 -393
  218. package/dist/form/fields/BaseSelectField/BaseSelectField.d.ts +0 -35
  219. package/dist/form/fields/BaseSelectField/index.d.ts +0 -2
  220. package/dist/form/fields/BaseSelectField/typings.d.ts +0 -6
  221. package/dist/form/fields/CustomField/CustomField.d.ts +0 -23
  222. package/dist/form/fields/CustomField/FieldInputClonerField/FieldInputCloner.d.ts +0 -7
  223. package/dist/form/fields/CustomField/FieldInputClonerField/FieldInputClonerField.d.ts +0 -18
  224. package/dist/form/fields/CustomField/FieldInputClonerField/index.d.ts +0 -3
  225. package/dist/form/fields/CustomField/FieldInputClonerField/typings.d.ts +0 -4
  226. package/dist/form/fields/CustomField/index.d.ts +0 -1
  227. package/dist/form/fields/StringOrTextField/StringOrTextField.d.ts +0 -34
  228. package/dist/form/fields/StringOrTextField/index.d.ts +0 -2
  229. package/dist/form/renderer/FormRenderer/constants.d.ts +0 -2
  230. package/dist/form/renderer/PatchForm/Field.d.ts +0 -17
  231. package/dist/form/renderer/PatchForm/Provider.d.ts +0 -28
  232. package/dist/form/renderer/PatchForm/index.d.ts +0 -2
  233. /package/dist/form/builder/{FieldSettingsPopover.d.ts → components/FieldSettingsPopover.d.ts} +0 -0
@@ -1,40 +1,32 @@
1
1
  import { ReactNode } from 'react';
2
- import { RiListCheck } from 'react-icons/ri';
3
- import { BaseField, ChildFieldOptions } from '../BaseField';
4
- import { GetInputProps, InputFieldLevelValidator, ISerializedField } from '../typings';
2
+ import { BaseField, FieldOptions, FieldValidator } from '../BaseField';
3
+ import { FieldRenderProps } from '../BaseFormElement';
5
4
  import { SerializedMultiStringField } from './typings';
6
- type MultiStringFieldOptions = ChildFieldOptions<string[]> & {
5
+ export interface MultiStringFieldOptions extends FieldOptions<string[]> {
7
6
  minimum_length?: number;
8
7
  maximum_length?: number;
9
8
  placeholder?: string;
10
- };
11
- export declare const emptyMultiStringField: {
12
- type: string;
13
- minimum_length: number;
14
- maximum_length: null;
15
- label: string;
16
- description: string;
17
- required: boolean;
18
- };
19
- /**
20
- * A field that lets the user input multiple strings. Each string must be unique. Useful for things like:
21
- * - Specifying the options of a SelectField (used in `SelectField.getFieldCreationSchema`
22
- * - Listing serial numbers and similar
23
- */
24
- export declare class MultiStringField extends BaseField<string[], "multi-string"> {
9
+ }
10
+ export declare class MultiStringField extends BaseField<"multi-string", string[], string[], MultiStringField> {
11
+ readonly type = "multi-string";
25
12
  static readonly fieldTypeName = "Multi-string";
26
13
  static readonly fieldTypeDescription = "Allows the user to provide multiple unique strings.";
27
- readonly minLength: number;
28
- readonly maxLength: number;
14
+ minLength: number;
15
+ maxLength: number;
16
+ placeholder: string;
29
17
  readonly onlyValidateAfterTouched = false;
30
- readonly placeholder: string;
31
- static Icon: typeof RiListCheck;
32
18
  constructor(options: MultiStringFieldOptions);
33
- getInput(props: GetInputProps<this>): ReactNode;
19
+ render(props: FieldRenderProps): ReactNode;
34
20
  serialize(): SerializedMultiStringField;
35
- protected isBlank(value: string[] | undefined): boolean;
36
- isEqual(value1: string[] | undefined, value2: string[] | undefined): boolean;
37
- getFieldValidators(): InputFieldLevelValidator<string[]>[];
38
- static deserialize(data: ISerializedField): MultiStringField;
21
+ getOptions(): MultiStringFieldOptions;
22
+ duplicate(identifier: string): MultiStringField;
23
+ setOptions(options: Partial<MultiStringFieldOptions>): void;
24
+ serializeValue(value: string[]): string[];
25
+ deserializeValue(value: string[]): string[];
26
+ getFieldValidators(): FieldValidator<string[]>[];
27
+ static deserialize(data: SerializedMultiStringField): MultiStringField;
28
+ isSerializedValueValid(value: unknown): value is string[];
29
+ isValueValid(value: unknown): value is string[];
30
+ blankValue(): string[];
31
+ areValuesEqual(value1: string[], value2: string[]): boolean;
39
32
  }
40
- export {};
@@ -1,7 +1,7 @@
1
- import { ComponentProps } from '../typings';
1
+ import { FieldRenderProps } from '../BaseFormElement';
2
2
  import { MultiStringField } from './MultiStringField';
3
- /**
4
- * Allows the user to create an array of unique strings and customize the order.
5
- * User to generate options for the Select field.
6
- */
7
- export declare const MultiStringInput: import('react').MemoExoticComponent<(props: ComponentProps<MultiStringField>) => import("react/jsx-runtime").JSX.Element>;
3
+ interface MultiStringInputProps extends FieldRenderProps {
4
+ field: MultiStringField;
5
+ }
6
+ export declare const MultiStringInput: import('react').NamedExoticComponent<MultiStringInputProps>;
7
+ export {};
@@ -1,4 +1,6 @@
1
- import { BaseSerializedStringField } from '../StringOrTextField';
2
- export interface SerializedMultiStringField extends BaseSerializedStringField {
3
- type: "multi-string";
1
+ import { BaseSerializedField } from '../BaseField';
2
+ export interface SerializedMultiStringField extends BaseSerializedField<"multi-string"> {
3
+ minimum_length?: number;
4
+ maximum_length: number;
5
+ placeholder?: string;
4
6
  }
@@ -1,35 +1,27 @@
1
1
  import { ReactNode } from 'react';
2
- import { RiHashtag } from 'react-icons/ri';
3
- import { BaseField, ChildFieldOptions } from '../BaseField';
2
+ import { BaseField, FieldOptions, FieldValidator } from '../BaseField';
3
+ import { FieldRenderProps } from '../BaseFormElement';
4
4
  import { BooleanField } from '../BooleanField';
5
- import { GetInputProps, InputFieldLevelValidator, InputValidator, ISerializedField } from '../typings';
6
5
  import { SerializedNumberField } from './typings';
7
- export declare const emptyNumberField: {
8
- type: string;
9
- minimum: number;
10
- maximum: number;
11
- integers: boolean;
12
- label: string;
13
- description: string;
14
- required: boolean;
6
+ export type NumberRange = {
7
+ to: number | null;
8
+ from: number | null;
15
9
  };
16
- export interface NumberFieldOptions extends ChildFieldOptions<number> {
10
+ export interface NumberFieldOptions extends FieldOptions<number | null> {
17
11
  maximum?: number;
18
12
  minimum?: number;
19
13
  integers?: boolean;
20
14
  placeholder?: string;
21
15
  }
22
- export declare class NumberField extends BaseField<number, "number"> {
16
+ export declare class NumberField extends BaseField<"number", number | null, number | null, NumberField> {
17
+ readonly type = "number";
23
18
  static readonly fieldTypeName = "Number";
24
19
  static readonly fieldTypeDescription = "Allows specifying a number within a given range.";
25
- readonly minimum: number | undefined;
26
- readonly maximum: number | undefined;
27
- readonly integers: boolean;
28
- readonly placeholder: string;
29
- static Icon: typeof RiHashtag;
20
+ minimum: number | undefined;
21
+ maximum: number | undefined;
22
+ integers: boolean;
23
+ placeholder?: string;
30
24
  constructor(options: NumberFieldOptions);
31
- static _validateMin: (path: string) => InputValidator<number>;
32
- static _validateMax: (path: string) => InputValidator<number>;
33
25
  static getFieldCreationSchema(parentPath?: string): ({
34
26
  field: NumberField;
35
27
  showDirectly: boolean;
@@ -37,8 +29,17 @@ export declare class NumberField extends BaseField<number, "number"> {
37
29
  field: BooleanField;
38
30
  showDirectly: boolean;
39
31
  })[];
40
- getFieldValidators(): InputFieldLevelValidator<number>[];
32
+ getFieldValidators(): FieldValidator<number | null>[];
41
33
  serialize(): SerializedNumberField;
42
- static deserialize(data: ISerializedField): NumberField;
43
- getInput(props: GetInputProps<this>): ReactNode;
34
+ getOptions(): NumberFieldOptions;
35
+ duplicate(identifier: string): NumberField;
36
+ setOptions(options: Partial<NumberFieldOptions>): void;
37
+ static deserialize(data: SerializedNumberField): NumberField;
38
+ serializeValue(value: number | null): number | null;
39
+ deserializeValue(value: number | null): number | null;
40
+ render(props: FieldRenderProps): ReactNode;
41
+ isSerializedValueValid(value: unknown): value is number;
42
+ isValueValid(value: unknown): value is number | null;
43
+ areValuesEqual(value1: number | null, value2: number | null): boolean;
44
+ blankValue(): number | null;
44
45
  }
@@ -1,3 +1,7 @@
1
- import { ComponentProps } from '../typings';
1
+ import { FieldRenderProps } from '../BaseFormElement';
2
2
  import { NumberField } from './NumberField';
3
- export declare const NumberInput: import('react').MemoExoticComponent<(props: ComponentProps<NumberField>) => import("react/jsx-runtime").JSX.Element>;
3
+ interface NumberInputProps extends FieldRenderProps {
4
+ field: NumberField;
5
+ }
6
+ export declare const NumberInput: import('react').MemoExoticComponent<(props: NumberInputProps) => import("react/jsx-runtime").JSX.Element>;
7
+ export {};
@@ -1,6 +1,5 @@
1
1
  import { BaseSerializedField } from '../BaseField';
2
- export interface SerializedNumberField extends BaseSerializedField {
3
- type: "number";
2
+ export interface SerializedNumberField extends BaseSerializedField<"number"> {
4
3
  minimum: number | undefined;
5
4
  maximum: number | undefined;
6
5
  integers: boolean;
@@ -0,0 +1,38 @@
1
+ import { ReactNode } from 'react';
2
+ import { BaseField, FieldOptions, FieldValidator } from '../BaseField';
3
+ import { FieldRenderProps } from '../BaseFormElement';
4
+ import { NumberField } from '../NumberField';
5
+ import { SelectField } from '../SelectField';
6
+ import { OTPFieldValidationType, SerializedOTPField } from './typings';
7
+ export interface OTPFieldOptions extends FieldOptions<string> {
8
+ length: number;
9
+ validationType: OTPFieldValidationType;
10
+ }
11
+ export declare class OTPField extends BaseField<"otp", string, string, OTPField> {
12
+ readonly type = "otp";
13
+ static readonly fieldTypeName = "OTP";
14
+ static readonly fieldTypeDescription = "Allows specifying a number within a given range.";
15
+ length: number;
16
+ validationType: OTPFieldValidationType;
17
+ constructor(options: OTPFieldOptions);
18
+ static getFieldCreationSchema(parentPath?: string): ({
19
+ field: NumberField;
20
+ showDirectly: boolean;
21
+ } | {
22
+ field: SelectField;
23
+ showDirectly: boolean;
24
+ })[];
25
+ getFieldValidators(): FieldValidator<string>[];
26
+ serialize(): SerializedOTPField;
27
+ getOptions(): OTPFieldOptions;
28
+ duplicate(identifier: string): OTPField;
29
+ setOptions(options: Partial<OTPFieldOptions>): void;
30
+ static deserialize(data: SerializedOTPField): OTPField;
31
+ serializeValue(value: string): string;
32
+ deserializeValue(value: string): string;
33
+ render(props: FieldRenderProps): ReactNode;
34
+ isSerializedValueValid(value: unknown): value is string;
35
+ isValueValid(value: unknown): value is string;
36
+ blankValue(): string;
37
+ areValuesEqual(value1: string, value2: string): boolean;
38
+ }
@@ -0,0 +1,7 @@
1
+ import { FieldRenderProps } from '../BaseFormElement';
2
+ import { OTPField } from './OTPField';
3
+ interface OTPInputProps extends FieldRenderProps {
4
+ field: OTPField;
5
+ }
6
+ export declare const OTPInput: import('react').MemoExoticComponent<(props: OTPInputProps) => import("react/jsx-runtime").JSX.Element>;
7
+ export {};
@@ -0,0 +1,3 @@
1
+ export * from './OTPField';
2
+ export * from './OTPInput';
3
+ export type * from './typings';
@@ -0,0 +1,8 @@
1
+ import { OneTimePasswordField } from '@overmap-ai/blocks';
2
+ import { ComponentProps } from 'react';
3
+ import { BaseSerializedField } from '../BaseField';
4
+ export type OTPFieldValidationType = NonNullable<ComponentProps<typeof OneTimePasswordField.Root>["validationType"]>;
5
+ export interface SerializedOTPField extends BaseSerializedField<"otp"> {
6
+ length: number;
7
+ validationType: OTPFieldValidationType;
8
+ }
@@ -0,0 +1,30 @@
1
+ import { ReactNode } from 'react';
2
+ import { BaseField, FieldCreationSchemaObject, FieldOptions, FieldValidator } from '../BaseField';
3
+ import { FieldRenderProps } from '../BaseFormElement';
4
+ import { PassFailFieldStatus, PassFailFieldValue, SerializedPassFailField, SerializedPassFailFieldValue } from './typings';
5
+ export interface PassFailFieldOptions extends FieldOptions<PassFailFieldValue> {
6
+ showNotesAndFilesOn: PassFailFieldStatus[];
7
+ }
8
+ export declare class PassFailField extends BaseField<"pass-fail", PassFailFieldValue, SerializedPassFailFieldValue, PassFailField> {
9
+ 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
+ showNotesAndFilesOn: PassFailFieldStatus[];
14
+ constructor(options: PassFailFieldOptions);
15
+ static getFieldCreationSchema(parentPath?: string): FieldCreationSchemaObject[];
16
+ serialize(): SerializedPassFailField;
17
+ getOptions(): PassFailFieldOptions;
18
+ duplicate(identifier: string): PassFailField;
19
+ setOptions(options: Partial<PassFailFieldOptions>): void;
20
+ getFieldValidators(): FieldValidator<PassFailFieldValue>[];
21
+ static deserialize(data: SerializedPassFailField): PassFailField;
22
+ serializeValue(value: PassFailFieldValue): SerializedPassFailFieldValue;
23
+ deserializeValue(value: SerializedPassFailFieldValue): PassFailFieldValue;
24
+ render(props: FieldRenderProps): ReactNode;
25
+ isSerializedValueValid(value: unknown): value is SerializedPassFailFieldValue;
26
+ isValueValid(value: unknown): value is PassFailFieldValue;
27
+ areValuesEqual(value1: PassFailFieldValue, value2: PassFailFieldValue): boolean;
28
+ blankValue(): PassFailFieldValue;
29
+ cleanValue(value: PassFailFieldValue): PassFailFieldValue;
30
+ }
@@ -0,0 +1,7 @@
1
+ import { FieldRenderProps } from '../BaseFormElement';
2
+ import { PassFailField } from './PassFailField';
3
+ interface PassFailInputProps extends FieldRenderProps {
4
+ field: PassFailField;
5
+ }
6
+ export declare const PassFailInput: import('react').MemoExoticComponent<(props: PassFailInputProps) => import("react/jsx-runtime").JSX.Element>;
7
+ export {};
@@ -0,0 +1,7 @@
1
+ import { IconType } from '@overmap-ai/blocks';
2
+ import { PassFailFieldStatus } from './typings';
3
+ export declare const passFailFieldStatusMapping: Record<PassFailFieldStatus, {
4
+ label: string;
5
+ icon: IconType;
6
+ }>;
7
+ export declare const passFailFieldStatuses: PassFailFieldStatus[];
@@ -0,0 +1,5 @@
1
+ export * from './constants';
2
+ export * from './PassFailField';
3
+ export * from './PassFailInput';
4
+ export * from './typings';
5
+ export * from './utils';
@@ -0,0 +1,17 @@
1
+ import { UUIDFile } from '../../UUIDFile';
2
+ import { UUIDPromise } from '../../UUIDPromise';
3
+ import { BaseSerializedField } from '../BaseField';
4
+ export type PassFailFieldStatus = "pass" | "fail" | "na";
5
+ export interface PassFailFieldValue {
6
+ status: PassFailFieldStatus | null;
7
+ notes: string;
8
+ files: (UUIDPromise<UUIDFile> | UUIDFile)[];
9
+ }
10
+ export interface SerializedPassFailFieldValue {
11
+ status: PassFailFieldStatus | null;
12
+ notes: string;
13
+ files: never[];
14
+ }
15
+ export interface SerializedPassFailField extends BaseSerializedField<"pass-fail"> {
16
+ showNotesAndFilesOn: PassFailFieldStatus[];
17
+ }
@@ -0,0 +1,7 @@
1
+ import { PassFailFieldStatus, PassFailFieldValue, SerializedPassFailFieldValue } from './typings';
2
+ export declare const isPassFailFieldStatus: (value: unknown) => value is PassFailFieldStatus;
3
+ export declare const isSerializedPassFailFieldValue: (value: unknown) => value is SerializedPassFailFieldValue;
4
+ export declare const isPassFailFieldValue: (value: unknown) => value is PassFailFieldValue;
5
+ export declare const serializePassFailFieldValue: (value: PassFailFieldValue) => SerializedPassFailFieldValue;
6
+ export declare const deserializePassFailFieldValue: (value: SerializedPassFailFieldValue) => PassFailFieldValue;
7
+ export declare const arePassFieldValuesEqual: (value1: PassFailFieldValue, value2: PassFailFieldValue) => boolean;
@@ -1,31 +1,25 @@
1
- import { RiRadioButtonFill } from 'react-icons/ri';
2
- import { BaseField, ChildFieldOptions } from '../BaseField';
3
- import { SelectFieldOption } from '../BaseSelectField';
4
- import { MultiStringField } from '../MultiStringField';
5
- import { GetInputProps, ISerializedField } from '../typings';
1
+ import { ReactNode } from 'react';
2
+ import { FieldRenderProps } from '../BaseFormElement';
3
+ import { BaseOptionsField, BaseOptionsFieldOptions } from '../BaseOptionsField';
6
4
  import { SerializedRadioField } from './typings';
7
- export declare const emptyRadioField: {
8
- type: string;
9
- options: never[];
10
- label: string;
11
- description: string;
12
- required: boolean;
13
- };
14
- export interface RadioFieldConfig extends ChildFieldOptions<string> {
15
- options: SelectFieldOption[];
5
+ export interface RadioFieldOptions extends BaseOptionsFieldOptions<string | null> {
16
6
  }
17
- export declare class RadioField extends BaseField<string, "radio"> {
18
- readonly options: SelectFieldOption[];
7
+ export declare class RadioField extends BaseOptionsField<"radio", string | null, string | null, RadioField> {
8
+ readonly type = "radio";
19
9
  readonly onlyValidateAfterTouched = false;
20
10
  static readonly fieldTypeName = "Option list";
21
11
  static readonly fieldTypeDescription = "Allows the user to select a single option from a list of options.";
22
- static Icon: typeof RiRadioButtonFill;
23
- constructor(config: RadioFieldConfig);
12
+ constructor(options: RadioFieldOptions);
24
13
  serialize(): SerializedRadioField;
25
- static deserialize(data: ISerializedField): RadioField;
26
- static getFieldCreationSchema(parentPath?: string): {
27
- field: MultiStringField;
28
- showDirectly: boolean;
29
- }[];
30
- getInput(props: GetInputProps<this>): React.ReactNode;
14
+ getOptions(): RadioFieldOptions;
15
+ duplicate(identifier: string): RadioField;
16
+ setOptions(options: Partial<RadioFieldOptions>): void;
17
+ static deserialize(data: SerializedRadioField): RadioField;
18
+ serializeValue(value: string | null): string | null;
19
+ deserializeValue(value: string | null): string | null;
20
+ render(props: FieldRenderProps): ReactNode;
21
+ isSerializedValueValid(value: unknown): value is string | null;
22
+ isValueValid(value: unknown): value is string | null;
23
+ blankValue(): string | null;
24
+ areValuesEqual(value1: string | null, value2: string | null): boolean;
31
25
  }
@@ -1,3 +1,7 @@
1
- import { ComponentProps } from '../typings';
1
+ import { FieldRenderProps } from '../BaseFormElement';
2
2
  import { RadioField } from './RadioField';
3
- export declare const RadioInput: import('react').MemoExoticComponent<(props: ComponentProps<RadioField>) => import("react/jsx-runtime").JSX.Element>;
3
+ interface RadioInputProps extends FieldRenderProps {
4
+ field: RadioField;
5
+ }
6
+ export declare const RadioInput: import('react').NamedExoticComponent<RadioInputProps>;
7
+ export {};
@@ -1,6 +1,5 @@
1
1
  import { BaseSerializedField } from '../BaseField';
2
- import { SelectFieldOption } from '../BaseSelectField';
3
- export interface SerializedRadioField extends BaseSerializedField {
4
- type: "radio";
2
+ import { SelectFieldOption } from '../BaseOptionsField';
3
+ export interface SerializedRadioField extends BaseSerializedField<"radio"> {
5
4
  options: SelectFieldOption[];
6
5
  }
@@ -1,21 +1,25 @@
1
1
  import { ReactNode } from 'react';
2
- import { RiFullscreenLine } from 'react-icons/ri';
3
- import { BaseField, ChildFieldOptions } from '../BaseField';
4
- import { ComponentProps, ISerializedField } from '../typings';
2
+ import { BaseField, FieldOptions } from '../BaseField';
3
+ import { FieldRenderProps } from '../BaseFormElement';
5
4
  import { SerializedScanField } from './typings';
6
- export declare const emptyScanField: {
7
- type: string;
8
- label: string;
9
- description: string;
10
- required: boolean;
11
- };
12
- export declare class ScanField extends BaseField<string, "qr"> {
5
+ export interface ScanFieldOptions extends FieldOptions<string> {
6
+ }
7
+ export declare class ScanField extends BaseField<"qr", string, string, ScanField> {
8
+ readonly type = "qr";
13
9
  static readonly fieldTypeName = "Scan";
14
10
  static readonly fieldTypeDescription = "Used for scanning/reading QR and barcodes.";
15
11
  readonly onlyValidateAfterTouched = false;
16
- static Icon: typeof RiFullscreenLine;
17
- constructor(options: ChildFieldOptions<string>);
12
+ constructor(options: ScanFieldOptions);
18
13
  serialize(): SerializedScanField;
19
- static deserialize(data: ISerializedField): ScanField;
20
- getInput(props: ComponentProps<ScanField>): ReactNode;
14
+ getOptions(): ScanFieldOptions;
15
+ duplicate(identifier: string): ScanField;
16
+ setOptions(options: Partial<ScanFieldOptions>): void;
17
+ static deserialize(data: SerializedScanField): ScanField;
18
+ serializeValue(value: string): string;
19
+ deserializeValue(value: string): string;
20
+ render(props: FieldRenderProps): ReactNode;
21
+ isSerializedValueValid(value: unknown): value is string;
22
+ isValueValid(value: unknown): value is string;
23
+ blankValue(): string;
24
+ areValuesEqual(value1: string, value2: string): boolean;
21
25
  }
@@ -1,8 +1,7 @@
1
- import { ComponentProps } from '../typings';
1
+ import { FieldRenderProps } from '../BaseFormElement';
2
2
  import { ScanField } from './ScanField';
3
- export declare const ScanInput: import('react').MemoExoticComponent<(props: ComponentProps<ScanField>) => import("react/jsx-runtime").JSX.Element>;
4
- interface ScannerProps {
5
- onScan: (data: string) => void;
3
+ interface ScanInputProps extends FieldRenderProps {
4
+ field: ScanField;
6
5
  }
7
- export declare const Scanner: import('react').MemoExoticComponent<(props: ScannerProps) => import("react/jsx-runtime").JSX.Element>;
6
+ export declare const ScanInput: import('react').NamedExoticComponent<ScanInputProps>;
8
7
  export {};
@@ -1,4 +1,3 @@
1
1
  import { BaseSerializedField } from '../BaseField';
2
- export interface SerializedScanField extends BaseSerializedField {
3
- type: "qr";
2
+ export interface SerializedScanField extends BaseSerializedField<"qr"> {
4
3
  }
@@ -1,25 +1,26 @@
1
1
  import { ReactNode } from 'react';
2
- import { RiMenuFoldLine } from 'react-icons/ri';
3
- import { BaseSelectField, BaseSelectFieldOptions, SelectFieldOptionValue } from '../BaseSelectField';
4
- import { GetInputProps, ISerializedField } from '../typings';
2
+ import { FieldRenderProps } from '../BaseFormElement';
3
+ import { BaseOptionsField, BaseOptionsFieldOptions } from '../BaseOptionsField';
5
4
  import { SerializedSelectField } from './typings';
6
- /**
7
- * The options passed to the constructor of SelectField.
8
- */
9
- export type SelectFieldOptions = Omit<BaseSelectFieldOptions<SelectFieldOptionValue, "select">, "type">;
10
- export declare const emptySelectField: {
11
- type: string;
12
- options: never[];
13
- label: string;
14
- description: string;
15
- required: boolean;
5
+ export type SelectFieldOptions = BaseOptionsFieldOptions<string | null> & {
6
+ placeholder?: string;
16
7
  };
17
- export declare class SelectField extends BaseSelectField<SelectFieldOptionValue, "select"> {
8
+ export declare class SelectField extends BaseOptionsField<"select", string | null, string | null, SelectField> {
9
+ readonly type = "select";
18
10
  static readonly fieldTypeName = "Dropdown";
19
11
  static readonly fieldTypeDescription = "Allows the user to select a single option from a list of options.";
20
- static Icon: typeof RiMenuFoldLine;
12
+ placeholder?: string;
21
13
  constructor(options: SelectFieldOptions);
22
14
  serialize(): SerializedSelectField;
23
- static deserialize(data: ISerializedField): SelectField;
24
- getInput(props: GetInputProps<this>): ReactNode;
15
+ getOptions(): SelectFieldOptions;
16
+ duplicate(identifier: string): SelectField;
17
+ setOptions(options: Partial<SelectFieldOptions>): void;
18
+ static deserialize(data: SerializedSelectField): SelectField;
19
+ serializeValue(value: string | null): string | null;
20
+ deserializeValue(value: string | null): string | null;
21
+ render(props: FieldRenderProps): ReactNode;
22
+ isSerializedValueValid(value: unknown): value is string | null;
23
+ isValueValid(value: unknown): value is string | null;
24
+ blankValue(): string | null;
25
+ areValuesEqual(value1: string | null, value2: string | null): boolean;
25
26
  }
@@ -1,3 +1,7 @@
1
- import { ComponentProps } from '../typings';
1
+ import { FieldRenderProps } from '../BaseFormElement';
2
2
  import { SelectField } from './SelectField';
3
- export declare const SelectInput: import('react').MemoExoticComponent<(props: ComponentProps<SelectField>) => import("react/jsx-runtime").JSX.Element>;
3
+ interface SelectInputProps extends FieldRenderProps {
4
+ field: SelectField;
5
+ }
6
+ export declare const SelectInput: import('react').NamedExoticComponent<SelectInputProps>;
7
+ export {};
@@ -1,7 +1,4 @@
1
- import { BaseSerializedField } from '../BaseField';
2
- import { SelectFieldOption } from '../BaseSelectField';
3
- export interface SerializedSelectField extends BaseSerializedField {
4
- type: "select";
5
- options: SelectFieldOption[];
1
+ import { BaseSerializedSelectField } from '../BaseOptionsField';
2
+ export interface SerializedSelectField extends BaseSerializedSelectField<"select"> {
6
3
  placeholder?: string;
7
4
  }
@@ -1,26 +1,18 @@
1
1
  import { ReactNode } from 'react';
2
- import { RiInputField } from 'react-icons/ri';
3
- import { StringOrTextField, StringOrTextFieldOptions } from '../StringOrTextField';
4
- import { GetInputProps, ISerializedField } from '../typings';
5
- import { SerializedStringField, StringInputType } from './typings';
6
- export interface StringFieldOptions extends Omit<StringOrTextFieldOptions, "type"> {
7
- inputType?: StringInputType;
2
+ import { FieldRenderProps } from '../BaseFormElement';
3
+ import { BaseStringField, BaseStringFieldOptions } from '../BaseStringField';
4
+ import { SerializedStringField } from './typings';
5
+ export interface StringFieldOptions extends BaseStringFieldOptions {
8
6
  }
9
- export declare const emptyStringField: {
10
- type: string;
11
- maximum_length: number;
12
- input_type: string;
13
- label: string;
14
- description: string;
15
- required: boolean;
16
- };
17
- export declare class StringField extends StringOrTextField<"string"> {
7
+ export declare class StringField extends BaseStringField<"string", StringField> {
8
+ readonly type = "string";
18
9
  static readonly fieldTypeName = "Short Text";
19
10
  static readonly fieldTypeDescription = "Short text fields can hold up to 500 characters on a single line.";
20
- readonly inputType: StringInputType;
21
- static Icon: typeof RiInputField;
22
11
  constructor(options: StringFieldOptions);
23
12
  serialize(): SerializedStringField;
24
- static deserialize(data: ISerializedField): StringField;
25
- getInput(props: GetInputProps<this>): ReactNode;
13
+ getOptions(): StringFieldOptions;
14
+ duplicate(identifier: string): StringField;
15
+ setOptions(options: Partial<StringFieldOptions>): void;
16
+ static deserialize(data: SerializedStringField): StringField;
17
+ render(props: FieldRenderProps): ReactNode;
26
18
  }
@@ -1,3 +1,7 @@
1
- import { ComponentProps } from '../typings';
1
+ import { FieldRenderProps } from '../BaseFormElement';
2
2
  import { StringField } from './StringField';
3
- export declare const StringInput: import('react').MemoExoticComponent<(props: ComponentProps<StringField>) => import("react/jsx-runtime").JSX.Element>;
3
+ interface StringInputProps extends FieldRenderProps {
4
+ field: StringField;
5
+ }
6
+ export declare const StringInput: import('react').NamedExoticComponent<StringInputProps>;
7
+ export {};
@@ -1,7 +1,3 @@
1
- import { HTMLInputTypeAttribute } from 'react';
2
- import { BaseSerializedStringField } from '../StringOrTextField';
3
- export type StringInputType = Exclude<HTMLInputTypeAttribute, "checkbox" | "number" | "button">;
4
- export interface SerializedStringField extends BaseSerializedStringField {
5
- type: "string";
6
- input_type?: StringInputType;
1
+ import { BaseSerializedStringField } from '../BaseStringField';
2
+ export interface SerializedStringField extends BaseSerializedStringField<"string"> {
7
3
  }
@@ -1,22 +1,17 @@
1
1
  import { ReactNode } from 'react';
2
- import { RiAlignJustify } from 'react-icons/ri';
3
- import { StringOrTextField, StringOrTextFieldOptions } from '../StringOrTextField';
4
- import { GetInputProps, ISerializedField } from '../typings';
2
+ import { FieldRenderProps } from '../BaseFormElement';
3
+ import { BaseStringField, BaseStringFieldOptions } from '../BaseStringField';
5
4
  import { SerializedTextField } from './typings';
6
- export type TextFieldOptions = Omit<StringOrTextFieldOptions, "type">;
7
- export declare const emptyTextField: {
8
- type: string;
9
- maximum_length: number;
10
- label: string;
11
- description: string;
12
- required: boolean;
13
- };
14
- export declare class TextField extends StringOrTextField<"text"> {
5
+ export type TextFieldOptions = BaseStringFieldOptions;
6
+ export declare class TextField extends BaseStringField<"text", TextField> {
7
+ readonly type = "text";
15
8
  static readonly fieldTypeName = "Paragraph";
16
9
  static readonly fieldTypeDescription = "Paragraph fields can hold up to 10000 characters and can have multiple lines.";
17
- static Icon: typeof RiAlignJustify;
18
10
  constructor(options: TextFieldOptions);
19
11
  serialize(): SerializedTextField;
20
- static deserialize(data: ISerializedField): TextField;
21
- getInput(props: GetInputProps<this>): ReactNode;
12
+ getOptions(): TextFieldOptions;
13
+ duplicate(identifier: string): TextField;
14
+ setOptions(options: Partial<TextFieldOptions>): void;
15
+ static deserialize(data: SerializedTextField): TextField;
16
+ render(props: FieldRenderProps): ReactNode;
22
17
  }