hanap-labs 7.4.0 → 7.5.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.
@@ -3141,37 +3141,41 @@ async function rn(e) {
3141
3141
  }
3142
3142
  function an(e = {}) {
3143
3143
  return function(n, r) {
3144
- let { queryKey: i, onSuccess: s, onError: c, enabled: l, ...u } = r ?? {}, d = nn(), f = [], p = [];
3145
- s !== void 0 && f.push(s), c !== void 0 && p.push(c);
3146
- let m = Zt({
3147
- queryKey: t(() => i === void 0 ? d : typeof i == "function" ? i() : a(i)),
3148
- queryFn: (e) => n({
3149
- queryKey: e.queryKey,
3150
- signal: e.signal
3151
- }),
3152
- enabled: t(() => tn(l)),
3153
- ...$t,
3154
- ...e,
3155
- ...u
3156
- });
3157
- f.length > 0 && o(() => m.data.value, (e) => {
3158
- if (e !== void 0) for (let t of f) t(e);
3159
- }, { immediate: !1 }), p.length > 0 && o(() => m.error.value, (e) => {
3160
- if (e !== null) for (let t of p) t(e);
3144
+ let i = nn(), s = [], c = t(() => r?.queryKey === void 0 ? i : typeof r.queryKey == "function" ? r.queryKey() : a(r.queryKey)), l = t(() => tn(r?.enabled)), u = Zt(t(() => {
3145
+ let { queryKey: t, onSuccess: i, onError: a, enabled: o, ...s } = r ?? {};
3146
+ return {
3147
+ queryKey: c.value,
3148
+ queryFn: (e) => n({
3149
+ queryKey: e.queryKey,
3150
+ signal: e.signal
3151
+ }),
3152
+ enabled: l.value,
3153
+ ...$t,
3154
+ ...e,
3155
+ ...s
3156
+ };
3157
+ }));
3158
+ o(() => u.data.value, (e) => {
3159
+ e !== void 0 && r?.onSuccess !== void 0 && r.onSuccess(e);
3160
+ }, { immediate: !1 }), o(() => u.error.value, (e) => {
3161
+ if (e !== null) {
3162
+ r?.onError !== void 0 && r.onError(e);
3163
+ for (let t of s) t(e);
3164
+ }
3161
3165
  }, { immediate: !1 });
3162
- let h = () => rn(m.refetch), g = {
3163
- data: X(m.data),
3164
- error: X(m.error),
3165
- isError: X(m.isError),
3166
- loading: X(m.isFetching),
3167
- initializing: X(m.isLoading),
3168
- isSuccess: X(m.isSuccess),
3169
- onError: (e) => (p.push(e), g),
3170
- refetch: h,
3171
- run: h,
3172
- status: X(m.status)
3166
+ let d = () => rn(u.refetch), f = {
3167
+ data: X(u.data),
3168
+ error: X(u.error),
3169
+ isError: X(u.isError),
3170
+ loading: X(u.isFetching),
3171
+ initializing: X(u.isLoading),
3172
+ isSuccess: X(u.isSuccess),
3173
+ onError: (e) => (s.push(e), f),
3174
+ refetch: d,
3175
+ run: d,
3176
+ status: X(u.status)
3173
3177
  };
3174
- return g;
3178
+ return f;
3175
3179
  };
3176
3180
  }
3177
3181
  var on = an();
@@ -1,3 +1,3 @@
1
- import { a as e, c as t, i as n, n as r, o as i, r as a, s as o, t as s } from "../chunks/composables-Dfe_Im7E.js";
1
+ import { a as e, c as t, i as n, n as r, o as i, r as a, s as o, t as s } from "../chunks/composables-DgM66mjz.js";
2
2
  import { n as c, r as l, t as u } from "../chunks/usePopup-C4TqBG3M.js";
3
3
  export { n as createQueryPlugin, r as createUseMutation, e as createUseQuery, t as themePresets, l as useFloat, s as useForm, a as useMutation, c as useNotify, u as usePopup, i as useQuery, o as useTheme };
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c } from "./chunks/composables-Dfe_Im7E.js";
1
+ import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c } from "./chunks/composables-DgM66mjz.js";
2
2
  import { A as l, C as u, D as d, E as f, O as ee, S as te, T as ne, _ as re, a as ie, b as ae, c as oe, d as se, f as ce, g as le, h as ue, i as de, k as fe, l as pe, m as me, n as he, o as ge, p as _e, r as ve, s as ye, t as be, u as xe, v as Se, w as Ce, x as we, y as Te } from "./chunks/components-jVa5T9J6.js";
3
3
  import { n as Ee, r as De, t as Oe } from "./chunks/usePopup-C4TqBG3M.js";
4
4
  import { t as ke } from "./chunks/helpers-BjMDD0mP.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hanap-labs",
3
- "version": "7.4.0",
3
+ "version": "7.5.0",
4
4
  "license": "MIT",
5
5
  "keywords": [
6
6
  "vue",