fui-material 1.17.1 → 1.17.2

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.
@@ -9076,8 +9076,9 @@ ke.formToJSON = (i) => or(H.isHTMLForm(i) ? new FormData(i) : i);
9076
9076
  ke.getAdapter = mr.getAdapter;
9077
9077
  ke.HttpStatusCode = nn;
9078
9078
  ke.default = ke;
9079
- const Ma = ({ doNotUseState: i = !1, defaultState: e = null }) => {
9080
- const [t, r] = ze(e), [n, s] = ze(!1), [a, o] = ze(null), l = async (m) => {
9079
+ const Ma = ({ doNotUseState: i = !1, defaultState: e = null } = {}) => {
9080
+ const [t, r] = ze(e === void 0 ? null : e), [n, s] = ze(!1), [a, o] = ze(null);
9081
+ return { data: t, loading: n, error: a, execute: async (m) => {
9081
9082
  var v, b, d;
9082
9083
  s(!0), o(null);
9083
9084
  try {
@@ -9095,10 +9096,9 @@ const Ma = ({ doNotUseState: i = !1, defaultState: e = null }) => {
9095
9096
  } finally {
9096
9097
  s(!1);
9097
9098
  }
9098
- }, u = (m) => {
9099
- r(m);
9100
- };
9101
- return i ? { loading: n, error: a, execute: l } : { data: t, loading: n, error: a, execute: l, reset: u };
9099
+ }, reset: (m) => {
9100
+ i || r(m);
9101
+ } };
9102
9102
  };
9103
9103
  export {
9104
9104
  aa as FAccordion,
@@ -1,14 +1,14 @@
1
1
  import { AxiosRequestConfig } from 'axios';
2
2
  export type IUseFApi<T> = {
3
- data?: T | null;
3
+ data: T | null;
4
4
  loading: boolean;
5
5
  error: string | null;
6
6
  execute: (config: AxiosRequestConfig) => Promise<T | null>;
7
- reset?: (newData: T | null) => void;
7
+ reset: (newData: T | null) => void;
8
8
  };
9
9
  type IProps<T> = {
10
10
  doNotUseState?: boolean;
11
11
  defaultState?: T | null;
12
12
  };
13
- declare const useFApi: <T>({ doNotUseState, defaultState }: IProps<T>) => IUseFApi<T>;
13
+ declare const useFApi: <T>({ doNotUseState, defaultState }?: IProps<T>) => IUseFApi<T>;
14
14
  export default useFApi;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fui-material",
3
- "version": "1.17.1",
3
+ "version": "1.17.2",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org/"