@overmap-ai/forms 1.0.32-react-flow-david.1 → 1.0.32-react-flow-david-fixes.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 (205) hide show
  1. package/dist/form/builder/Root.d.ts +13 -0
  2. package/dist/form/builder/{FieldBuilder.d.ts → components/FieldBuilder.d.ts} +3 -3
  3. package/dist/form/builder/components/FieldDropdownMenu.d.ts +9 -0
  4. package/dist/form/builder/components/FieldSectionBuilder.d.ts +5 -0
  5. package/dist/form/builder/components/FieldSectionDropdownMenu.d.ts +9 -0
  6. package/dist/form/builder/{FieldSectionWithActions.d.ts → components/FieldSectionWithActions.d.ts} +2 -5
  7. package/dist/form/builder/{FieldWithActions.d.ts → components/FieldWithActions.d.ts} +4 -3
  8. package/dist/form/builder/components/index.d.ts +6 -0
  9. package/dist/form/builder/constants.d.ts +3 -18
  10. package/dist/form/builder/context.d.ts +1 -1
  11. package/dist/form/builder/flow/FieldSectionConditionEdge.d.ts +3 -0
  12. package/dist/form/builder/flow/FieldSectionNode.d.ts +3 -0
  13. package/dist/form/builder/flow/FlowBuilder.d.ts +1 -0
  14. package/dist/form/builder/flow/constants.d.ts +3 -0
  15. package/dist/form/builder/flow/index.d.ts +2 -0
  16. package/dist/form/builder/flow/layout.d.ts +2 -0
  17. package/dist/form/builder/flow/typings.d.ts +14 -0
  18. package/dist/form/builder/hooks.d.ts +3 -3
  19. package/dist/form/builder/index.d.ts +8 -1
  20. package/dist/form/builder/list/FieldSectionConditionalItem.d.ts +7 -0
  21. package/dist/form/builder/list/ListBuilder.d.ts +1 -0
  22. package/dist/form/builder/list/index.d.ts +1 -0
  23. package/dist/form/builder/preview/Preview.d.ts +4 -0
  24. package/dist/form/builder/preview/index.d.ts +1 -0
  25. package/dist/form/builder/utils.d.ts +4 -25
  26. package/dist/form/conditions/BaseCondition/BaseCondition.d.ts +29 -0
  27. package/dist/form/conditions/BaseCondition/index.d.ts +2 -0
  28. package/dist/form/conditions/BaseCondition/typings.d.ts +18 -0
  29. package/dist/form/conditions/BooleanFieldCondition/BooleanFieldCondition.d.ts +17 -0
  30. package/dist/form/conditions/BooleanFieldCondition/BooleanFieldConditionCell.d.ts +6 -0
  31. package/dist/form/conditions/BooleanFieldCondition/index.d.ts +3 -0
  32. package/dist/form/conditions/BooleanFieldCondition/typings.d.ts +4 -0
  33. package/dist/form/conditions/CheckboxListFieldCondition/CheckboxListFieldCondition.d.ts +20 -0
  34. package/dist/form/conditions/CheckboxListFieldCondition/CheckboxListFieldConditionCell.d.ts +6 -0
  35. package/dist/form/conditions/CheckboxListFieldCondition/index.d.ts +3 -0
  36. package/dist/form/conditions/CheckboxListFieldCondition/typings.d.ts +4 -0
  37. package/dist/form/conditions/DateFieldCondition/DateFieldCondition.d.ts +22 -0
  38. package/dist/form/conditions/DateFieldCondition/DateFieldConditionCell.d.ts +6 -0
  39. package/dist/form/conditions/DateFieldCondition/index.d.ts +3 -0
  40. package/dist/form/conditions/DateFieldCondition/typings.d.ts +4 -0
  41. package/dist/form/conditions/MultiSelectFieldCondition/MultiSelectFieldCondition.d.ts +28 -0
  42. package/dist/form/conditions/MultiSelectFieldCondition/MultiSelectFieldConditionCell.d.ts +6 -0
  43. package/dist/form/conditions/MultiSelectFieldCondition/index.d.ts +3 -0
  44. package/dist/form/conditions/MultiSelectFieldCondition/typings.d.ts +4 -0
  45. package/dist/form/conditions/MultiStringFieldCondition/MultiStringFieldCondition.d.ts +20 -0
  46. package/dist/form/conditions/MultiStringFieldCondition/MultiStringFieldConditionCell.d.ts +6 -0
  47. package/dist/form/conditions/MultiStringFieldCondition/index.d.ts +3 -0
  48. package/dist/form/conditions/MultiStringFieldCondition/typings.d.ts +4 -0
  49. package/dist/form/conditions/NumberFieldCondition/NumberFieldCondition.d.ts +34 -0
  50. package/dist/form/conditions/NumberFieldCondition/NumberFieldConditionCell.d.ts +6 -0
  51. package/dist/form/conditions/NumberFieldCondition/index.d.ts +3 -0
  52. package/dist/form/conditions/NumberFieldCondition/typings.d.ts +4 -0
  53. package/dist/form/conditions/RadioFieldCondition/RadioFieldCondition.d.ts +19 -0
  54. package/dist/form/conditions/RadioFieldCondition/RadioFieldConditionCell.d.ts +6 -0
  55. package/dist/form/conditions/RadioFieldCondition/index.d.ts +3 -0
  56. package/dist/form/conditions/RadioFieldCondition/typings.d.ts +4 -0
  57. package/dist/form/conditions/ScanFieldCondition/ScanFieldCondition.d.ts +19 -0
  58. package/dist/form/conditions/ScanFieldCondition/ScanFieldConditionCell.d.ts +6 -0
  59. package/dist/form/conditions/ScanFieldCondition/index.d.ts +3 -0
  60. package/dist/form/conditions/ScanFieldCondition/typings.d.ts +4 -0
  61. package/dist/form/conditions/SelectFieldCondition/SelectFieldCondition.d.ts +19 -0
  62. package/dist/form/conditions/SelectFieldCondition/SelectFieldConditionCell.d.ts +6 -0
  63. package/dist/form/conditions/SelectFieldCondition/index.d.ts +3 -0
  64. package/dist/form/conditions/SelectFieldCondition/typings.d.ts +4 -0
  65. package/dist/form/conditions/StringFieldCondition/StringFieldCondition.d.ts +19 -0
  66. package/dist/form/conditions/StringFieldCondition/StringFieldConditionCell.d.ts +6 -0
  67. package/dist/form/conditions/StringFieldCondition/index.d.ts +3 -0
  68. package/dist/form/conditions/StringFieldCondition/typings.d.ts +4 -0
  69. package/dist/form/conditions/TextFieldCondition/TextFieldCondition.d.ts +20 -0
  70. package/dist/form/conditions/TextFieldCondition/TextFieldConditionCell.d.ts +6 -0
  71. package/dist/form/conditions/TextFieldCondition/index.d.ts +3 -0
  72. package/dist/form/conditions/TextFieldCondition/typings.d.ts +4 -0
  73. package/dist/form/conditions/UploadFieldCondition/UploadFieldCondition.d.ts +17 -0
  74. package/dist/form/conditions/UploadFieldCondition/UploadFieldConditionCell.d.ts +6 -0
  75. package/dist/form/conditions/UploadFieldCondition/index.d.ts +3 -0
  76. package/dist/form/conditions/UploadFieldCondition/typings.d.ts +4 -0
  77. package/dist/form/conditions/components/ConditionModifierDropdown.d.ts +4 -8
  78. package/dist/form/conditions/components/RemoveConditionButton.d.ts +8 -6
  79. package/dist/form/conditions/components/index.d.ts +7 -0
  80. package/dist/form/conditions/index.d.ts +15 -1
  81. package/dist/form/conditions/typings.d.ts +25 -13
  82. package/dist/form/conditions/utils.d.ts +19 -2
  83. package/dist/form/fields/BaseField/BaseField.d.ts +17 -48
  84. package/dist/form/fields/BaseField/hooks.d.ts +21 -17
  85. package/dist/form/fields/BaseField/typings.d.ts +9 -17
  86. package/dist/form/fields/BaseFormElement/BaseFormElement.d.ts +14 -0
  87. package/dist/form/fields/BaseFormElement/index.d.ts +2 -0
  88. package/dist/form/fields/BaseFormElement/typings.d.ts +9 -0
  89. package/dist/form/fields/BaseOptionsField/BaseOptionsField.d.ts +18 -0
  90. package/dist/form/fields/BaseOptionsField/index.d.ts +2 -0
  91. package/dist/form/fields/BaseOptionsField/typings.d.ts +9 -0
  92. package/dist/form/fields/BaseStringField/BaseStringField.d.ts +25 -0
  93. package/dist/form/fields/BaseStringField/index.d.ts +2 -0
  94. package/dist/form/fields/{StringOrTextField → BaseStringField}/typings.d.ts +1 -1
  95. package/dist/form/fields/BooleanField/BooleanField.d.ts +15 -23
  96. package/dist/form/fields/BooleanField/BooleanInput.d.ts +5 -1
  97. package/dist/form/fields/BooleanField/typings.d.ts +1 -2
  98. package/dist/form/fields/CheckboxListField/CheckboxListField.d.ts +12 -33
  99. package/dist/form/fields/CheckboxListField/CheckboxListInput.d.ts +5 -1
  100. package/dist/form/fields/CheckboxListField/typings.d.ts +2 -3
  101. package/dist/form/fields/DateField/DateField.d.ts +19 -23
  102. package/dist/form/fields/DateField/DateInput.d.ts +5 -1
  103. package/dist/form/fields/DateField/typings.d.ts +1 -2
  104. package/dist/form/fields/FieldSection/FieldSection.d.ts +38 -21
  105. package/dist/form/fields/FieldSection/FieldSectionLayout.d.ts +5 -4
  106. package/dist/form/fields/FieldSection/typings.d.ts +9 -7
  107. package/dist/form/fields/MultiSelectField/MultiSelectField.d.ts +15 -29
  108. package/dist/form/fields/MultiSelectField/MultiSelectInput.d.ts +4 -1
  109. package/dist/form/fields/MultiSelectField/typings.d.ts +2 -5
  110. package/dist/form/fields/MultiStringField/MultiStringField.d.ts +18 -38
  111. package/dist/form/fields/MultiStringField/MultiStringInput.d.ts +5 -5
  112. package/dist/form/fields/MultiStringField/typings.d.ts +5 -3
  113. package/dist/form/fields/NumberField/NumberField.d.ts +20 -34
  114. package/dist/form/fields/NumberField/NumberInput.d.ts +5 -1
  115. package/dist/form/fields/NumberField/typings.d.ts +1 -2
  116. package/dist/form/fields/RadioField/RadioField.d.ts +13 -33
  117. package/dist/form/fields/RadioField/RadioInput.d.ts +5 -1
  118. package/dist/form/fields/RadioField/typings.d.ts +2 -3
  119. package/dist/form/fields/ScanField/ScanField.d.ts +14 -23
  120. package/dist/form/fields/ScanField/ScanInput.d.ts +4 -1
  121. package/dist/form/fields/ScanField/typings.d.ts +1 -2
  122. package/dist/form/fields/SelectField/SelectField.d.ts +14 -27
  123. package/dist/form/fields/SelectField/SelectInput.d.ts +5 -1
  124. package/dist/form/fields/SelectField/typings.d.ts +2 -5
  125. package/dist/form/fields/StringField/StringField.d.ts +11 -21
  126. package/dist/form/fields/StringField/StringInput.d.ts +5 -1
  127. package/dist/form/fields/StringField/typings.d.ts +2 -6
  128. package/dist/form/fields/TextField/TextField.d.ts +10 -17
  129. package/dist/form/fields/TextField/TextInput.d.ts +5 -1
  130. package/dist/form/fields/TextField/typings.d.ts +2 -3
  131. package/dist/form/fields/UploadField/UploadField.d.ts +17 -29
  132. package/dist/form/fields/UploadField/UploadInput.d.ts +5 -1
  133. package/dist/form/fields/UploadField/typings.d.ts +1 -2
  134. package/dist/form/fields/constants.d.ts +3 -91
  135. package/dist/form/fields/hooks.d.ts +4 -4
  136. package/dist/form/fields/index.d.ts +4 -3
  137. package/dist/form/fields/typings.d.ts +36 -30
  138. package/dist/form/fields/utils.d.ts +10 -15
  139. package/dist/form/index.d.ts +1 -1
  140. package/dist/form/{conditions/modifiers → modifiers}/boolean.d.ts +1 -1
  141. package/dist/form/{conditions/modifier → modifiers}/conditionModifier.d.ts +3 -3
  142. package/dist/form/modifiers/date.d.ts +9 -0
  143. package/dist/form/{conditions/modifiers → modifiers}/file.d.ts +1 -1
  144. package/dist/form/{conditions/modifiers → modifiers}/index.d.ts +3 -0
  145. package/dist/form/{conditions/modifiers → modifiers}/number.d.ts +4 -1
  146. package/dist/form/{conditions/modifiers → modifiers}/string.d.ts +1 -1
  147. package/dist/form/modifiers/typings.d.ts +11 -0
  148. package/dist/form/modifiers/utils.d.ts +2 -0
  149. package/dist/form/observable/Observable.d.ts +5 -0
  150. package/dist/form/renderer/{FormRenderer/FormRenderer.d.ts → FormRenderer.d.ts} +4 -4
  151. package/dist/form/renderer/constants.d.ts +2 -0
  152. package/dist/form/renderer/context.d.ts +2 -7
  153. package/dist/form/renderer/index.d.ts +1 -2
  154. package/dist/form/schema/FieldSchema.d.ts +16 -0
  155. package/dist/form/schema/context.d.ts +2 -0
  156. package/dist/form/schema/index.d.ts +1 -0
  157. package/dist/form/typings.d.ts +6 -19
  158. package/dist/form/utils.d.ts +5 -5
  159. package/dist/forms.js +25675 -16112
  160. package/dist/forms.umd.cjs +35993 -62
  161. package/package.json +7 -5
  162. package/dist/form/builder/DropDispatch.d.ts +0 -27
  163. package/dist/form/builder/FieldActions.d.ts +0 -13
  164. package/dist/form/builder/FieldSectionBuilder.d.ts +0 -9
  165. package/dist/form/builder/FieldSectionConditionEdge.d.ts +0 -4
  166. package/dist/form/builder/FieldSectionConditionMenu.d.ts +0 -10
  167. package/dist/form/builder/FieldSectionConditionalItem.d.ts +0 -11
  168. package/dist/form/builder/FieldSectionNode.d.ts +0 -16
  169. package/dist/form/builder/FieldsEditor.d.ts +0 -1
  170. package/dist/form/builder/FormBuilder.d.ts +0 -26
  171. package/dist/form/builder/flow/CustomNode.d.ts +0 -1
  172. package/dist/form/builder/flow/FlowEditor.d.ts +0 -1
  173. package/dist/form/builder/flow/NodeSectionEditor.d.ts +0 -5
  174. package/dist/form/builder/flow/SectionSidePanel.d.ts +0 -5
  175. package/dist/form/conditions/components/BooleanFieldConditionCell.d.ts +0 -5
  176. package/dist/form/conditions/components/CheckboxListFieldConditionCell.d.ts +0 -5
  177. package/dist/form/conditions/components/DateFieldConditionCell.d.ts +0 -5
  178. package/dist/form/conditions/components/MultiSelectFieldConditionCell.d.ts +0 -5
  179. package/dist/form/conditions/components/MultiStringFieldConditionCell.d.ts +0 -5
  180. package/dist/form/conditions/components/NumberFieldConditionCell.d.ts +0 -5
  181. package/dist/form/conditions/components/RadioFieldConditionCell.d.ts +0 -5
  182. package/dist/form/conditions/components/ScanFieldConditionCell.d.ts +0 -5
  183. package/dist/form/conditions/components/SelectFieldConditionCell.d.ts +0 -5
  184. package/dist/form/conditions/components/StringFieldConditionCell.d.ts +0 -5
  185. package/dist/form/conditions/components/TextFieldConditionCell.d.ts +0 -5
  186. package/dist/form/conditions/components/UploadFieldConditionCell.d.ts +0 -5
  187. package/dist/form/conditions/condition/condition.d.ts +0 -26
  188. package/dist/form/conditions/condition/index.d.ts +0 -1
  189. package/dist/form/conditions/condition/typings.d.ts +0 -16
  190. package/dist/form/conditions/hooks.d.ts +0 -10
  191. package/dist/form/conditions/manager/conditionManager.d.ts +0 -24
  192. package/dist/form/conditions/manager/index.d.ts +0 -2
  193. package/dist/form/conditions/manager/typings.d.ts +0 -1
  194. package/dist/form/conditions/modifiers/date.d.ts +0 -5
  195. package/dist/form/fields/BaseSelectField/BaseSelectField.d.ts +0 -35
  196. package/dist/form/fields/BaseSelectField/index.d.ts +0 -2
  197. package/dist/form/fields/BaseSelectField/typings.d.ts +0 -5
  198. package/dist/form/fields/StringOrTextField/StringOrTextField.d.ts +0 -42
  199. package/dist/form/fields/StringOrTextField/index.d.ts +0 -2
  200. package/dist/form/renderer/FormRenderer/constants.d.ts +0 -2
  201. package/dist/form/renderer/PatchForm/Field.d.ts +0 -17
  202. package/dist/form/renderer/PatchForm/Provider.d.ts +0 -28
  203. package/dist/form/renderer/PatchForm/index.d.ts +0 -2
  204. package/dist/forms.css +0 -1
  205. /package/dist/form/builder/{FieldSettingsPopover.d.ts → components/FieldSettingsPopover.d.ts} +0 -0
