@arquimedes.co/eureka-forms 2.0.1-test → 2.0.2-test

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.
@@ -1,11 +1,12 @@
1
1
  /// <reference types="react" />
2
- import { UseFormReturn } from 'react-hook-form';
3
2
  import { StepProps } from './Step';
4
3
  import { Form } from '../@Types';
5
4
  import { GlobalState } from '../States/GlobalStateReducer';
6
- export interface CustomStepProps extends StepProps, UseFormReturn, GlobalState {
5
+ import { WidthStats } from '../Form/Form';
6
+ export interface CustomStepProps extends StepProps, GlobalState {
7
7
  form: Form;
8
8
  customStepProps: Record<string, any>;
9
+ widthStats: WidthStats;
9
10
  }
10
11
  export interface CustomStep {
11
12
  componentProps?: Record<string, any>;
@@ -20,7 +20,6 @@ var __rest = (this && this.__rest) || function (s, e) {
20
20
  }
21
21
  return t;
22
22
  };
23
- import { useFormContext } from 'react-hook-form';
24
23
  import FormContext from '../Contexts/FormContext';
25
24
  import { useAppSelector } from '../hooks';
26
25
  import CustomStepPropsContext from '../Contexts/CustomContext';
@@ -31,7 +30,7 @@ function CustomStepComponent(_a) {
31
30
  var form = useContext(FormContext);
32
31
  var global = useAppSelector(function (state) { return state.global; });
33
32
  var customStepProps = useContext(CustomStepPropsContext);
34
- var formController = useFormContext();
35
- return customStep.component(__assign(__assign(__assign(__assign(__assign({}, props), formController), { form: form, customStepProps: customStepProps }), global), ((_b = customStep.componentProps) !== null && _b !== void 0 ? _b : {})));
33
+ var widthStats = useAppSelector(function (state) { return state.widthStats; });
34
+ return customStep.component(__assign(__assign(__assign(__assign({}, props), { widthStats: widthStats, form: form, customStepProps: customStepProps }), global), ((_b = customStep.componentProps) !== null && _b !== void 0 ? _b : {})));
36
35
  }
37
36
  export default CustomStepComponent;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@arquimedes.co/eureka-forms",
3
3
  "repository": "git://github.com/Arquimede5/Eureka-Forms.git",
4
- "version":"2.0.1-test",
4
+ "version":"2.0.2-test",
5
5
  "scripts": {
6
6
  "start": "react-scripts start",
7
7
  "build": "react-scripts build",