envoc-form 4.5.0 → 4.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -8008,7 +8008,7 @@ ___
8008
8008
 
8009
8009
  #### Defined in
8010
8010
 
8011
- packages/envoc-form/src/Form/Form.tsx:32
8011
+ packages/envoc-form/src/Form/Form.tsx:33
8012
8012
 
8013
8013
  ___
8014
8014
 
@@ -8024,7 +8024,7 @@ ___
8024
8024
 
8025
8025
  #### Defined in
8026
8026
 
8027
- packages/envoc-form/src/Form/Form.tsx:72
8027
+ packages/envoc-form/src/Form/Form.tsx:75
8028
8028
 
8029
8029
  ___
8030
8030
 
@@ -8477,7 +8477,7 @@ Define a form. Uses [formik](https://formik.org/docs/overview). Usually contains
8477
8477
 
8478
8478
  #### Defined in
8479
8479
 
8480
- packages/envoc-form/src/Form/Form.tsx:78
8480
+ packages/envoc-form/src/Form/Form.tsx:81
8481
8481
 
8482
8482
  ___
8483
8483
 
package/es/Form/Form.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { CSSProperties, ElementType } from 'react';
2
- import { FormikHelpers } from 'formik';
2
+ import { FormikHelpers, FormikProps } from 'formik';
3
3
  import { FieldProps } from '../Field/Field';
4
4
  import { FieldArrayProps } from '../FieldArray/FieldArray';
5
5
  import { ValidatedApiResult } from '../Validation/ValidatedApiResult';
@@ -20,6 +20,8 @@ export interface FullFormProps<TForm extends object> {
20
20
  ignoreLostChanges?: boolean;
21
21
  /** The intitial values of the form. */
22
22
  initialValues?: TForm;
23
+ /** A ref to the form element. */
24
+ innerRef?: React.Ref<FormikProps<TForm>>;
23
25
  }
24
26
  declare type RequireAtLeastOne<T, Keys extends keyof T = keyof T> = Pick<T, Exclude<keyof T, Keys>> & {
25
27
  [K in Keys]-?: Required<Pick<T, K>> & Partial<Pick<T, Exclude<Keys, K>>>;
@@ -1,5 +1,5 @@
1
1
  import { CSSProperties, ElementType } from 'react';
2
- import { FormikHelpers } from 'formik';
2
+ import { FormikHelpers, FormikProps } from 'formik';
3
3
  import { FieldProps } from '../Field/Field';
4
4
  import { FieldArrayProps } from '../FieldArray/FieldArray';
5
5
  import { ValidatedApiResult } from '../Validation/ValidatedApiResult';
@@ -20,6 +20,8 @@ export interface FullFormProps<TForm extends object> {
20
20
  ignoreLostChanges?: boolean;
21
21
  /** The intitial values of the form. */
22
22
  initialValues?: TForm;
23
+ /** A ref to the form element. */
24
+ innerRef?: React.Ref<FormikProps<TForm>>;
23
25
  }
24
26
  declare type RequireAtLeastOne<T, Keys extends keyof T = keyof T> = Pick<T, Exclude<keyof T, Keys>> & {
25
27
  [K in Keys]-?: Required<Pick<T, K>> & Partial<Pick<T, Exclude<Keys, K>>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "envoc-form",
3
- "version": "4.5.0",
3
+ "version": "4.7.0",
4
4
  "description": "Envoc form components",
5
5
  "keywords": [
6
6
  "react-component",
@@ -38,7 +38,7 @@
38
38
  "axios": "^0.30.0",
39
39
  "classnames": "^2.3.1",
40
40
  "date-fns": "^2.22.1",
41
- "envoc-request": "^4.5.0",
41
+ "envoc-request": "^4.7.0",
42
42
  "lru-cache": "^6.0.0",
43
43
  "prop-types": "^15.7.2",
44
44
  "react-date-picker": "^8.2.0",
package/src/Form/Form.tsx CHANGED
@@ -11,6 +11,7 @@ import {
11
11
  Formik,
12
12
  FormikHelpers,
13
13
  useFormikContext,
14
+ FormikProps,
14
15
  } from 'formik';
15
16
  import FocusError from './FocusError';
16
17
  import FormBasedPreventNavigation from './FormBasedPreventNavigation';
@@ -59,6 +60,8 @@ export interface FullFormProps<TForm extends object> {
59
60
  ignoreLostChanges?: boolean;
60
61
  /** The intitial values of the form. */
61
62
  initialValues?: TForm;
63
+ /** A ref to the form element. */
64
+ innerRef?: React.Ref<FormikProps<TForm>>;
62
65
  }
63
66
 
64
67
  type RequireAtLeastOne<T, Keys extends keyof T = keyof T> = Pick<