@@ -0,0 +1,19 @@
1
+ import { ReactNode } from 'react';
2
+ import { RadioField } from '../../fields';
3
+ import { BaseCondition, ConditionOptions, ConditionRenderProps } from '../BaseCondition';
4
+ import { RadioConditionModifiers, SerializedRadioCondition } from './typings';
5
+ export interface RadioFieldConditionOptions extends ConditionOptions<RadioField, string | string[], RadioConditionModifiers> {
6
+ }
7
+ export declare class RadioFieldCondition extends BaseCondition<RadioField, string | string[], string | string[], RadioConditionModifiers, RadioFieldCondition> {
8
+ readonly defaultConditionValue: undefined;
9
+ readonly defaultConditionModifier = "equals";
10
+ readonly modifiers: {
11
+ equals: import('../../modifiers').FieldConditionModifierConfig<string, string | string[], string | string[], string, string, string>;
12
+ notEquals: import('../../modifiers').FieldConditionModifierConfig<string, string | string[], string | string[], string, string, string>;
13
+ includes: import('../../modifiers').FieldConditionModifierConfig<string, string | string[], string | string[], string, string[], string[]>;
14
+ excludes: import('../../modifiers').FieldConditionModifierConfig<string, string | string[], string | string[], string, string[], string[]>;
15
+ };
16
+ constructor(options: RadioFieldConditionOptions);
17
+ static deserialize(serializedCondition: SerializedRadioCondition, field: RadioField): RadioFieldCondition;
18
+ render(props: ConditionRenderProps<RadioFieldCondition>): ReactNode;
19
+ }
@@ -0,0 +1,6 @@
1
+ import { BaseConditionCellProps } from '../BaseCondition';
2
+ import { RadioFieldCondition } from './RadioFieldCondition';
3
+ interface RadioFieldConditionCellProps extends BaseConditionCellProps<RadioFieldCondition> {
4
+ }
5
+ export declare const RadioFieldConditionCell: (props: RadioFieldConditionCellProps) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,3 @@
1
+ export * from './RadioFieldCondition';
2
+ export * from './RadioFieldConditionCell';
3
+ export type * from './typings';
@@ -0,0 +1,4 @@
1
+ import { RadioField, TypeOfField } from '../../fields';
2
+ import { SerializedCondition } from '../BaseCondition';
3
+ export type RadioConditionModifiers = "equals" | "notEquals" | "includes" | "excludes";
4
+ export type SerializedRadioCondition = SerializedCondition<TypeOfField<RadioField>, string | string[], RadioConditionModifiers>;
@@ -0,0 +1,19 @@
1
+ import { ReactNode } from 'react';
2
+ import { ScanField } from '../../fields';
3
+ import { BaseCondition, ConditionOptions, ConditionRenderProps } from '../BaseCondition';
4
+ import { ScanConditionModifiers, SerializedScanCondition } from './typings';
5
+ export interface ScanFieldConditionOptions extends ConditionOptions<ScanField, string, ScanConditionModifiers> {
6
+ }
7
+ export declare class ScanFieldCondition extends BaseCondition<ScanField, string, string, ScanConditionModifiers, ScanFieldCondition> {
8
+ readonly defaultConditionValue: undefined;
9
+ readonly defaultConditionModifier = "equals";
10
+ readonly modifiers: {
11
+ equals: import('../../modifiers').FieldConditionModifierConfig<string, string, string, string, string, string>;
12
+ notEquals: import('../../modifiers').FieldConditionModifierConfig<string, string, string, string, string, string>;
13
+ includes: import('../../modifiers').FieldConditionModifierConfig<string, string, string, string, string, string>;
14
+ excludes: import('../../modifiers').FieldConditionModifierConfig<string, string, string, string, string, string>;
15
+ };
16
+ constructor(options: ScanFieldConditionOptions);
17
+ static deserialize(serializedCondition: SerializedScanCondition, field: ScanField): ScanFieldCondition;
18
+ render(props: ConditionRenderProps<ScanFieldCondition>): ReactNode;
19
+ }
@@ -0,0 +1,6 @@
1
+ import { BaseConditionCellProps } from '../BaseCondition';
2
+ import { ScanFieldCondition } from './ScanFieldCondition';
3
+ interface ScanFieldConditionCellProps extends BaseConditionCellProps<ScanFieldCondition> {
4
+ }
5
+ export declare const ScanFieldConditionCell: (props: ScanFieldConditionCellProps) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,3 @@
1
+ export * from './ScanFieldCondition';
2
+ export * from './ScanFieldConditionCell';
3
+ export type * from './typings';
@@ -0,0 +1,4 @@
1
+ import { ScanField, TypeOfField } from '../../fields';
2
+ import { SerializedCondition } from '../BaseCondition';
3
+ export type ScanConditionModifiers = "equals" | "notEquals" | "includes" | "excludes";
4
+ export type SerializedScanCondition = SerializedCondition<TypeOfField<ScanField>, string, ScanConditionModifiers>;
@@ -0,0 +1,19 @@
1
+ import { ReactNode } from 'react';
2
+ import { SelectField } from '../../fields';
3
+ import { BaseCondition, ConditionOptions, ConditionRenderProps } from '../BaseCondition';
4
+ import { SelectConditionModifiers, SerializedSelectCondition } from './typings';
5
+ export interface SelectFieldConditionOptions extends ConditionOptions<SelectField, string | string[], SelectConditionModifiers> {
6
+ }
7
+ export declare class SelectFieldCondition extends BaseCondition<SelectField, string | string[], string | string[], SelectConditionModifiers, SelectFieldCondition> {
8
+ readonly defaultConditionValue: undefined;
9
+ readonly defaultConditionModifier = "equals";
10
+ readonly modifiers: {
11
+ equals: import('../../modifiers').FieldConditionModifierConfig<string, string | string[], string | string[], string, string, string>;
12
+ notEquals: import('../../modifiers').FieldConditionModifierConfig<string, string | string[], string | string[], string, string, string>;
13
+ includes: import('../../modifiers').FieldConditionModifierConfig<string, string | string[], string | string[], string, string[], string[]>;
14
+ excludes: import('../../modifiers').FieldConditionModifierConfig<string, string | string[], string | string[], string, string[], string[]>;
15
+ };
16
+ constructor(options: SelectFieldConditionOptions);
17
+ static deserialize(serializedCondition: SerializedSelectCondition, field: SelectField): SelectFieldCondition;
18
+ render(props: ConditionRenderProps<SelectFieldCondition>): ReactNode;
19
+ }
@@ -0,0 +1,6 @@
1
+ import { BaseConditionCellProps } from '../BaseCondition';
2
+ import { SelectFieldCondition } from './SelectFieldCondition';
3
+ interface SelectFieldConditionCellProps extends BaseConditionCellProps<SelectFieldCondition> {
4
+ }
5
+ export declare const SelectFieldConditionCell: (props: SelectFieldConditionCellProps) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,3 @@
1
+ export * from './SelectFieldCondition';
2
+ export * from './SelectFieldConditionCell';
3
+ export type * from './typings';
@@ -0,0 +1,4 @@
1
+ import { SelectField, TypeOfField } from '../../fields';
2
+ import { SerializedCondition } from '../BaseCondition';
3
+ export type SelectConditionModifiers = "equals" | "notEquals" | "includes" | "excludes";
4
+ export type SerializedSelectCondition = SerializedCondition<TypeOfField<SelectField>, string | string[], SelectConditionModifiers>;
@@ -0,0 +1,19 @@
1
+ import { ReactNode } from 'react';
2
+ import { StringField } from '../../fields';
3
+ import { BaseCondition, ConditionOptions, ConditionRenderProps } from '../BaseCondition';
4
+ import { SerializedStringCondition, StringConditionModifiers } from './typings';
5
+ export interface StringFieldConditionOptions extends ConditionOptions<StringField, string, StringConditionModifiers> {
6
+ }
7
+ export declare class StringFieldCondition extends BaseCondition<StringField, string, string, StringConditionModifiers, StringFieldCondition> {
8
+ readonly defaultConditionValue: undefined;
9
+ readonly defaultConditionModifier = "equals";
10
+ readonly modifiers: {
11
+ equals: import('../../modifiers').FieldConditionModifierConfig<string, string, string, string, string, string>;
12
+ notEquals: import('../../modifiers').FieldConditionModifierConfig<string, string, string, string, string, string>;
13
+ includes: import('../../modifiers').FieldConditionModifierConfig<string, string, string, string, string, string>;
14
+ excludes: import('../../modifiers').FieldConditionModifierConfig<string, string, string, string, string, string>;
15
+ };
16
+ constructor(options: StringFieldConditionOptions);
17
+ static deserialize(serializedCondition: SerializedStringCondition, field: StringField): StringFieldCondition;
18
+ render(props: ConditionRenderProps<StringFieldCondition>): ReactNode;
19
+ }
@@ -0,0 +1,6 @@
1
+ import { BaseConditionCellProps } from '../BaseCondition';
2
+ import { StringFieldCondition } from './StringFieldCondition';
3
+ interface StringFieldConditionCellProps extends BaseConditionCellProps<StringFieldCondition> {
4
+ }
5
+ export declare const StringFieldConditionCell: (props: StringFieldConditionCellProps) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,3 @@
1
+ export * from './StringFieldCondition';
2
+ export * from './StringFieldConditionCell';
3
+ export type * from './typings';
@@ -0,0 +1,4 @@
1
+ import { StringField, TypeOfField } from '../../fields';
2
+ import { SerializedCondition } from '../BaseCondition';
3
+ export type StringConditionModifiers = "equals" | "notEquals" | "includes" | "excludes";
4
+ export type SerializedStringCondition = SerializedCondition<TypeOfField<StringField>, string, StringConditionModifiers>;
@@ -0,0 +1,20 @@
1
+ import { ReactNode } from 'react';
2
+ import { TextField } from '../../fields';
3
+ import { BaseCondition, ConditionOptions, ConditionRenderProps } from '../BaseCondition';
4
+ import { SerializedTextCondition, TextConditionModifiers } from './typings';
5
+ export interface TextFieldConditionOptions extends ConditionOptions<TextField, string, TextConditionModifiers> {
6
+ field: TextField;
7
+ }
8
+ export declare class TextFieldCondition extends BaseCondition<TextField, string, string, TextConditionModifiers, TextFieldCondition> {
9
+ readonly defaultConditionValue: undefined;
10
+ readonly defaultConditionModifier = "equals";
11
+ readonly modifiers: {
12
+ equals: import('../../modifiers').FieldConditionModifierConfig<string, string, string, string, string, string>;
13
+ notEquals: import('../../modifiers').FieldConditionModifierConfig<string, string, string, string, string, string>;
14
+ includes: import('../../modifiers').FieldConditionModifierConfig<string, string, string, string, string, string>;
15
+ excludes: import('../../modifiers').FieldConditionModifierConfig<string, string, string, string, string, string>;
16
+ };
17
+ constructor(options: TextFieldConditionOptions);
18
+ static deserialize(serializedCondition: SerializedTextCondition, field: TextField): TextFieldCondition;
19
+ render(props: ConditionRenderProps<TextFieldCondition>): ReactNode;
20
+ }
@@ -0,0 +1,6 @@
1
+ import { BaseConditionCellProps } from '../BaseCondition';
2
+ import { TextFieldCondition } from './TextFieldCondition';
3
+ interface TextFieldConditionCellProps extends BaseConditionCellProps<TextFieldCondition> {
4
+ }
5
+ export declare const TextFieldConditionCell: (props: TextFieldConditionCellProps) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,3 @@
1
+ export * from './TextFieldCondition';
2
+ export * from './TextFieldConditionCell';
3
+ export type * from './typings';
@@ -0,0 +1,4 @@
1
+ import { TextField, TypeOfField } from '../../fields';
2
+ import { SerializedCondition } from '../BaseCondition';
3
+ export type TextConditionModifiers = "equals" | "notEquals" | "includes" | "excludes";
4
+ export type SerializedTextCondition = SerializedCondition<TypeOfField<TextField>, string, TextConditionModifiers>;
@@ -0,0 +1,17 @@
1
+ import { ReactNode } from 'react';
2
+ import { UploadField } from '../../fields';
3
+ import { BaseCondition, ConditionOptions, ConditionRenderProps } from '../BaseCondition';
4
+ import { SerializedUploadCondition, UploadConditionModifiers } from './typings';
5
+ export interface UploadFieldConditionOptions extends ConditionOptions<UploadField, boolean, UploadConditionModifiers> {
6
+ }
7
+ export declare class UploadFieldCondition extends BaseCondition<UploadField, boolean, boolean, UploadConditionModifiers, UploadFieldCondition> {
8
+ readonly defaultConditionValue: undefined;
9
+ readonly defaultConditionModifier = "equals";
10
+ readonly modifiers: {
11
+ equals: import('../../modifiers').FieldConditionModifierConfig<File[], boolean, boolean, File[], boolean, boolean>;
12
+ notEquals: import('../../modifiers').FieldConditionModifierConfig<File[], boolean, boolean, File[], boolean, boolean>;
13
+ };
14
+ constructor(options: UploadFieldConditionOptions);
15
+ static deserialize(serializedCondition: SerializedUploadCondition, field: UploadField): UploadFieldCondition;
16
+ render(props: ConditionRenderProps<UploadFieldCondition>): ReactNode;
17
+ }
@@ -0,0 +1,6 @@
1
+ import { BaseConditionCellProps } from '../BaseCondition';
2
+ import { UploadFieldCondition } from './UploadFieldCondition';
3
+ interface UploadFieldConditionCellProps extends BaseConditionCellProps<UploadFieldCondition> {
4
+ }
5
+ export declare const UploadFieldConditionCell: (props: UploadFieldConditionCellProps) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,3 @@
1
+ export type * from './typings';
2
+ export * from './UploadFieldCondition';
3
+ export * from './UploadFieldConditionCell';
@@ -0,0 +1,4 @@
1
+ import { TypeOfField, UploadField } from '../../fields';
2
+ import { SerializedCondition } from '../BaseCondition';
3
+ export type UploadConditionModifiers = "equals" | "notEquals";
4
+ export type SerializedUploadCondition = SerializedCondition<TypeOfField<UploadField>, boolean, UploadConditionModifiers>;
@@ -1,13 +1,9 @@
1
1
  import { MenuRootProps, MenuVariantProps } from '@overmap-ai/blocks';
