envoc-form 4.1.0 → 5.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +236 -180
- package/es/AddressInput/AddressInput.d.ts +24 -25
- package/es/AddressInput/AddressInput.js +20 -31
- package/es/AddressInput/UsStates.d.ts +3 -3
- package/es/AddressInput/UsStates.js +53 -53
- package/es/ConfirmBaseForm/ConfirmBaseForm.d.ts +26 -26
- package/es/ConfirmBaseForm/ConfirmBaseForm.js +42 -42
- package/es/ConfirmDeleteForm/ConfirmDeleteForm.d.ts +24 -24
- package/es/ConfirmDeleteForm/ConfirmDeleteForm.js +60 -60
- package/es/DatePicker/DatePickerGroup.d.ts +13 -14
- package/es/DatePicker/DatePickerGroup.js +87 -87
- package/es/DatePicker/DatePickerHelper.d.ts +3 -3
- package/es/DatePicker/DatePickerHelper.js +1 -1
- package/es/DatePicker/StringDateOnlyPickerGroup.d.ts +9 -10
- package/es/DatePicker/StringDateOnlyPickerGroup.js +29 -29
- package/es/DatePicker/StringDatePickerGroup.d.ts +9 -10
- package/es/DatePicker/StringDatePickerGroup.js +24 -24
- package/es/Field/CustomFieldInputProps.d.ts +7 -7
- package/es/Field/CustomFieldInputProps.js +1 -1
- package/es/Field/CustomFieldMetaProps.d.ts +4 -4
- package/es/Field/CustomFieldMetaProps.js +1 -1
- package/es/Field/Field.d.ts +28 -28
- package/es/Field/Field.js +51 -51
- package/es/Field/FieldErrorScrollTarget.d.ts +2 -3
- package/es/Field/FieldErrorScrollTarget.js +12 -12
- package/es/Field/FieldNameContext.d.ts +3 -3
- package/es/Field/FieldNameContext.js +3 -3
- package/es/Field/FieldSection.d.ts +7 -7
- package/es/Field/FieldSection.js +9 -20
- package/es/Field/InjectedFieldProps.d.ts +7 -7
- package/es/Field/InjectedFieldProps.js +1 -1
- package/es/Field/StandAloneInput.d.ts +13 -13
- package/es/Field/StandAloneInput.js +50 -50
- package/es/Field/useStandardField.d.ts +21 -21
- package/es/Field/useStandardField.js +92 -92
- package/es/FieldArray/FieldArray.d.ts +24 -24
- package/es/FieldArray/FieldArray.js +77 -88
- package/es/File/FileGroup.d.ts +10 -10
- package/es/File/FileGroup.js +53 -53
- package/es/File/FileList.d.ts +5 -6
- package/es/File/FileList.js +10 -21
- package/es/File/humanFileSize.d.ts +1 -1
- package/es/File/humanFileSize.js +6 -6
- package/es/Form/FocusError.d.ts +7 -7
- package/es/Form/FocusError.js +42 -42
- package/es/Form/Form.d.ts +33 -33
- package/es/Form/Form.js +141 -141
- package/es/Form/FormBasedPreventNavigation.d.ts +6 -7
- package/es/Form/FormBasedPreventNavigation.js +20 -20
- package/es/Form/LegacyFormBasedPreventNavigation.d.ts +17 -17
- package/es/Form/LegacyFormBasedPreventNavigation.js +69 -69
- package/es/Form/NewFormBasedPreventNavigation.d.ts +14 -14
- package/es/Form/NewFormBasedPreventNavigation.js +39 -39
- package/es/Form/ServerErrorContext.d.ts +11 -11
- package/es/Form/ServerErrorContext.js +9 -9
- package/es/FormActions.d.ts +12 -13
- package/es/FormActions.js +16 -27
- package/es/FormDefaults.d.ts +4 -4
- package/es/FormDefaults.js +2 -2
- package/es/Group.d.ts +16 -16
- package/es/Group.js +14 -25
- package/es/Input/IconInputGroup.d.ts +12 -12
- package/es/Input/IconInputGroup.js +43 -43
- package/es/Input/InputGroup.d.ts +12 -12
- package/es/Input/InputGroup.js +34 -34
- package/es/Input/MoneyInputGroup.d.ts +9 -9
- package/es/Input/MoneyInputGroup.js +43 -43
- package/es/Input/NumberInputGroup.d.ts +9 -9
- package/es/Input/NumberInputGroup.js +43 -43
- package/es/Input/StringInputGroup.d.ts +8 -8
- package/es/Input/StringInputGroup.js +43 -43
- package/es/Normalization/NormalizationFunction.d.ts +4 -4
- package/es/Normalization/NormalizationFunction.js +1 -1
- package/es/Normalization/normalizers.d.ts +4 -4
- package/es/Normalization/normalizers.js +32 -32
- package/es/Select/BooleanSelectGroup.d.ts +7 -8
- package/es/Select/BooleanSelectGroup.js +28 -28
- package/es/Select/NumberSelectGroup.d.ts +9 -10
- package/es/Select/NumberSelectGroup.js +21 -21
- package/es/Select/SelectGroup.d.ts +27 -28
- package/es/Select/SelectGroup.js +65 -65
- package/es/Select/SelectGroupPropsHelper.d.ts +3 -3
- package/es/Select/SelectGroupPropsHelper.js +1 -1
- package/es/Select/StringSelectGroup.d.ts +9 -10
- package/es/Select/StringSelectGroup.js +21 -21
- package/es/StandardFormActions.d.ts +11 -11
- package/es/StandardFormActions.js +14 -25
- package/es/SubmitFormButton.d.ts +10 -10
- package/es/SubmitFormButton.js +40 -40
- package/es/TextArea/TextAreaGroup.d.ts +9 -9
- package/es/TextArea/TextAreaGroup.js +35 -35
- package/es/Validation/ValidatedApiResult.d.ts +6 -6
- package/es/Validation/ValidatedApiResult.js +1 -1
- package/es/Validation/ValidationError.d.ts +5 -5
- package/es/Validation/ValidationError.js +1 -1
- package/es/Validation/ValidationFunction.d.ts +4 -4
- package/es/Validation/ValidationFunction.js +1 -1
- package/es/Validation/validators.d.ts +18 -18
- package/es/Validation/validators.js +77 -77
- package/es/index.d.ts +73 -73
- package/es/index.js +50 -50
- package/es/setupTests.d.ts +1 -1
- package/es/setupTests.js +1 -1
- package/es/utils/objectContainsNonSerializableProperty.d.ts +1 -1
- package/es/utils/objectContainsNonSerializableProperty.js +14 -14
- package/es/utils/objectToFormData.d.ts +10 -10
- package/es/utils/objectToFormData.js +77 -77
- package/es/utils/typeChecks.d.ts +8 -8
- package/es/utils/typeChecks.js +18 -18
- package/lib/AddressInput/AddressInput.d.ts +24 -25
- package/lib/AddressInput/AddressInput.js +26 -37
- package/lib/AddressInput/UsStates.d.ts +3 -3
- package/lib/AddressInput/UsStates.js +55 -55
- package/lib/ConfirmBaseForm/ConfirmBaseForm.d.ts +26 -26
- package/lib/ConfirmBaseForm/ConfirmBaseForm.js +48 -48
- package/lib/ConfirmDeleteForm/ConfirmDeleteForm.d.ts +24 -24
- package/lib/ConfirmDeleteForm/ConfirmDeleteForm.js +66 -66
- package/lib/DatePicker/DatePickerGroup.d.ts +13 -14
- package/lib/DatePicker/DatePickerGroup.js +95 -95
- package/lib/DatePicker/DatePickerHelper.d.ts +3 -3
- package/lib/DatePicker/DatePickerHelper.js +2 -2
- package/lib/DatePicker/StringDateOnlyPickerGroup.d.ts +9 -10
- package/lib/DatePicker/StringDateOnlyPickerGroup.js +35 -35
- package/lib/DatePicker/StringDatePickerGroup.d.ts +9 -10
- package/lib/DatePicker/StringDatePickerGroup.js +30 -30
- package/lib/Field/CustomFieldInputProps.d.ts +7 -7
- package/lib/Field/CustomFieldInputProps.js +2 -2
- package/lib/Field/CustomFieldMetaProps.d.ts +4 -4
- package/lib/Field/CustomFieldMetaProps.js +2 -2
- package/lib/Field/Field.d.ts +28 -28
- package/lib/Field/Field.js +56 -56
- package/lib/Field/FieldErrorScrollTarget.d.ts +2 -3
- package/lib/Field/FieldErrorScrollTarget.js +15 -15
- package/lib/Field/FieldNameContext.d.ts +3 -3
- package/lib/Field/FieldNameContext.js +9 -9
- package/lib/Field/FieldSection.d.ts +7 -7
- package/lib/Field/FieldSection.js +12 -23
- package/lib/Field/InjectedFieldProps.d.ts +7 -7
- package/lib/Field/InjectedFieldProps.js +2 -2
- package/lib/Field/StandAloneInput.d.ts +13 -13
- package/lib/Field/StandAloneInput.js +76 -76
- package/lib/Field/useStandardField.d.ts +21 -21
- package/lib/Field/useStandardField.js +95 -95
- package/lib/FieldArray/FieldArray.d.ts +24 -24
- package/lib/FieldArray/FieldArray.js +83 -94
- package/lib/File/FileGroup.d.ts +10 -10
- package/lib/File/FileGroup.js +58 -58
- package/lib/File/FileList.d.ts +5 -6
- package/lib/File/FileList.js +13 -24
- package/lib/File/humanFileSize.d.ts +1 -1
- package/lib/File/humanFileSize.js +10 -10
- package/lib/Form/FocusError.d.ts +7 -7
- package/lib/Form/FocusError.js +48 -48
- package/lib/Form/Form.d.ts +33 -33
- package/lib/Form/Form.js +147 -147
- package/lib/Form/FormBasedPreventNavigation.d.ts +6 -7
- package/lib/Form/FormBasedPreventNavigation.js +26 -26
- package/lib/Form/LegacyFormBasedPreventNavigation.d.ts +17 -17
- package/lib/Form/LegacyFormBasedPreventNavigation.js +72 -72
- package/lib/Form/NewFormBasedPreventNavigation.d.ts +14 -14
- package/lib/Form/NewFormBasedPreventNavigation.js +42 -42
- package/lib/Form/ServerErrorContext.d.ts +11 -11
- package/lib/Form/ServerErrorContext.js +15 -15
- package/lib/FormActions.d.ts +12 -13
- package/lib/FormActions.js +22 -33
- package/lib/FormDefaults.d.ts +4 -4
- package/lib/FormDefaults.js +5 -5
- package/lib/Group.d.ts +16 -16
- package/lib/Group.js +20 -31
- package/lib/Input/IconInputGroup.d.ts +12 -12
- package/lib/Input/IconInputGroup.js +48 -48
- package/lib/Input/InputGroup.d.ts +12 -12
- package/lib/Input/InputGroup.js +39 -39
- package/lib/Input/MoneyInputGroup.d.ts +9 -9
- package/lib/Input/MoneyInputGroup.js +48 -48
- package/lib/Input/NumberInputGroup.d.ts +9 -9
- package/lib/Input/NumberInputGroup.js +48 -48
- package/lib/Input/StringInputGroup.d.ts +8 -8
- package/lib/Input/StringInputGroup.js +48 -48
- package/lib/Normalization/NormalizationFunction.d.ts +4 -4
- package/lib/Normalization/NormalizationFunction.js +2 -2
- package/lib/Normalization/normalizers.d.ts +4 -4
- package/lib/Normalization/normalizers.js +37 -37
- package/lib/Select/BooleanSelectGroup.d.ts +7 -8
- package/lib/Select/BooleanSelectGroup.js +35 -35
- package/lib/Select/NumberSelectGroup.d.ts +9 -10
- package/lib/Select/NumberSelectGroup.js +29 -29
- package/lib/Select/SelectGroup.d.ts +27 -28
- package/lib/Select/SelectGroup.js +71 -71
- package/lib/Select/SelectGroupPropsHelper.d.ts +3 -3
- package/lib/Select/SelectGroupPropsHelper.js +2 -2
- package/lib/Select/StringSelectGroup.d.ts +9 -10
- package/lib/Select/StringSelectGroup.js +29 -29
- package/lib/StandardFormActions.d.ts +11 -11
- package/lib/StandardFormActions.js +20 -31
- package/lib/SubmitFormButton.d.ts +10 -10
- package/lib/SubmitFormButton.js +45 -45
- package/lib/TextArea/TextAreaGroup.d.ts +9 -9
- package/lib/TextArea/TextAreaGroup.js +40 -40
- package/lib/Validation/ValidatedApiResult.d.ts +6 -6
- package/lib/Validation/ValidatedApiResult.js +2 -2
- package/lib/Validation/ValidationError.d.ts +5 -5
- package/lib/Validation/ValidationError.js +2 -2
- package/lib/Validation/ValidationFunction.d.ts +4 -4
- package/lib/Validation/ValidationFunction.js +2 -2
- package/lib/Validation/validators.d.ts +18 -18
- package/lib/Validation/validators.js +90 -90
- package/lib/index.d.ts +73 -73
- package/lib/index.js +117 -117
- package/lib/setupTests.d.ts +1 -1
- package/lib/setupTests.js +3 -3
- package/lib/utils/objectContainsNonSerializableProperty.d.ts +1 -1
- package/lib/utils/objectContainsNonSerializableProperty.js +17 -17
- package/lib/utils/objectToFormData.d.ts +10 -10
- package/lib/utils/objectToFormData.js +79 -79
- package/lib/utils/typeChecks.d.ts +8 -8
- package/lib/utils/typeChecks.js +29 -29
- package/package.json +12 -12
- package/src/AddressInput/__snapshots__/AddressInput.test.tsx.snap +6 -8
- package/src/Select/__tests__/__snapshots__/BooleanSelectGroup.test.tsx.snap +6 -8
- package/src/Select/__tests__/__snapshots__/NumberSelectGroup.test.tsx.snap +12 -16
- package/src/Select/__tests__/__snapshots__/StringSelectGroup.test.tsx.snap +12 -16
- package/src/utils/objectToFormData.test.tsx +1 -1
package/README.md
CHANGED
@@ -266,7 +266,9 @@ ___
|
|
266
266
|
|
267
267
|
Custom confirm button text.
|
268
268
|
|
269
|
-
**`
|
269
|
+
**`Default Value`**
|
270
|
+
|
271
|
+
`Confirm`
|
270
272
|
|
271
273
|
##### Defined in
|
272
274
|
|
@@ -425,7 +427,9 @@ ___
|
|
425
427
|
|
426
428
|
Custom message to display.
|
427
429
|
|
428
|
-
**`
|
430
|
+
**`Default Value`**
|
431
|
+
|
432
|
+
`Are you sure you want to delete this?`
|
429
433
|
|
430
434
|
##### Defined in
|
431
435
|
|
@@ -438,6 +442,8 @@ packages/envoc-form/src/ConfirmDeleteForm/ConfirmDeleteForm.tsx:19
|
|
438
442
|
|
439
443
|
## Interface: DatePickerGroupProps<T\>
|
440
444
|
|
445
|
+
Defines what is injected by a Field wrapper of some TRenderComponent
|
446
|
+
|
441
447
|
### Type parameters
|
442
448
|
|
443
449
|
| Name |
|
@@ -459,15 +465,12 @@ packages/envoc-form/src/ConfirmDeleteForm/ConfirmDeleteForm.tsx:19
|
|
459
465
|
#### Properties
|
460
466
|
|
461
467
|
- [className](#classname)
|
468
|
+
- [convert](#convert)
|
462
469
|
- [helpText](#helptext)
|
463
470
|
- [input](#input)
|
464
471
|
- [label](#label)
|
465
472
|
- [meta](#meta)
|
466
473
|
|
467
|
-
#### Methods
|
468
|
-
|
469
|
-
- [convert](#convert)
|
470
|
-
|
471
474
|
### Properties
|
472
475
|
|
473
476
|
#### className
|
@@ -486,6 +489,30 @@ packages/envoc-form/src/Group.tsx:8
|
|
486
489
|
|
487
490
|
___
|
488
491
|
|
492
|
+
#### convert
|
493
|
+
|
494
|
+
• **convert**: (`arg`: `Date`) => `T`
|
495
|
+
|
496
|
+
##### Type declaration
|
497
|
+
|
498
|
+
▸ (`arg`): `T`
|
499
|
+
|
500
|
+
###### Parameters
|
501
|
+
|
502
|
+
| Name | Type |
|
503
|
+
| :------ | :------ |
|
504
|
+
| `arg` | `Date` |
|
505
|
+
|
506
|
+
###### Returns
|
507
|
+
|
508
|
+
`T`
|
509
|
+
|
510
|
+
##### Defined in
|
511
|
+
|
512
|
+
packages/envoc-form/src/DatePicker/DatePickerGroup.tsx:18
|
513
|
+
|
514
|
+
___
|
515
|
+
|
489
516
|
#### helpText
|
490
517
|
|
491
518
|
• `Optional` **helpText**: `ReactNode`
|
@@ -544,26 +571,6 @@ ___
|
|
544
571
|
|
545
572
|
packages/envoc-form/src/Field/InjectedFieldProps.ts:7
|
546
573
|
|
547
|
-
### Methods
|
548
|
-
|
549
|
-
#### convert
|
550
|
-
|
551
|
-
▸ **convert**(`arg`): `T`
|
552
|
-
|
553
|
-
##### Parameters
|
554
|
-
|
555
|
-
| Name | Type |
|
556
|
-
| :------ | :------ |
|
557
|
-
| `arg` | `Date` |
|
558
|
-
|
559
|
-
##### Returns
|
560
|
-
|
561
|
-
`T`
|
562
|
-
|
563
|
-
##### Defined in
|
564
|
-
|
565
|
-
packages/envoc-form/src/DatePicker/DatePickerGroup.tsx:18
|
566
|
-
|
567
574
|
|
568
575
|
<a name="interfacesdatepickerhelpermd"></a>
|
569
576
|
|
@@ -680,6 +687,8 @@ packages/envoc-form/src/Field/InjectedFieldProps.ts:7
|
|
680
687
|
|
681
688
|
## Interface: FileGroupProps
|
682
689
|
|
690
|
+
Defines what is injected by a Field wrapper of some TRenderComponent
|
691
|
+
|
683
692
|
### Hierarchy
|
684
693
|
|
685
694
|
- [`InjectedFieldProps`](#interfacesinjectedfieldpropsmd)<`any` \| `undefined` \| ``null``\>
|
@@ -838,9 +847,6 @@ packages/envoc-form/src/Group.tsx:21
|
|
838
847
|
|
839
848
|
- [allowPristineSubmit](#allowpristinesubmit)
|
840
849
|
- [disabled](#disabled)
|
841
|
-
|
842
|
-
#### Methods
|
843
|
-
|
844
850
|
- [handleCancel](#handlecancel)
|
845
851
|
|
846
852
|
### Properties
|
@@ -867,17 +873,23 @@ Whether both buttons should be disabled.
|
|
867
873
|
|
868
874
|
packages/envoc-form/src/FormActions.tsx:13
|
869
875
|
|
870
|
-
|
876
|
+
___
|
871
877
|
|
872
878
|
#### handleCancel
|
873
879
|
|
874
|
-
|
880
|
+
• `Optional` **handleCancel**: () => `void`
|
881
|
+
|
882
|
+
##### Type declaration
|
883
|
+
|
884
|
+
▸ (): `void`
|
875
885
|
|
876
886
|
The cancel button's `onClick`.
|
877
887
|
|
878
|
-
**`
|
888
|
+
**`Default Value`**
|
879
889
|
|
880
|
-
|
890
|
+
`window.history.back()`
|
891
|
+
|
892
|
+
###### Returns
|
881
893
|
|
882
894
|
`void`
|
883
895
|
|
@@ -892,6 +904,8 @@ packages/envoc-form/src/FormActions.tsx:11
|
|
892
904
|
|
893
905
|
## Interface: GroupProps
|
894
906
|
|
907
|
+
Defines what is injected by a Field wrapper of some TRenderComponent
|
908
|
+
|
895
909
|
### Hierarchy
|
896
910
|
|
897
911
|
- [`InjectedFieldProps`](#interfacesinjectedfieldpropsmd)<`any`\>
|
@@ -1128,7 +1142,7 @@ ___
|
|
1128
1142
|
|
1129
1143
|
#### type
|
1130
1144
|
|
1131
|
-
• `Optional` **type**: ``"
|
1145
|
+
• `Optional` **type**: ``"color"`` \| ``"search"`` \| ``"text"`` \| ``"tel"`` \| ``"url"`` \| ``"email"``
|
1132
1146
|
|
1133
1147
|
##### Defined in
|
1134
1148
|
|
@@ -1199,6 +1213,8 @@ packages/envoc-form/src/Field/InjectedFieldProps.ts:7
|
|
1199
1213
|
|
1200
1214
|
## Interface: InputGroupProps<TValue\>
|
1201
1215
|
|
1216
|
+
Defines what is injected by a Field wrapper of some TRenderComponent
|
1217
|
+
|
1202
1218
|
### Type parameters
|
1203
1219
|
|
1204
1220
|
| Name |
|
@@ -1457,7 +1473,7 @@ ___
|
|
1457
1473
|
|
1458
1474
|
#### parseFunc
|
1459
1475
|
|
1460
|
-
• `Optional` **parseFunc**: (`string`: `string
|
1476
|
+
• `Optional` **parseFunc**: (`string`: `string`) => `number` \| (`string`: `string`, `radix?`: `number`) => `number`
|
1461
1477
|
|
1462
1478
|
Custom parsing function when the value changes.
|
1463
1479
|
|
@@ -1588,7 +1604,7 @@ ___
|
|
1588
1604
|
|
1589
1605
|
#### options
|
1590
1606
|
|
1591
|
-
• **options**:
|
1607
|
+
• **options**: `OptionsUseServiceResult`<`undefined` \| ``null`` \| `number`[]\> \| [`SelectOption`](#interfacesselectoptionmd)<`undefined` \| ``null`` \| `number`[]\>[]
|
1592
1608
|
|
1593
1609
|
Options for the dropdown. Includes the label and value.
|
1594
1610
|
|
@@ -1753,7 +1769,7 @@ ___
|
|
1753
1769
|
|
1754
1770
|
#### options
|
1755
1771
|
|
1756
|
-
• **options**: [`SelectOption`](#interfacesselectoptionmd)<`string`[]\>[]
|
1772
|
+
• **options**: `OptionsUseServiceResult`<`string`[]\> \| [`SelectOption`](#interfacesselectoptionmd)<`string`[]\>[]
|
1757
1773
|
|
1758
1774
|
Options for the dropdown. Includes the label and value.
|
1759
1775
|
|
@@ -1802,6 +1818,8 @@ packages/envoc-form/src/Group.tsx:21
|
|
1802
1818
|
|
1803
1819
|
## Interface: NormalizationFunction<TValue\>
|
1804
1820
|
|
1821
|
+
Normalization of values
|
1822
|
+
|
1805
1823
|
### Type parameters
|
1806
1824
|
|
1807
1825
|
| Name |
|
@@ -1814,8 +1832,6 @@ packages/envoc-form/src/Group.tsx:21
|
|
1814
1832
|
|
1815
1833
|
▸ **NormalizationFunction**(`value`): `TValue`
|
1816
1834
|
|
1817
|
-
Normalization of values
|
1818
|
-
|
1819
1835
|
##### Parameters
|
1820
1836
|
|
1821
1837
|
| Name | Type |
|
@@ -1949,7 +1965,7 @@ ___
|
|
1949
1965
|
|
1950
1966
|
#### parseFunc
|
1951
1967
|
|
1952
|
-
• `Optional` **parseFunc**: (`string`: `string
|
1968
|
+
• `Optional` **parseFunc**: (`string`: `string`) => `number` \| (`string`: `string`, `radix?`: `number`) => `number`
|
1953
1969
|
|
1954
1970
|
Custom parsing function when the value changes.
|
1955
1971
|
|
@@ -2042,6 +2058,8 @@ packages/envoc-form/src/utils/objectToFormData.ts:20
|
|
2042
2058
|
|
2043
2059
|
## Interface: SelectGroupProps<TValue\>
|
2044
2060
|
|
2061
|
+
Defines what is injected by a Field wrapper of some TRenderComponent
|
2062
|
+
|
2045
2063
|
### Type parameters
|
2046
2064
|
|
2047
2065
|
| Name |
|
@@ -2179,7 +2197,7 @@ ___
|
|
2179
2197
|
|
2180
2198
|
#### options
|
2181
2199
|
|
2182
|
-
• **options**: [`SelectOption`](#interfacesselectoptionmd)<`TValue`\>[]
|
2200
|
+
• **options**: `OptionsUseServiceResult`<`TValue`\> \| [`SelectOption`](#interfacesselectoptionmd)<`TValue`\>[]
|
2183
2201
|
|
2184
2202
|
Options for the dropdown. Includes the label and value.
|
2185
2203
|
|
@@ -2350,7 +2368,7 @@ ___
|
|
2350
2368
|
|
2351
2369
|
#### options
|
2352
2370
|
|
2353
|
-
• **options**: [`SelectOption`](#interfacesselectoptionmd)<`T`\>[]
|
2371
|
+
• **options**: `OptionsUseServiceResult`<`T`\> \| [`SelectOption`](#interfacesselectoptionmd)<`T`\>[]
|
2354
2372
|
|
2355
2373
|
Options for the dropdown. Includes the label and value.
|
2356
2374
|
|
@@ -2448,9 +2466,6 @@ packages/envoc-form/src/Select/SelectGroup.tsx:9
|
|
2448
2466
|
#### Properties
|
2449
2467
|
|
2450
2468
|
- [errors](#errors)
|
2451
|
-
|
2452
|
-
#### Methods
|
2453
|
-
|
2454
2469
|
- [getError](#geterror)
|
2455
2470
|
- [setError](#seterror)
|
2456
2471
|
|
@@ -2464,19 +2479,23 @@ packages/envoc-form/src/Select/SelectGroup.tsx:9
|
|
2464
2479
|
|
2465
2480
|
packages/envoc-form/src/Form/ServerErrorContext.ts:7
|
2466
2481
|
|
2467
|
-
|
2482
|
+
___
|
2468
2483
|
|
2469
2484
|
#### getError
|
2470
2485
|
|
2471
|
-
|
2486
|
+
• **getError**: (`path`: `string`) => `undefined` \| `string`
|
2472
2487
|
|
2473
|
-
#####
|
2488
|
+
##### Type declaration
|
2489
|
+
|
2490
|
+
▸ (`path`): `undefined` \| `string`
|
2491
|
+
|
2492
|
+
###### Parameters
|
2474
2493
|
|
2475
2494
|
| Name | Type |
|
2476
2495
|
| :------ | :------ |
|
2477
2496
|
| `path` | `string` |
|
2478
2497
|
|
2479
|
-
|
2498
|
+
###### Returns
|
2480
2499
|
|
2481
2500
|
`undefined` \| `string`
|
2482
2501
|
|
@@ -2488,16 +2507,20 @@ ___
|
|
2488
2507
|
|
2489
2508
|
#### setError
|
2490
2509
|
|
2491
|
-
|
2510
|
+
• **setError**: (`path`: `string`, `errorMessage`: `undefined` \| `string`) => `void`
|
2492
2511
|
|
2493
|
-
#####
|
2512
|
+
##### Type declaration
|
2513
|
+
|
2514
|
+
▸ (`path`, `errorMessage`): `void`
|
2515
|
+
|
2516
|
+
###### Parameters
|
2494
2517
|
|
2495
2518
|
| Name | Type |
|
2496
2519
|
| :------ | :------ |
|
2497
2520
|
| `path` | `string` |
|
2498
2521
|
| `errorMessage` | `undefined` \| `string` |
|
2499
2522
|
|
2500
|
-
|
2523
|
+
###### Returns
|
2501
2524
|
|
2502
2525
|
`void`
|
2503
2526
|
|
@@ -2639,7 +2662,7 @@ ___
|
|
2639
2662
|
|
2640
2663
|
#### options
|
2641
2664
|
|
2642
|
-
• **options**:
|
2665
|
+
• **options**: `OptionsUseServiceResult`<`undefined` \| ``null`` \| `number`\> \| [`SelectOption`](#interfacesselectoptionmd)<`undefined` \| ``null`` \| `number`\>[]
|
2643
2666
|
|
2644
2667
|
Options for the dropdown. Includes the label and value.
|
2645
2668
|
|
@@ -2880,7 +2903,9 @@ ___
|
|
2880
2903
|
|
2881
2904
|
The cancel button's `onClick`.
|
2882
2905
|
|
2883
|
-
**`
|
2906
|
+
**`Default Value`**
|
2907
|
+
|
2908
|
+
`window.history.back()`
|
2884
2909
|
|
2885
2910
|
##### Defined in
|
2886
2911
|
|
@@ -3203,7 +3228,7 @@ ___
|
|
3203
3228
|
|
3204
3229
|
#### type
|
3205
3230
|
|
3206
|
-
• `Optional` **type**: ``"
|
3231
|
+
• `Optional` **type**: ``"color"`` \| ``"search"`` \| ``"textarea"`` \| ``"text"`` \| ``"tel"`` \| ``"url"`` \| ``"email"`` \| ``"password"``
|
3207
3232
|
|
3208
3233
|
##### Defined in
|
3209
3234
|
|
@@ -3264,6 +3289,8 @@ packages/envoc-form/src/SubmitFormButton.tsx:11
|
|
3264
3289
|
|
3265
3290
|
## Interface: TextAreaGroupProps
|
3266
3291
|
|
3292
|
+
Defines what is injected by a Field wrapper of some TRenderComponent
|
3293
|
+
|
3267
3294
|
### Hierarchy
|
3268
3295
|
|
3269
3296
|
- [`InjectedFieldProps`](#interfacesinjectedfieldpropsmd)<`string` \| `undefined` \| ``null``\>
|
@@ -3450,6 +3477,8 @@ packages/envoc-form/src/Validation/ValidationError.ts:4
|
|
3450
3477
|
|
3451
3478
|
## Interface: ValidationFunction<TValue\>
|
3452
3479
|
|
3480
|
+
Client side validation function
|
3481
|
+
|
3453
3482
|
### Type parameters
|
3454
3483
|
|
3455
3484
|
| Name |
|
@@ -3462,8 +3491,6 @@ packages/envoc-form/src/Validation/ValidationError.ts:4
|
|
3462
3491
|
|
3463
3492
|
▸ **ValidationFunction**(`value`): `undefined` \| `string`
|
3464
3493
|
|
3465
|
-
Client side validation function
|
3466
|
-
|
3467
3494
|
##### Parameters
|
3468
3495
|
|
3469
3496
|
| Name | Type |
|
@@ -3614,7 +3641,7 @@ packages/envoc-form/src/Field/useStandardField.ts:18
|
|
3614
3641
|
- [ValidationFunction](#interfacesvalidationfunctionmd)
|
3615
3642
|
- [useStandardFieldProps](#interfacesusestandardfieldpropsmd)
|
3616
3643
|
|
3617
|
-
### Type
|
3644
|
+
### Type Aliases
|
3618
3645
|
|
3619
3646
|
- [ArrayFormBuilderProp](#arrayformbuilderprop)
|
3620
3647
|
- [FieldArrayProps](#fieldarrayprops)
|
@@ -3625,18 +3652,12 @@ packages/envoc-form/src/Field/useStandardField.ts:18
|
|
3625
3652
|
- [RenderComponentProps](#rendercomponentprops)
|
3626
3653
|
- [StandAloneInputProps](#standaloneinputprops)
|
3627
3654
|
|
3628
|
-
### Properties
|
3629
|
-
|
3630
|
-
- [Field](#field)
|
3631
|
-
- [SubmitFormButton](#submitformbutton)
|
3632
|
-
|
3633
3655
|
### Variables
|
3634
3656
|
|
3635
3657
|
- [FieldNameContext](#fieldnamecontext)
|
3636
3658
|
- [FileGroup](#filegroup)
|
3637
3659
|
- [FormDefaults](#formdefaults)
|
3638
3660
|
- [IconInputGroup](#iconinputgroup)
|
3639
|
-
- [MoneyInputGroup](#moneyinputgroup)
|
3640
3661
|
- [NumberInputGroup](#numberinputgroup)
|
3641
3662
|
- [ServerErrorContext](#servererrorcontext)
|
3642
3663
|
- [StringInputGroup](#stringinputgroup)
|
@@ -3649,12 +3670,14 @@ packages/envoc-form/src/Field/useStandardField.ts:18
|
|
3649
3670
|
- [ConfirmBaseForm](#confirmbaseform)
|
3650
3671
|
- [ConfirmDeleteForm](#confirmdeleteform)
|
3651
3672
|
- [DatePickerGroup](#datepickergroup)
|
3673
|
+
- [Field](#field)
|
3652
3674
|
- [FieldArray](#fieldarray)
|
3653
3675
|
- [FieldErrorScrollTarget](#fielderrorscrolltarget)
|
3654
3676
|
- [Form](#form)
|
3655
3677
|
- [FormActions](#formactions)
|
3656
3678
|
- [Group](#group)
|
3657
3679
|
- [InputGroup](#inputgroup)
|
3680
|
+
- [MoneyInputGroup](#moneyinputgroup)
|
3658
3681
|
- [MultiNumberSelectGroup](#multinumberselectgroup)
|
3659
3682
|
- [MultiStringSelectGroup](#multistringselectgroup)
|
3660
3683
|
- [SelectGroup](#selectgroup)
|
@@ -3664,6 +3687,7 @@ packages/envoc-form/src/Field/useStandardField.ts:18
|
|
3664
3687
|
- [StandardFormActions](#standardformactions)
|
3665
3688
|
- [StringDateOnlyPickerGroup](#stringdateonlypickergroup)
|
3666
3689
|
- [StringDatePickerGroup](#stringdatepickergroup)
|
3690
|
+
- [SubmitFormButton](#submitformbutton)
|
3667
3691
|
- [convertToTimeZoneInsensitiveISOString](#converttotimezoneinsensitiveisostring)
|
3668
3692
|
- [isArray](#isarray)
|
3669
3693
|
- [isBlob](#isblob)
|
@@ -3677,11 +3701,11 @@ packages/envoc-form/src/Field/useStandardField.ts:18
|
|
3677
3701
|
- [serialize](#serialize)
|
3678
3702
|
- [useStandardField](#usestandardfield)
|
3679
3703
|
|
3680
|
-
## Type
|
3704
|
+
## Type Aliases
|
3681
3705
|
|
3682
3706
|
### ArrayFormBuilderProp
|
3683
3707
|
|
3684
|
-
Ƭ **ArrayFormBuilderProp**<`TValue`\>: `TValue` extends infer TForm[] \| `undefined` \| ``null`` ? `TForm` extends `object` ? { `Field`: <TProp, TRenderComponent\>(`props`: [`FieldProps`](#fieldprops)<`TForm`, `TProp`, `TRenderComponent`\>) => `Element` ; `FieldArray`: <TProp\>(`props`: [`FieldArrayProps`](#fieldarrayprops)<`TForm`, `TProp`\>) => `Element` } : `never` : `never`
|
3708
|
+
Ƭ **ArrayFormBuilderProp**<`TValue`\>: `TValue` extends infer TForm[] \| `undefined` \| ``null`` ? `TForm` extends `object` ? { `Field`: <TProp, TRenderComponent\>(`props`: [`FieldProps`](#fieldprops)<`TForm`, `TProp`, `TRenderComponent`\>) => `JSX.Element` ; `FieldArray`: <TProp\>(`props`: [`FieldArrayProps`](#fieldarrayprops)<`TForm`, `TProp`\>) => `JSX.Element` } : `never` : `never`
|
3685
3709
|
|
3686
3710
|
#### Type parameters
|
3687
3711
|
|
@@ -3697,7 +3721,7 @@ ___
|
|
3697
3721
|
|
3698
3722
|
### FieldArrayProps
|
3699
3723
|
|
3700
|
-
Ƭ **FieldArrayProps**<`TForm`, `TProp`\>: `TForm`[`TProp`] extends `any`[] \| `undefined` \| ``null`` ? { `disabled?`: `boolean` ; `label?`: `string` ; `name`: `TProp` ; `validate?`: [`ValidationFunction`](#interfacesvalidationfunctionmd)<`TForm`[`TProp`]\> \| [`ValidationFunction`](#interfacesvalidationfunctionmd)<`TForm`[`TProp`]\>[]
|
3724
|
+
Ƭ **FieldArrayProps**<`TForm`, `TProp`\>: `TForm`[`TProp`] extends `any`[] \| `undefined` \| ``null`` ? { `children`: (`formBuilder`: [`ArrayFormBuilderProp`](#arrayformbuilderprop)<`TForm`[`TProp`]\>) => `JSX.Element` ; `disabled?`: `boolean` ; `label?`: `string` ; `name`: `TProp` ; `validate?`: [`ValidationFunction`](#interfacesvalidationfunctionmd)<`TForm`[`TProp`]\> \| [`ValidationFunction`](#interfacesvalidationfunctionmd)<`TForm`[`TProp`]\>[] } : `never`
|
3701
3725
|
|
3702
3726
|
#### Type parameters
|
3703
3727
|
|
@@ -3746,8 +3770,8 @@ ___
|
|
3746
3770
|
|
3747
3771
|
| Name | Type |
|
3748
3772
|
| :------ | :------ |
|
3749
|
-
| `Field` | <TProp, TRenderComponent\>(`props`: [`FieldProps`](#fieldprops)<`TForm`, `TProp`, `TRenderComponent`\>) => `Element` |
|
3750
|
-
| `FieldArray` | <TProp\>(`props`: [`FieldArrayProps`](#fieldarrayprops)<`TForm`, `TProp`\>) => `Element` |
|
3773
|
+
| `Field` | <TProp, TRenderComponent\>(`props`: [`FieldProps`](#fieldprops)<`TForm`, `TProp`, `TRenderComponent`\>) => `JSX.Element` |
|
3774
|
+
| `FieldArray` | <TProp\>(`props`: [`FieldArrayProps`](#fieldarrayprops)<`TForm`, `TProp`\>) => `JSX.Element` |
|
3751
3775
|
|
3752
3776
|
#### Defined in
|
3753
3777
|
|
@@ -3807,7 +3831,7 @@ ___
|
|
3807
3831
|
|
3808
3832
|
### StandAloneInputProps
|
3809
3833
|
|
3810
|
-
Ƭ **StandAloneInputProps**<`TValue`, `TRenderComponent`\>: { `Component`: [`RenderComponent`](#rendercomponent)<`TValue`, `TRenderComponent`\> ; `
|
3834
|
+
Ƭ **StandAloneInputProps**<`TValue`, `TRenderComponent`\>: { `Component`: [`RenderComponent`](#rendercomponent)<`TValue`, `TRenderComponent`\> ; `onChange`: (`arg`: `TValue`) => `void` ; `value`: `TValue` } & `Omit`<[`RenderComponentProps`](#rendercomponentprops)<`TValue`, `TRenderComponent`\>, keyof [`InjectedFieldProps`](#interfacesinjectedfieldpropsmd)<`TValue`\> \| ``"value"`` \| ``"onChange"`` \| ``"normalize"`` \| ``"validate"``\>
|
3811
3835
|
|
3812
3836
|
#### Type parameters
|
3813
3837
|
|
@@ -3820,44 +3844,6 @@ ___
|
|
3820
3844
|
|
3821
3845
|
packages/envoc-form/src/Field/StandAloneInput.tsx:8
|
3822
3846
|
|
3823
|
-
## Properties
|
3824
|
-
|
3825
|
-
### Field
|
3826
|
-
|
3827
|
-
• **Field**: <TForm, TProp, TRenderComponent\>(`__namedParameters`: [`FieldProps`](#fieldprops)<`TForm`, `TProp`, `TRenderComponent`\>, `ref`: `LegacyRef`<`any`\>) => `Element`
|
3828
|
-
|
3829
|
-
#### Type declaration
|
3830
|
-
|
3831
|
-
▸ <`TForm`, `TProp`, `TRenderComponent`\>(`__namedParameters`, `ref`): `Element`
|
3832
|
-
|
3833
|
-
Renders whatever Component is passed - injecting the formik values needed to finish wiring up that individual field.
|
3834
|
-
Should no Component be used then the default will be provided by the default lookup based on typeof(TForm[TProp])
|
3835
|
-
|
3836
|
-
##### Type parameters
|
3837
|
-
|
3838
|
-
| Name | Type |
|
3839
|
-
| :------ | :------ |
|
3840
|
-
| `TForm` | extends `object` |
|
3841
|
-
| `TProp` | extends `string` \| `number` \| `symbol` |
|
3842
|
-
| `TRenderComponent` | extends `ElementType`<`any`\> |
|
3843
|
-
|
3844
|
-
##### Parameters
|
3845
|
-
|
3846
|
-
| Name | Type |
|
3847
|
-
| :------ | :------ |
|
3848
|
-
| `__namedParameters` | [`FieldProps`](#fieldprops)<`TForm`, `TProp`, `TRenderComponent`\> |
|
3849
|
-
| `ref` | `LegacyRef`<`any`\> |
|
3850
|
-
|
3851
|
-
##### Returns
|
3852
|
-
|
3853
|
-
`Element`
|
3854
|
-
|
3855
|
-
___
|
3856
|
-
|
3857
|
-
### SubmitFormButton
|
3858
|
-
|
3859
|
-
• **SubmitFormButton**: `FunctionComponent`<[`SubmitFormButtonProps`](#interfacessubmitformbuttonpropsmd)\>
|
3860
|
-
|
3861
3847
|
## Variables
|
3862
3848
|
|
3863
3849
|
### FieldNameContext
|
@@ -3914,18 +3900,6 @@ packages/envoc-form/src/Input/IconInputGroup.tsx:50
|
|
3914
3900
|
|
3915
3901
|
___
|
3916
3902
|
|
3917
|
-
### MoneyInputGroup
|
3918
|
-
|
3919
|
-
• `Const` **MoneyInputGroup**: `FunctionComponent`<[`MoneyInputGroupProps`](#interfacesmoneyinputgrouppropsmd)\>
|
3920
|
-
|
3921
|
-
Input group for inputting money.
|
3922
|
-
|
3923
|
-
#### Defined in
|
3924
|
-
|
3925
|
-
packages/envoc-form/src/Input/MoneyInputGroup.tsx:46
|
3926
|
-
|
3927
|
-
___
|
3928
|
-
|
3929
3903
|
### NumberInputGroup
|
3930
3904
|
|
3931
3905
|
• `Const` **NumberInputGroup**: `ComponentType`<[`NumberInputGroupProps`](#interfacesnumberinputgrouppropsmd)\>
|
@@ -3976,22 +3950,22 @@ packages/envoc-form/src/TextArea/TextAreaGroup.tsx:60
|
|
3976
3950
|
|
3977
3951
|
### AddressInput
|
3978
3952
|
|
3979
|
-
▸ **AddressInput**(
|
3953
|
+
▸ **AddressInput**(`«destructured»`): `Element`
|
3980
3954
|
|
3981
|
-
Collection of `<Field/>`s for inputting an address. Includes:
|
3982
|
-
```txt
|
3983
|
-
Address 1
|
3984
|
-
Address 2
|
3985
|
-
City
|
3986
|
-
State
|
3987
|
-
Zip
|
3955
|
+
Collection of `<Field/>`s for inputting an address. Includes:
|
3956
|
+
```txt
|
3957
|
+
Address 1
|
3958
|
+
Address 2
|
3959
|
+
City
|
3960
|
+
State
|
3961
|
+
Zip
|
3988
3962
|
```
|
3989
3963
|
|
3990
3964
|
#### Parameters
|
3991
3965
|
|
3992
3966
|
| Name | Type |
|
3993
3967
|
| :------ | :------ |
|
3994
|
-
|
|
3968
|
+
| `«destructured»` | [`AddressInputProps`](#interfacesaddressinputpropsmd) |
|
3995
3969
|
|
3996
3970
|
#### Returns
|
3997
3971
|
|
@@ -4027,9 +4001,9 @@ ___
|
|
4027
4001
|
|
4028
4002
|
### ConfirmBaseForm
|
4029
4003
|
|
4030
|
-
▸ **ConfirmBaseForm**(
|
4004
|
+
▸ **ConfirmBaseForm**(`«destructured»`): `Element`
|
4031
4005
|
|
4032
|
-
Confimation dialog. Navigates to a different route to allow the user to either confirm or cancel an action.
|
4006
|
+
Confimation dialog. Navigates to a different route to allow the user to either confirm or cancel an action.
|
4033
4007
|
Commonly used for confirming delete and archive.
|
4034
4008
|
|
4035
4009
|
See `<ConfirmDeleteForm/>` if the confirmation is specifically for deletion.
|
@@ -4038,7 +4012,7 @@ See `<ConfirmDeleteForm/>` if the confirmation is specifically for deletion.
|
|
4038
4012
|
|
4039
4013
|
| Name | Type |
|
4040
4014
|
| :------ | :------ |
|
4041
|
-
|
|
4015
|
+
| `«destructured»` | [`ConfirmBaseFormProps`](#interfacesconfirmbaseformpropsmd) |
|
4042
4016
|
|
4043
4017
|
#### Returns
|
4044
4018
|
|
@@ -4052,7 +4026,7 @@ ___
|
|
4052
4026
|
|
4053
4027
|
### ConfirmDeleteForm
|
4054
4028
|
|
4055
|
-
▸ **ConfirmDeleteForm**(
|
4029
|
+
▸ **ConfirmDeleteForm**(`«destructured»`): `Element`
|
4056
4030
|
|
4057
4031
|
Deletion confirmation. Navigates to a different route to allow the user to either confirm or cancel an action.
|
4058
4032
|
|
@@ -4062,7 +4036,7 @@ Wraps `<ConfirmBaseForm/>`.
|
|
4062
4036
|
|
4063
4037
|
| Name | Type |
|
4064
4038
|
| :------ | :------ |
|
4065
|
-
|
|
4039
|
+
| `«destructured»` | [`ConfirmDeleteFormProps`](#interfacesconfirmdeleteformpropsmd) |
|
4066
4040
|
|
4067
4041
|
#### Returns
|
4068
4042
|
|
@@ -4076,7 +4050,7 @@ ___
|
|
4076
4050
|
|
4077
4051
|
### DatePickerGroup
|
4078
4052
|
|
4079
|
-
▸ **DatePickerGroup**<`T`\>(
|
4053
|
+
▸ **DatePickerGroup**<`T`\>(`«destructured»`): `Element`
|
4080
4054
|
|
4081
4055
|
Field for inputting dates. Uses `<Group/>` and `<DatePicker/>`.
|
4082
4056
|
|
@@ -4092,7 +4066,7 @@ Uses [react-date-picker](https://www.npmjs.com/package/react-date-picker)
|
|
4092
4066
|
|
4093
4067
|
| Name | Type |
|
4094
4068
|
| :------ | :------ |
|
4095
|
-
|
|
4069
|
+
| `«destructured»` | [`DatePickerGroupProps`](#interfacesdatepickergrouppropsmd)<`T`\> |
|
4096
4070
|
|
4097
4071
|
#### Returns
|
4098
4072
|
|
@@ -4104,9 +4078,41 @@ packages/envoc-form/src/DatePicker/DatePickerGroup.tsx:26
|
|
4104
4078
|
|
4105
4079
|
___
|
4106
4080
|
|
4081
|
+
### Field
|
4082
|
+
|
4083
|
+
▸ **Field**<`TForm`, `TProp`, `TRenderComponent`\>(`«destructured»`, `ref`): `Element`
|
4084
|
+
|
4085
|
+
Renders whatever Component is passed - injecting the formik values needed to finish wiring up that individual field.
|
4086
|
+
Should no Component be used then the default will be provided by the default lookup based on typeof(TForm[TProp])
|
4087
|
+
|
4088
|
+
#### Type parameters
|
4089
|
+
|
4090
|
+
| Name | Type |
|
4091
|
+
| :------ | :------ |
|
4092
|
+
| `TForm` | extends `object` |
|
4093
|
+
| `TProp` | extends `string` \| `number` \| `symbol` |
|
4094
|
+
| `TRenderComponent` | extends `ElementType` |
|
4095
|
+
|
4096
|
+
#### Parameters
|
4097
|
+
|
4098
|
+
| Name | Type |
|
4099
|
+
| :------ | :------ |
|
4100
|
+
| `«destructured»` | [`FieldProps`](#fieldprops)<`TForm`, `TProp`, `TRenderComponent`\> |
|
4101
|
+
| `ref` | `LegacyRef`<`any`\> |
|
4102
|
+
|
4103
|
+
#### Returns
|
4104
|
+
|
4105
|
+
`Element`
|
4106
|
+
|
4107
|
+
#### Defined in
|
4108
|
+
|
4109
|
+
packages/envoc-form/src/Field/Field.tsx:60
|
4110
|
+
|
4111
|
+
___
|
4112
|
+
|
4107
4113
|
### FieldArray
|
4108
4114
|
|
4109
|
-
▸ **FieldArray**<`TForm`, `TProp`\>(
|
4115
|
+
▸ **FieldArray**<`TForm`, `TProp`\>(`«destructured»`): `Element`
|
4110
4116
|
|
4111
4117
|
An array of fields that allows the user to add multiple instances of the same field.
|
4112
4118
|
|
@@ -4123,7 +4129,7 @@ Includes "Add Item" and "Remove Item" buttons to allow the user to speicify the
|
|
4123
4129
|
|
4124
4130
|
| Name | Type |
|
4125
4131
|
| :------ | :------ |
|
4126
|
-
|
|
4132
|
+
| `«destructured»` | [`FieldArrayProps`](#fieldarrayprops)<`TForm`, `TProp`\> |
|
4127
4133
|
|
4128
4134
|
#### Returns
|
4129
4135
|
|
@@ -4153,7 +4159,7 @@ ___
|
|
4153
4159
|
|
4154
4160
|
### Form
|
4155
4161
|
|
4156
|
-
▸ **Form**<`TForm`\>(
|
4162
|
+
▸ **Form**<`TForm`\>(`«destructured»`): `Element`
|
4157
4163
|
|
4158
4164
|
Define a form. Uses [formik](https://formik.org/docs/overview). Usually contains many `<Field/>` components.
|
4159
4165
|
|
@@ -4167,7 +4173,7 @@ Define a form. Uses [formik](https://formik.org/docs/overview). Usually contains
|
|
4167
4173
|
|
4168
4174
|
| Name | Type |
|
4169
4175
|
| :------ | :------ |
|
4170
|
-
|
|
4176
|
+
| `«destructured»` | [`FormProps`](#formprops)<`TForm`\> |
|
4171
4177
|
|
4172
4178
|
#### Returns
|
4173
4179
|
|
@@ -4181,7 +4187,7 @@ ___
|
|
4181
4187
|
|
4182
4188
|
### FormActions
|
4183
4189
|
|
4184
|
-
▸ **FormActions**(
|
4190
|
+
▸ **FormActions**(`«destructured»`): `Element`
|
4185
4191
|
|
4186
4192
|
Standard cancel and submit buttons.
|
4187
4193
|
|
@@ -4189,7 +4195,7 @@ Standard cancel and submit buttons.
|
|
4189
4195
|
|
4190
4196
|
| Name | Type |
|
4191
4197
|
| :------ | :------ |
|
4192
|
-
|
|
4198
|
+
| `«destructured»` | [`FormActionsProps`](#interfacesformactionspropsmd) |
|
4193
4199
|
|
4194
4200
|
#### Returns
|
4195
4201
|
|
@@ -4203,7 +4209,7 @@ ___
|
|
4203
4209
|
|
4204
4210
|
### Group
|
4205
4211
|
|
4206
|
-
▸ **Group**(
|
4212
|
+
▸ **Group**(`«destructured»`): `Element`
|
4207
4213
|
|
4208
4214
|
Contains standard field bits like a label, helper text, error scroll target, validation message container, etc.
|
4209
4215
|
|
@@ -4211,7 +4217,7 @@ Contains standard field bits like a label, helper text, error scroll target, val
|
|
4211
4217
|
|
4212
4218
|
| Name | Type |
|
4213
4219
|
| :------ | :------ |
|
4214
|
-
|
|
4220
|
+
| `«destructured»` | [`GroupProps`](#interfacesgrouppropsmd) |
|
4215
4221
|
|
4216
4222
|
#### Returns
|
4217
4223
|
|
@@ -4225,7 +4231,7 @@ ___
|
|
4225
4231
|
|
4226
4232
|
### InputGroup
|
4227
4233
|
|
4228
|
-
▸
|
4234
|
+
▸ **InputGroup**<`TValue`\>(`«destructured»`, `ref`): `Element`
|
4229
4235
|
|
4230
4236
|
Generic controlled `<input/>` wrapped by a `<Group/>`
|
4231
4237
|
|
@@ -4239,7 +4245,7 @@ Generic controlled `<input/>` wrapped by a `<Group/>`
|
|
4239
4245
|
|
4240
4246
|
| Name | Type |
|
4241
4247
|
| :------ | :------ |
|
4242
|
-
|
|
4248
|
+
| `«destructured»` | [`InputGroupProps`](#interfacesinputgrouppropsmd)<`TValue`\> |
|
4243
4249
|
| `ref` | `LegacyRef`<`HTMLInputElement`\> |
|
4244
4250
|
|
4245
4251
|
#### Returns
|
@@ -4248,7 +4254,30 @@ Generic controlled `<input/>` wrapped by a `<Group/>`
|
|
4248
4254
|
|
4249
4255
|
#### Defined in
|
4250
4256
|
|
4251
|
-
packages/envoc-form/src/Input/InputGroup.tsx:
|
4257
|
+
packages/envoc-form/src/Input/InputGroup.tsx:23
|
4258
|
+
|
4259
|
+
___
|
4260
|
+
|
4261
|
+
### MoneyInputGroup
|
4262
|
+
|
4263
|
+
▸ **MoneyInputGroup**(`props`, `context?`): `ReactNode`
|
4264
|
+
|
4265
|
+
Input group for inputting money.
|
4266
|
+
|
4267
|
+
#### Parameters
|
4268
|
+
|
4269
|
+
| Name | Type |
|
4270
|
+
| :------ | :------ |
|
4271
|
+
| `props` | [`MoneyInputGroupProps`](#interfacesmoneyinputgrouppropsmd) |
|
4272
|
+
| `context?` | `any` |
|
4273
|
+
|
4274
|
+
#### Returns
|
4275
|
+
|
4276
|
+
`ReactNode`
|
4277
|
+
|
4278
|
+
#### Defined in
|
4279
|
+
|
4280
|
+
common/temp/node_modules/.pnpm/@types+react@18.2.14/node_modules/@types/react/index.d.ts:556
|
4252
4281
|
|
4253
4282
|
___
|
4254
4283
|
|
@@ -4298,7 +4327,7 @@ ___
|
|
4298
4327
|
|
4299
4328
|
### SelectGroup
|
4300
4329
|
|
4301
|
-
▸ **SelectGroup**<`TValue`\>(
|
4330
|
+
▸ **SelectGroup**<`TValue`\>(`«destructured»`): `Element`
|
4302
4331
|
|
4303
4332
|
Generic select dropdown. Uses [react-select](https://react-select.com/home).
|
4304
4333
|
|
@@ -4312,7 +4341,7 @@ Generic select dropdown. Uses [react-select](https://react-select.com/home).
|
|
4312
4341
|
|
4313
4342
|
| Name | Type |
|
4314
4343
|
| :------ | :------ |
|
4315
|
-
|
|
4344
|
+
| `«destructured»` | [`SelectGroupProps`](#interfacesselectgrouppropsmd)<`TValue`\> |
|
4316
4345
|
|
4317
4346
|
#### Returns
|
4318
4347
|
|
@@ -4379,7 +4408,7 @@ The stand alone version of `<Field/>`. Can use a type of input component outside
|
|
4379
4408
|
| Name | Type |
|
4380
4409
|
| :------ | :------ |
|
4381
4410
|
| `TValue` | `TValue` |
|
4382
|
-
| `TComponent` | extends `ElementType
|
4411
|
+
| `TComponent` | extends `ElementType` |
|
4383
4412
|
|
4384
4413
|
#### Parameters
|
4385
4414
|
|
@@ -4399,7 +4428,7 @@ ___
|
|
4399
4428
|
|
4400
4429
|
### StandardFormActions
|
4401
4430
|
|
4402
|
-
▸ **StandardFormActions**(
|
4431
|
+
▸ **StandardFormActions**(`«destructured»`): `Element`
|
4403
4432
|
|
4404
4433
|
Standard submit and cancel buttons.
|
4405
4434
|
|
@@ -4407,7 +4436,7 @@ Standard submit and cancel buttons.
|
|
4407
4436
|
|
4408
4437
|
| Name | Type |
|
4409
4438
|
| :------ | :------ |
|
4410
|
-
|
|
4439
|
+
| `«destructured»` | [`StandardFormActionsProps`](#interfacesstandardformactionspropsmd) |
|
4411
4440
|
|
4412
4441
|
#### Returns
|
4413
4442
|
|
@@ -4467,6 +4496,29 @@ packages/envoc-form/src/DatePicker/StringDatePickerGroup.tsx:12
|
|
4467
4496
|
|
4468
4497
|
___
|
4469
4498
|
|
4499
|
+
### SubmitFormButton
|
4500
|
+
|
4501
|
+
▸ **SubmitFormButton**(`props`, `context?`): `ReactNode`
|
4502
|
+
|
4503
|
+
Generic submit button for forms.
|
4504
|
+
|
4505
|
+
#### Parameters
|
4506
|
+
|
4507
|
+
| Name | Type |
|
4508
|
+
| :------ | :------ |
|
4509
|
+
| `props` | [`SubmitFormButtonProps`](#interfacessubmitformbuttonpropsmd) |
|
4510
|
+
| `context?` | `any` |
|
4511
|
+
|
4512
|
+
#### Returns
|
4513
|
+
|
4514
|
+
`ReactNode`
|
4515
|
+
|
4516
|
+
#### Defined in
|
4517
|
+
|
4518
|
+
common/temp/node_modules/.pnpm/@types+react@18.2.14/node_modules/@types/react/index.d.ts:556
|
4519
|
+
|
4520
|
+
___
|
4521
|
+
|
4470
4522
|
### convertToTimeZoneInsensitiveISOString
|
4471
4523
|
|
4472
4524
|
▸ **convertToTimeZoneInsensitiveISOString**(`date`): `string`
|
@@ -4489,7 +4541,7 @@ ___
|
|
4489
4541
|
|
4490
4542
|
### isArray
|
4491
4543
|
|
4492
|
-
▸
|
4544
|
+
▸ **isArray**(`value`): `boolean`
|
4493
4545
|
|
4494
4546
|
#### Parameters
|
4495
4547
|
|
@@ -4509,7 +4561,7 @@ ___
|
|
4509
4561
|
|
4510
4562
|
### isBlob
|
4511
4563
|
|
4512
|
-
▸
|
4564
|
+
▸ **isBlob**(`value`): `any`
|
4513
4565
|
|
4514
4566
|
#### Parameters
|
4515
4567
|
|
@@ -4529,7 +4581,7 @@ ___
|
|
4529
4581
|
|
4530
4582
|
### isBoolean
|
4531
4583
|
|
4532
|
-
▸
|
4584
|
+
▸ **isBoolean**(`value`): `boolean`
|
4533
4585
|
|
4534
4586
|
#### Parameters
|
4535
4587
|
|
@@ -4549,7 +4601,7 @@ ___
|
|
4549
4601
|
|
4550
4602
|
### isDate
|
4551
4603
|
|
4552
|
-
▸
|
4604
|
+
▸ **isDate**(`value`): `boolean`
|
4553
4605
|
|
4554
4606
|
#### Parameters
|
4555
4607
|
|
@@ -4569,7 +4621,7 @@ ___
|
|
4569
4621
|
|
4570
4622
|
### isFile
|
4571
4623
|
|
4572
|
-
▸
|
4624
|
+
▸ **isFile**(`value`): `any`
|
4573
4625
|
|
4574
4626
|
#### Parameters
|
4575
4627
|
|
@@ -4589,7 +4641,7 @@ ___
|
|
4589
4641
|
|
4590
4642
|
### isNull
|
4591
4643
|
|
4592
|
-
▸
|
4644
|
+
▸ **isNull**(`value`): `boolean`
|
4593
4645
|
|
4594
4646
|
#### Parameters
|
4595
4647
|
|
@@ -4609,7 +4661,7 @@ ___
|
|
4609
4661
|
|
4610
4662
|
### isObject
|
4611
4663
|
|
4612
|
-
▸
|
4664
|
+
▸ **isObject**(`value`): `boolean`
|
4613
4665
|
|
4614
4666
|
#### Parameters
|
4615
4667
|
|
@@ -4629,7 +4681,7 @@ ___
|
|
4629
4681
|
|
4630
4682
|
### isUndefined
|
4631
4683
|
|
4632
|
-
▸
|
4684
|
+
▸ **isUndefined**(`value`): `boolean`
|
4633
4685
|
|
4634
4686
|
#### Parameters
|
4635
4687
|
|
@@ -4669,7 +4721,7 @@ ___
|
|
4669
4721
|
|
4670
4722
|
### serialize
|
4671
4723
|
|
4672
|
-
▸
|
4724
|
+
▸ **serialize**(`obj`, `cfg`, `fd?`, `pre?`): `FormData`
|
4673
4725
|
|
4674
4726
|
#### Parameters
|
4675
4727
|
|
@@ -4692,7 +4744,7 @@ ___
|
|
4692
4744
|
|
4693
4745
|
### useStandardField
|
4694
4746
|
|
4695
|
-
▸ **useStandardField**<`TValue`\>(
|
4747
|
+
▸ **useStandardField**<`TValue`\>(`«destructured»`): [`CustomFieldInputProps`<`TValue`\>, `CustomFieldMetaProps`<`TValue`\>]
|
4696
4748
|
|
4697
4749
|
Provides a consistent way to deal with all form fields (non array).
|
4698
4750
|
|
@@ -4706,7 +4758,7 @@ Provides a consistent way to deal with all form fields (non array).
|
|
4706
4758
|
|
4707
4759
|
| Name | Type |
|
4708
4760
|
| :------ | :------ |
|
4709
|
-
|
|
4761
|
+
| `«destructured»` | [`useStandardFieldProps`](#interfacesusestandardfieldpropsmd)<`TValue`\> |
|
4710
4762
|
|
4711
4763
|
#### Returns
|
4712
4764
|
|
@@ -4745,6 +4797,10 @@ packages/envoc-form/src/Field/useStandardField.ts:24
|
|
4745
4797
|
|
4746
4798
|
`Element`
|
4747
4799
|
|
4800
|
+
##### Defined in
|
4801
|
+
|
4802
|
+
packages/envoc-form/src/Form/Form.tsx:214
|
4803
|
+
|
4748
4804
|
|
4749
4805
|
<a name="modulesnormalizersmd"></a>
|
4750
4806
|
|
@@ -4763,7 +4819,7 @@ packages/envoc-form/src/Field/useStandardField.ts:24
|
|
4763
4819
|
|
4764
4820
|
#### phoneNumber
|
4765
4821
|
|
4766
|
-
▸
|
4822
|
+
▸ **phoneNumber**(`value`): `undefined` \| `string`
|
4767
4823
|
|
4768
4824
|
Normalizer for converting a string into a valid phone number.
|
4769
4825
|
|
@@ -4785,7 +4841,7 @@ ___
|
|
4785
4841
|
|
4786
4842
|
#### zipCode
|
4787
4843
|
|
4788
|
-
▸
|
4844
|
+
▸ **zipCode**(`value`): `undefined` \| `string`
|
4789
4845
|
|
4790
4846
|
Normalizer for converting a string into a valid zip code. Allows for XXXXX and XXXXX-XXXX format.
|
4791
4847
|
|
@@ -4829,7 +4885,7 @@ packages/envoc-form/src/Normalization/normalizers.ts:35
|
|
4829
4885
|
|
4830
4886
|
#### any
|
4831
4887
|
|
4832
|
-
▸
|
4888
|
+
▸ **any**<`TValue`\>(`validatorList`): (`value`: `TValue`) => `undefined` \| `string`
|
4833
4889
|
|
4834
4890
|
One of the validators provided must be true.
|
4835
4891
|
|
@@ -4863,13 +4919,13 @@ One of the validators provided must be true.
|
|
4863
4919
|
|
4864
4920
|
##### Defined in
|
4865
4921
|
|
4866
|
-
packages/envoc-form/src/Validation/validators.ts:
|
4922
|
+
packages/envoc-form/src/Validation/validators.ts:66
|
4867
4923
|
|
4868
4924
|
___
|
4869
4925
|
|
4870
4926
|
#### integer
|
4871
4927
|
|
4872
|
-
▸
|
4928
|
+
▸ **integer**(`val`): `undefined` \| ``"Must be a whole number"``
|
4873
4929
|
|
4874
4930
|
##### Parameters
|
4875
4931
|
|
@@ -4889,7 +4945,7 @@ ___
|
|
4889
4945
|
|
4890
4946
|
#### length
|
4891
4947
|
|
4892
|
-
▸
|
4948
|
+
▸ **length**(`len`): (`value`: `undefined` \| ``null`` \| `string` \| `number`) => `undefined` \| `string`
|
4893
4949
|
|
4894
4950
|
Asserts that the value is a certain number of characters. numbers are coerced to a string
|
4895
4951
|
|
@@ -4917,13 +4973,13 @@ Asserts that the value is a certain number of characters. numbers are coerced to
|
|
4917
4973
|
|
4918
4974
|
##### Defined in
|
4919
4975
|
|
4920
|
-
packages/envoc-form/src/Validation/validators.ts:
|
4976
|
+
packages/envoc-form/src/Validation/validators.ts:14
|
4921
4977
|
|
4922
4978
|
___
|
4923
4979
|
|
4924
4980
|
#### maxCount
|
4925
4981
|
|
4926
|
-
▸
|
4982
|
+
▸ **maxCount**(`count`): (`value`: `undefined` \| ``null`` \| { `isDeleted?`: `boolean` }[]) => `undefined` \| `string`
|
4927
4983
|
|
4928
4984
|
##### Parameters
|
4929
4985
|
|
@@ -4949,13 +5005,13 @@ ___
|
|
4949
5005
|
|
4950
5006
|
##### Defined in
|
4951
5007
|
|
4952
|
-
packages/envoc-form/src/Validation/validators.ts:
|
5008
|
+
packages/envoc-form/src/Validation/validators.ts:35
|
4953
5009
|
|
4954
5010
|
___
|
4955
5011
|
|
4956
5012
|
#### maxLength
|
4957
5013
|
|
4958
|
-
▸
|
5014
|
+
▸ **maxLength**(`len`): (`value`: `undefined` \| ``null`` \| `string` \| `number`) => `undefined` \| `string`
|
4959
5015
|
|
4960
5016
|
##### Parameters
|
4961
5017
|
|
@@ -4981,13 +5037,13 @@ ___
|
|
4981
5037
|
|
4982
5038
|
##### Defined in
|
4983
5039
|
|
4984
|
-
packages/envoc-form/src/Validation/validators.ts:
|
5040
|
+
packages/envoc-form/src/Validation/validators.ts:29
|
4985
5041
|
|
4986
5042
|
___
|
4987
5043
|
|
4988
5044
|
#### maxValue
|
4989
5045
|
|
4990
|
-
▸
|
5046
|
+
▸ **maxValue**(`max`): (`value`: `undefined` \| ``null`` \| `number`) => `undefined` \| `string`
|
4991
5047
|
|
4992
5048
|
##### Parameters
|
4993
5049
|
|
@@ -5019,7 +5075,7 @@ ___
|
|
5019
5075
|
|
5020
5076
|
#### minCount
|
5021
5077
|
|
5022
|
-
▸
|
5078
|
+
▸ **minCount**(`count`): (`value`: `undefined` \| ``null`` \| { `isDeleted?`: `boolean` }[]) => `undefined` \| `string`
|
5023
5079
|
|
5024
5080
|
##### Parameters
|
5025
5081
|
|
@@ -5045,13 +5101,13 @@ ___
|
|
5045
5101
|
|
5046
5102
|
##### Defined in
|
5047
5103
|
|
5048
|
-
packages/envoc-form/src/Validation/validators.ts:
|
5104
|
+
packages/envoc-form/src/Validation/validators.ts:42
|
5049
5105
|
|
5050
5106
|
___
|
5051
5107
|
|
5052
5108
|
#### minValue
|
5053
5109
|
|
5054
|
-
▸
|
5110
|
+
▸ **minValue**(`min`): (`value`: `undefined` \| ``null`` \| `number`) => `undefined` \| `string`
|
5055
5111
|
|
5056
5112
|
##### Parameters
|
5057
5113
|
|
@@ -5083,7 +5139,7 @@ ___
|
|
5083
5139
|
|
5084
5140
|
#### required
|
5085
5141
|
|
5086
|
-
▸
|
5142
|
+
▸ **required**(`value`): `undefined` \| ``"Required"``
|
5087
5143
|
|
5088
5144
|
##### Parameters
|
5089
5145
|
|
@@ -5103,7 +5159,7 @@ ___
|
|
5103
5159
|
|
5104
5160
|
#### zipCode
|
5105
5161
|
|
5106
|
-
▸
|
5162
|
+
▸ **zipCode**(`value`): `undefined` \| ``"Invalid ZIP Code"``
|
5107
5163
|
|
5108
5164
|
Validate for a ZIP Code. Accepts formats: ##### and #####-####
|
5109
5165
|
|