@bluemarble/bm-components 0.0.100 → 0.1.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/dist/index.mjs CHANGED
@@ -3990,7 +3990,7 @@ var ApiHelper = class _ApiHelper {
3990
3990
 
3991
3991
  // src/hooks/useFormHelper.ts
3992
3992
  import axios from "axios";
3993
- import { useEffect as useEffect5, useRef as useRef4 } from "react";
3993
+ import { useContext as useContext3, useEffect as useEffect5, useRef as useRef4 } from "react";
3994
3994
 
3995
3995
  // src/hooks/useAlert.ts
3996
3996
  import { useContext as useContext2 } from "react";
@@ -4078,10 +4078,16 @@ function useLoading() {
4078
4078
  return { isLoading, setLoading };
4079
4079
  }
4080
4080
 
4081
+ // src/contexts/FormHelperProvider.tsx
4082
+ import React28 from "react";
4083
+ import { createContext as createContext3 } from "react";
4084
+ var FormHelperContext = createContext3({});
4085
+
4081
4086
  // src/hooks/useFormHelper.ts
4082
- function useFormHelper({ formatErrorMessage, api }) {
4087
+ function useFormHelper() {
4083
4088
  const alertProps = useAlert();
4084
4089
  const loadingProps = useLoading();
4090
+ const { api, formatErrorMessage } = useContext3(FormHelperContext);
4085
4091
  const { createAlert } = alertProps;
4086
4092
  const { setLoading } = loadingProps;
4087
4093
  const sourceRef = useRef4();