2
2
  import { ReactElement } from 'react';
3
- import { AnyField } from '../../fields';
4
- import { Condition } from '../condition';
5
- import { ConditionModifiersOfField } from '../typings';
6
- interface ConditionModifierDropdownProps<TField extends AnyField> extends MenuVariantProps, MenuRootProps {
3
+ import { AnyCondition } from '../BaseCondition';
4
+ interface ConditionModifierDropdownProps<TCondition extends AnyCondition> extends MenuVariantProps, MenuRootProps {
7
5
  children: ReactElement;
8
- field: TField;
9
- condition: Condition<TField>;
10
- onModifierChange?: (modifierId: ConditionModifiersOfField<TField>) => void;
6
+ condition: TCondition;
11
7
  }
12
- export declare const ConditionModifierDropdown: <TFilterDef extends AnyField>(props: ConditionModifierDropdownProps<TFilterDef>) => import("react/jsx-runtime").JSX.Element;
8
+ export declare const ConditionModifierDropdown: <TCondition extends AnyCondition>(props: ConditionModifierDropdownProps<TCondition>) => import("react/jsx-runtime").JSX.Element;
13
9
  export {};
@@ -1,9 +1,11 @@
1
1
  import { ButtonProps } from '@overmap-ai/blocks';
2
- import { AnyCondition } from '../condition/typings';
3
- import { ConditionManager } from '../manager';
4
- interface RemoveConditionButtonProps extends Omit<ButtonProps, "children" | "onClick"> {
5
- condition: AnyCondition;
6
- conditionManager: ConditionManager;
2
+ import { AnyCondition } from '../BaseCondition/typings';
3
+ interface RemoveConditionButtonProps<TCondition extends AnyCondition> extends Omit<ButtonProps, "children" | "onClick"> {
4
+ condition: TCondition;
5
+ onClick: (condition: TCondition) => void;
7
6
  }
8
- export declare const RemoveConditionButton: import('react').NamedExoticComponent<RemoveConditionButtonProps>;
7
+ export declare const RemoveConditionButton: {
8
+ <TCondition extends AnyCondition>(props: RemoveConditionButtonProps<TCondition>): import("react/jsx-runtime").JSX.Element;
9
+ displayName: string;
10
+ };
9
11
  export {};
@@ -0,0 +1,7 @@
1
+ export * from './ConditionModifierDropdown';
2
+ export * from './constants';
3
+ export * from './DayPickerPopover';
4
+ export * from './RemoveConditionButton';
5
+ export * from './SelectFieldOptionMultiSelectGroup';
6
+ export * from './SelectFieldOptionSelectGroup';
7
+ export * from './TextInputPopover';
@@ -1 +1,15 @@
1
- export {};
1
+ export * from './BaseCondition';
2
+ export * from './BooleanFieldCondition';
3
+ export * from './CheckboxListFieldCondition';
4
+ export * from './DateFieldCondition';
5
+ export * from './MultiSelectFieldCondition';
6
+ export * from './MultiStringFieldCondition';
7
+ export * from './NumberFieldCondition';
8
+ export * from './RadioFieldCondition';
9
+ export * from './ScanFieldCondition';
10
+ export * from './SelectFieldCondition';
11
+ export * from './StringFieldCondition';
12
+ export * from './TextFieldCondition';
13
+ export type * from './typings';
14
+ export * from './UploadFieldCondition';
15
+ export * from './utils';
@@ -1,14 +1,26 @@
1
- import { ReactNode } from 'react';
2
- import { AnyField, BaseField } from '../fields';
3
- import { ConditionModifier } from './modifier/conditionModifier';
4
- export type ConditionModifierRenderFn<TConditionValue> = (conditionValue: TConditionValue) => ReactNode;
5
- export type ConditionModifierFn<TValue, TConditionValue> = (value: TValue, conditionValue: TConditionValue) => boolean;
6
- export interface FieldConditionModifierConfig<TFieldValue, TFieldConditionValue, TSerializedFieldConditionValue, TModifierValue extends TFieldValue, TModifierConditionValue extends TFieldConditionValue, TSerializedModifierConditionValue extends TSerializedFieldConditionValue> {
7
- modifier: ConditionModifier<TModifierValue, TModifierConditionValue, TSerializedModifierConditionValue>;
8
- isValueValid: (value: TFieldValue) => value is TModifierValue;
9
- isConditionValueValid: (conditionValue: TFieldConditionValue) => conditionValue is TModifierConditionValue;
1
+ import { AnyCondition } from './BaseCondition';
2
+ import { BooleanFieldCondition, SerializedBooleanCondition } from './BooleanFieldCondition';
3
+ import { CheckboxListFieldCondition, SerializedCheckboxListCondition } from './CheckboxListFieldCondition';
4
+ import { DateFieldCondition, SerializedDateCondition } from './DateFieldCondition';
5
+ import { MultiSelectFieldCondition, SerializedMultiSelectCondition } from './MultiSelectFieldCondition';
6
+ import { MultiStringFieldCondition, SerializedMultiStringCondition } from './MultiStringFieldCondition';
7
+ import { NumberFieldCondition, SerializedNumberCondition } from './NumberFieldCondition';
8
+ import { RadioFieldCondition, SerializedRadioCondition } from './RadioFieldCondition';
9
+ import { ScanFieldCondition, SerializedScanCondition } from './ScanFieldCondition';
10
+ import { SelectFieldCondition, SerializedSelectCondition } from './SelectFieldCondition';
11
+ import { SerializedStringCondition, StringFieldCondition } from './StringFieldCondition';
12
+ import { SerializedTextCondition, TextFieldCondition } from './TextFieldCondition';
13
+ import { SerializedUploadCondition, UploadFieldCondition } from './UploadFieldCondition';
14
+ export type Condition = BooleanFieldCondition | CheckboxListFieldCondition | DateFieldCondition | MultiSelectFieldCondition | MultiStringFieldCondition | NumberFieldCondition | RadioFieldCondition | ScanFieldCondition | SelectFieldCondition | StringFieldCondition | TextFieldCondition | UploadFieldCondition;
15
+ export type ISerializedCondition = SerializedTextCondition | SerializedBooleanCondition | SerializedNumberCondition | SerializedDateCondition | SerializedStringCondition | SerializedSelectCondition | SerializedMultiStringCondition | SerializedMultiSelectCondition | SerializedUploadCondition | SerializedScanCondition | SerializedRadioCondition | SerializedCheckboxListCondition;
16
+ export interface ConditionManager<TCondition extends AnyCondition> {
17
+ readonly conditions: Record<string, TCondition[]>;
18
+ getConditions(identifier: string): TCondition[];
19
+ addCondition(identifier: string, condition: TCondition): void;
20
+ addConditions(identifier: string, conditions: TCondition[]): void;
21
+ removeCondition(identifier: string, condition: TCondition): void;
22
+ removeConditions(identifier: string, conditions: TCondition[]): void;
23
+ getConditionals(): Set<string>;
24
+ addConditional(identifier: string): void;
25
+ removeConditional(identifier: string): void;
10
26
  }
11
- export type AnyConditionModifierConfig<TFieldValue, TFieldConditionValue, TSerializedFieldConditionValue> = FieldConditionModifierConfig<TFieldValue, TFieldConditionValue, TSerializedFieldConditionValue, any, // eslint-disable-line @typescript-eslint/no-explicit-any
12
- any, // eslint-disable-line @typescript-eslint/no-explicit-any
13
- any>;
14
- export type ConditionModifiersOfField<TFilterDef extends AnyField> = TFilterDef extends BaseField<infer _TIdentifier, infer _TValue, infer _TFilterValue, infer _TSerializedFilterValue> ? keyof TFilterDef["modifiers"] : never;
@@ -1,2 +1,19 @@
1
- import { FieldConditionModifierConfig } from './typings';
2
- export declare const createConditionModifierConfig: <TFieldValue, TFieldConditionValue, TSerializedFieldConditionValue, TModifierValue extends TFieldValue, TModifierConditionalValue extends TFieldConditionValue, TSerializedModifierConditionValue extends TSerializedFieldConditionValue>(conifg: FieldConditionModifierConfig<TFieldValue, TFieldConditionValue, TSerializedFieldConditionValue, TModifierValue, TModifierConditionalValue, TSerializedModifierConditionValue>) => FieldConditionModifierConfig<TFieldValue, TFieldConditionValue, TSerializedFieldConditionValue, TModifierValue, TModifierConditionalValue, TSerializedModifierConditionValue>;
1
+ import { Field } from '../fields';
2
+ import { FieldValues } from '../typings';
3
+ import { AnyCondition } from './BaseCondition';
4
+ import { BooleanFieldCondition } from './BooleanFieldCondition';
5
+ import { CheckboxListFieldCondition } from './CheckboxListFieldCondition';
6
+ import { DateFieldCondition } from './DateFieldCondition';
7
+ import { MultiSelectFieldCondition } from './MultiSelectFieldCondition';
8
+ import { MultiStringFieldCondition } from './MultiStringFieldCondition';
9
+ import { NumberFieldCondition } from './NumberFieldCondition';
10
+ import { RadioFieldCondition } from './RadioFieldCondition';
11
+ import { ScanFieldCondition } from './ScanFieldCondition';
12
+ import { SelectFieldCondition } from './SelectFieldCondition';
13
+ import { StringFieldCondition } from './StringFieldCondition';
14
+ import { TextFieldCondition } from './TextFieldCondition';
15
+ import { Condition, ISerializedCondition } from './typings';
16
+ import { UploadFieldCondition } from './UploadFieldCondition';
17
+ export declare const deserializeCondition: (serializedCondition: ISerializedCondition, field: Field) => BooleanFieldCondition | CheckboxListFieldCondition | DateFieldCondition | MultiSelectFieldCondition | MultiStringFieldCondition | NumberFieldCondition | RadioFieldCondition | ScanFieldCondition | SelectFieldCondition | StringFieldCondition | TextFieldCondition | UploadFieldCondition;
18
+ export declare const deserializeConditions: (serializedConditions: ISerializedCondition[], fields: Field[]) => Condition[];
19
+ export declare const applyConditions: (conditions: AnyCondition[], values: FieldValues) => boolean;
@@ -1,39 +1,18 @@
1
- import { ReactNode } from 'react';
2
- import { FormBuilderValues } from '../../builder';
3
- import { Condition } from '../../conditions/condition';
4
- import { CreateConditionConfig, SerializedCondition } from '../../conditions/condition/typings';
5
- import { AnyConditionModifierConfig } from '../../conditions/typings';
6
- import { FormValues } from '../../typings';
7
- import { FieldSection } from '../FieldSection';
8
- import { AnyField, FieldTypeIdentifier, FieldValue, GetInputProps, InputFieldLevelValidator, InputFormLevelValidator, ISerializedField, ISerializedOnlyField } from '../typings';
9
- import { BaseSerializedField, BaseSerializedObject, ConditionRenderProps, FieldOptions } from './typings';
10
- export declare abstract class BaseFormElement<TIdentifier extends FieldTypeIdentifier = FieldTypeIdentifier> {
11
- readonly type: TIdentifier;
12
- readonly identifier: string;
13
- readonly description: string | null;
14
- protected constructor(options: BaseSerializedObject);
15
- getId(): string;
16
- abstract getInput(props: GetInputProps<this>): ReactNode;
17
- static deserialize(_data: ISerializedField): AnyField | FieldSection;
18
- protected _serialize(): BaseSerializedObject<TIdentifier>;
19
- }
20
- export declare const emptyBaseField: {
21
- label: string;
22
- description: string;
23
- required: boolean;
24
- };
1
+ import { BaseFormElement } from '../BaseFormElement';
2
+ import { AnyField, FieldValidator } from '../typings';
3
+ import { BaseSerializedField, FieldOptions } from './typings';
25
4
  export interface FieldCreationSchemaObject {
26
5
  field: AnyField;
27
6
  showDirectly: boolean;
28
7
  }
29
- export declare abstract class BaseField<TIdentifier extends FieldTypeIdentifier, TValue extends FieldValue, TConditionValue, TSerializedConditionValue = TConditionValue> extends BaseFormElement<TIdentifier> {
8
+ export declare abstract class BaseField<TIdentifier extends string, TValue, TSerializedValue, This extends BaseField<TIdentifier, TValue, TSerializedValue, This>> extends BaseFormElement<TIdentifier, This> {
30
9
  static readonly fieldTypeName: string;
31
10
  static readonly fieldTypeDescription: string;
32
- readonly required: boolean;
33
- private readonly formValidators;
34
- private readonly fieldValidators;
35
- readonly label: string;
36
- readonly image: File | Promise<File> | undefined;
11
+ label: string;
12
+ description: string | null;
13
+ required: boolean;
14
+ private fieldValidators;
15
+ image: File | Promise<File> | undefined;
37
16
  /**
38
17
  * By default, validation doesn't execute on `onChange` events when editing fields
39
18
  * until the field has been `touched`. This can be overridden by setting this to `false`
@@ -42,23 +21,13 @@ export declare abstract class BaseField<TIdentifier extends FieldTypeIdentifier,
42
21
  */
43
22
  readonly onlyValidateAfterTouched: boolean;
44
23
  protected constructor(options: FieldOptions<TValue>);
45
- static getFieldCreationSchema(): FieldCreationSchemaObject[];
46
- protected isBlank(value: TValue | undefined): boolean;
24
+ isBlank(value: TValue | undefined): boolean;
47
25
  isEqual(value1: TValue | undefined, value2: TValue | undefined): boolean;
48
- getError(value: TValue | undefined, allValues?: FormValues | FormBuilderValues): string | undefined;
49
- protected _serialize(): BaseSerializedField<TIdentifier>;
50
- abstract serialize(): ISerializedOnlyField;
51
- getFieldValidators(): InputFieldLevelValidator<TValue>[];
52
- getFormValidators(): InputFormLevelValidator<TValue>[];
53
- encodeValueToJson(value: TValue): string;
54
- decodeJsonToValue(json: string): TValue;
55
- abstract readonly defaultConditionValue: TConditionValue | undefined;
56
- abstract readonly defaultConditionModifier: keyof typeof this.modifiers;
57
- abstract readonly modifiers: Record<string, AnyConditionModifierConfig<TValue, TConditionValue, TSerializedConditionValue>>;
58
- abstract renderCondition(props: ConditionRenderProps<BaseField<TIdentifier, TValue, TConditionValue, TSerializedConditionValue>>): ReactNode;
59
- getConditionModifier: (modifier: keyof typeof this.modifiers) => AnyConditionModifierConfig<TValue, TConditionValue, TSerializedConditionValue>;
60
- getConditionModifiers: () => [keyof typeof this.modifiers, AnyConditionModifierConfig<TValue, TConditionValue, TSerializedConditionValue>][];
61
- createCondition(config?: CreateConditionConfig<typeof this>): Condition<typeof this>;
62
- serializeCondition(condition: Condition<typeof this>): SerializedCondition<typeof this>;
63
- deserializeCondition(serializedFilter: SerializedCondition<typeof this>): Condition<typeof this>;
26
+ getError(value: TValue | undefined): string | undefined;
27
+ serialize(): BaseSerializedField<TIdentifier>;
28
+ getOptions(): FieldOptions<TValue>;
29
+ setOptions(options: Partial<FieldOptions<TValue>>): void;
30
+ abstract serializeValue(value: TValue): TSerializedValue;
31
+ abstract deserializeValue(value: TSerializedValue): TValue;
32
+ getFieldValidators(): FieldValidator<TValue>[];
64
33
  }
@@ -1,5 +1,7 @@
1
1
  import { AnyField, ComponentProps, ValueOfField } from '../typings';
2
- export declare const useFormikInput: <TField extends AnyField>(props: ComponentProps<TField>) => readonly [{
2
+ export declare const useFormikInput: <TField extends AnyField>(props: ComponentProps & {
3
+ field: TField;
4
+ }) => readonly [{
3
5
  readonly helpText: string | null;
4
6
  readonly size: import('@overmap-ai/blocks').TextSize | undefined;
5
7
  readonly severity: "danger" | undefined;
@@ -20,6 +22,7 @@ export declare const useFormikInput: <TField extends AnyField>(props: ComponentP
20
22
  readonly touched: boolean;
21
23
  }, {
22
24
  readonly "aria-labelledby": string;
25
+ readonly formId: string;
23
26
  readonly cite?: string | undefined;
24
27
  readonly data?: string | undefined;
25
28
  readonly form?: string | undefined;
@@ -43,6 +46,7 @@ export declare const useFormikInput: <TField extends AnyField>(props: ComponentP
43
46
  readonly draggable?: (boolean | "true" | "false") | undefined;
44
47
  readonly enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined;
45
48
  readonly hidden?: boolean | undefined;
49
+ readonly id?: string | undefined;
46
50
  readonly lang?: string | undefined;
47
51
  readonly nonce?: string | undefined;
48
52
  readonly spellCheck?: (boolean | "true" | "false") | undefined;
@@ -310,14 +314,29 @@ export declare const useFormikInput: <TField extends AnyField>(props: ComponentP
310
314
  readonly width?: number | string | undefined;
311
315
  readonly crossOrigin?: "" | "anonymous" | "use-credentials" | undefined;
312
316
  readonly href?: string | undefined;
317
+ readonly download?: any;
318
+ readonly rows?: number | undefined;
313
319
  readonly default?: boolean | undefined;
314
320
  readonly required?: boolean | undefined;
321
+ readonly placeholder?: string | undefined;
322
+ readonly minLength?: number | undefined;
323
+ readonly maxLength?: number | undefined;
324
+ readonly open?: boolean | undefined;
325
+ readonly loop?: boolean | undefined;
326
+ readonly disabled?: boolean | undefined;
327
+ readonly formAction?: string | undefined | ((formData: FormData) => void | Promise<void>) | import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS[keyof import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS];
328
+ readonly formEncType?: string | undefined;
329
+ readonly formMethod?: string | undefined;
330
+ readonly formNoValidate?: boolean | undefined;
331
+ readonly formTarget?: string | undefined;
332
+ readonly src?: string | undefined;
333
+ readonly alt?: string | undefined;
334
+ readonly htmlFor?: string | undefined;
315
335
  readonly accept?: string | undefined;
316
336
  readonly acceptCharset?: string | undefined;
317
337
  readonly action?: string | undefined | ((formData: FormData) => void | Promise<void>) | import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS[keyof import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS];
318
338
  readonly allowFullScreen?: boolean | undefined;
319
339
  readonly allowTransparency?: boolean | undefined;
320
- readonly alt?: string | undefined;
321
340
  readonly as?: string | undefined;
322
341
  readonly async?: boolean | undefined;
323
342
  readonly autoComplete?: string | undefined;
@@ -335,44 +354,30 @@ export declare const useFormikInput: <TField extends AnyField>(props: ComponentP
335
354
  readonly coords?: string | undefined;
336
355
  readonly dateTime?: string | undefined;
337
356
  readonly defer?: boolean | undefined;
338
- readonly disabled?: boolean | undefined;
339
- readonly download?: any;
340
357
  readonly encType?: string | undefined;
341
- readonly formAction?: string | undefined | ((formData: FormData) => void | Promise<void>) | import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS[keyof import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS];
342
- readonly formEncType?: string | undefined;
343
- readonly formMethod?: string | undefined;
344
- readonly formNoValidate?: boolean | undefined;
345
- readonly formTarget?: string | undefined;
346
358
  readonly frameBorder?: number | string | undefined;
347
359
  readonly headers?: string | undefined;
348
360
  readonly high?: number | undefined;
349
361
  readonly hrefLang?: string | undefined;
350
- readonly htmlFor?: string | undefined;
351
362
  readonly httpEquiv?: string | undefined;
352
363
  readonly integrity?: string | undefined;
353
364
  readonly keyParams?: string | undefined;
354
365
  readonly keyType?: string | undefined;
355
366
  readonly kind?: string | undefined;
356
- readonly loop?: boolean | undefined;
357
367
  readonly low?: number | undefined;
358
368
  readonly manifest?: string | undefined;
359
369
  readonly marginHeight?: number | undefined;
360
370
  readonly marginWidth?: number | undefined;
361
- readonly maxLength?: number | undefined;
362
371
  readonly mediaGroup?: string | undefined;
363
- readonly minLength?: number | undefined;
364
372
  readonly multiple?: boolean | undefined;
365
373
  readonly muted?: boolean | undefined;
366
374
  readonly noValidate?: boolean | undefined;
367
- readonly open?: boolean | undefined;
368
375
  readonly optimum?: number | undefined;
369
- readonly placeholder?: string | undefined;
370
376
  readonly playsInline?: boolean | undefined;
371
377
  readonly poster?: string | undefined;
372
378
  readonly preload?: string | undefined;
373
379
  readonly readOnly?: boolean | undefined;
374
380
  readonly reversed?: boolean | undefined;
375
- readonly rows?: number | undefined;
376
381
  readonly rowSpan?: number | undefined;
377
382
  readonly sandbox?: string | undefined;
378
383
  readonly scope?: string | undefined;
@@ -382,7 +387,6 @@ export declare const useFormikInput: <TField extends AnyField>(props: ComponentP
382
387
  readonly selected?: boolean | undefined;
383
388
  readonly shape?: string | undefined;
384
389
  readonly sizes?: string | undefined;
385
- readonly src?: string | undefined;
386
390
  readonly srcDoc?: string | undefined;
387
391
  readonly srcLang?: string | undefined;
388
392
  readonly srcSet?: string | undefined;
@@ -1,23 +1,15 @@
1
- import { Condition } from '../../conditions/condition';
2
- import { ConditionManager } from '../../conditions/manager';
3
- import { AnyField, FieldTypeIdentifier, InputFieldLevelValidator, InputFormLevelValidator } from '../typings';
4
- export interface BaseSerializedObject<TIdentifier extends FieldTypeIdentifier = FieldTypeIdentifier> {
1
+ import { BaseSerializedObject, FormElementOptions } from '../BaseFormElement';
2
+ import { FieldValidator } from '../typings';
3
+ export interface BaseSerializedField<TIdentifier extends string> extends BaseSerializedObject<TIdentifier> {
4
+ label: string;
5
5
  description?: string | null;
6
- identifier: string;
7
- type: TIdentifier;
6
+ required: boolean;
7
+ image?: File | Promise<File>;
8
8
  }
9
- export interface BaseSerializedField<TIdentifier extends FieldTypeIdentifier = FieldTypeIdentifier> extends BaseSerializedObject<TIdentifier> {
9
+ export interface FieldOptions<TValue> extends FormElementOptions {
10
10
  label: string;
11
+ description?: string | null;
11
12
  required: boolean;
12
13
  image?: File | Promise<File>;
13
- }
14
- export interface FieldOptions<TValue> extends BaseSerializedField {
15
- fieldValidators?: InputFieldLevelValidator<TValue>[];
16
- formValidators?: InputFormLevelValidator<TValue>[];
17
- }
18
- export type ChildFieldOptions<TValue> = Omit<FieldOptions<TValue>, "type">;
19
- export interface ConditionRenderProps<TField extends AnyField> {
20
- field: TField;
21
- condition: Condition<TField>;
22
- conditionManager: ConditionManager;
14
+ fieldValidators?: FieldValidator<TValue>[];
23
15
  }
@@ -0,0 +1,14 @@
1
+ import { ReactNode } from 'react';
2
+ import { Observable } from '../../observable/Observable';
3
+ import { ComponentProps } from '../typings';
4
+ import { BaseSerializedObject, FormElementOptions } from './typings';
5
+ export declare abstract class BaseFormElement<TIdentifier extends string, This extends BaseFormElement<TIdentifier, This>> extends Observable<This> {
6
+ abstract readonly type: TIdentifier;
7
+ identifier: string;
8
+ protected constructor(options: FormElementOptions);
9
+ getOptions(): FormElementOptions;
10
+ setOptions(options: Partial<FormElementOptions>): void;
11
+ abstract duplicate(identifier: string): BaseFormElement<TIdentifier, This>;
12
+ serialize(): BaseSerializedObject<TIdentifier>;
13
+ abstract render(props: ComponentProps): ReactNode;
14
+ }