ingeniuscliq-core 0.3.42 → 0.3.43

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.
@@ -11,7 +11,7 @@ interface FormSelectProps<T extends FieldValues = FieldValues> extends BaseStyle
11
11
  }>;
12
12
  readonly className: string;
13
13
  readonly selectClassName: string;
14
- onValueChange?: (value: string) => void;
14
+ readonly onValueChange?: (value: string) => void;
15
15
  readonly selectProps?: React.ComponentProps<typeof Select>;
16
16
  }
17
17
  export declare function FormSelect<T extends FieldValues = FieldValues>({ control, name, placeholder, className, options, selectClassName, onValueChange, selectProps }: FormSelectProps<T>): import("react/jsx-runtime").JSX.Element;
package/dist/index.js CHANGED
@@ -2231,7 +2231,7 @@ class Bv {
2231
2231
  const n = await this.authService.getUser(), { user: r, token: o, refreshToken: a } = n.data;
2232
2232
  return t((s) => ({ ...s, user: r, token: o, refreshToken: a, isAuthenticated: !!r, loading: !1 })), n.data;
2233
2233
  } catch (n) {
2234
- throw t((r) => ({ ...r, error: n, loading: !1 })), n;
2234
+ throw t(() => ({ user: null, token: null, refreshToken: null, error: n, loading: !1 })), n;
2235
2235
  }
2236
2236
  },
2237
2237
  login: async (n) => {
@@ -2240,7 +2240,7 @@ class Bv {
2240
2240
  const r = await this.authService.login(n), { user: o, token: a, refreshToken: s } = r.data;
2241
2241
  return t((i) => ({ ...i, user: o, token: a, refreshToken: s ?? null, isAuthenticated: !!o, loading: !1 })), r.data;
2242
2242
  } catch (r) {
2243
- throw t((o) => ({ ...o, error: r, loading: !1 })), r;
2243
+ throw t(() => ({ user: null, token: null, refreshToken: null, error: r, loading: !1 })), r;
2244
2244
  }
2245
2245
  },
2246
2246
  register: async (n) => {
@@ -2249,7 +2249,7 @@ class Bv {
2249
2249
  const r = await this.authService.register(n), { user: o, token: a, refreshToken: s } = r.data;
2250
2250
  return t((i) => ({ ...i, user: o, token: a, refreshToken: s ?? null, isAuthenticated: !!o, loading: !1 })), r.data;
2251
2251
  } catch (r) {
2252
- throw t((o) => ({ ...o, error: r, loading: !1 })), r;
2252
+ throw t(() => ({ user: null, token: null, refreshToken: null, error: r, loading: !1 })), r;
2253
2253
  }
2254
2254
  },
2255
2255
  logout: async () => {
@@ -2258,7 +2258,7 @@ class Bv {
2258
2258
  const n = await this.authService.getUser(), { user: r, token: o, refreshToken: a } = n.data ?? {};
2259
2259
  t((s) => ({ ...s, user: r, token: o, refreshToken: a, isAuthenticated: !!r, loading: !1 }));
2260
2260
  } catch (n) {
2261
- t((r) => ({ ...r, error: n, loading: !1 }));
2261
+ throw t(() => ({ user: null, token: null, refreshToken: null, error: n, loading: !1 })), n;
2262
2262
  }
2263
2263
  },
2264
2264
  refreshUserToken: async () => {
@@ -2267,7 +2267,7 @@ class Bv {
2267
2267
  const n = await this.authService.refreshToken(), { token: r, refreshToken: o } = n.data;
2268
2268
  return t((a) => ({ ...a, token: r, refreshToken: o, loading: !1 })), n.data;
2269
2269
  } catch (n) {
2270
- throw t((r) => ({ ...r, error: n, loading: !1 })), n;
2270
+ throw t(() => ({ user: null, token: null, refreshToken: null, error: n, loading: !1 })), n;
2271
2271
  }
2272
2272
  },
2273
2273
  reset: () => t(this.initialState)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ingeniuscliq-core",
3
- "version": "0.3.42",
3
+ "version": "0.3.43",
4
4
  "description": "IngeniusCliq Core UI y lógica compartida",
5
5
  "license": "MIT",
6
6
  "type": "module",