@base-stone/hooks 1.1.8 → 1.2.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.
|
@@ -102,7 +102,7 @@ declare interface QueryResponse_2<T> {
|
|
|
102
102
|
|
|
103
103
|
declare type QueryResult<K extends string = string, T = Record<string, any> | Record<string, any>[]> = {
|
|
104
104
|
loading: boolean;
|
|
105
|
-
refresh: () => void;
|
|
105
|
+
refresh: (params?: Record<string, any> | undefined) => void;
|
|
106
106
|
} & {
|
|
107
107
|
[P in K]?: T;
|
|
108
108
|
};
|
|
@@ -28,7 +28,7 @@ var q;
|
|
|
28
28
|
function te() {
|
|
29
29
|
return q || (q = 1, k.exports = ee()), k.exports;
|
|
30
30
|
}
|
|
31
|
-
var
|
|
31
|
+
var ae = te();
|
|
32
32
|
function y(n) {
|
|
33
33
|
const o = O(n);
|
|
34
34
|
o.current = J(() => n, [n]);
|
|
@@ -129,7 +129,7 @@ function ce({
|
|
|
129
129
|
pagination: { ...d, showTotal: b },
|
|
130
130
|
onChange: y(H),
|
|
131
131
|
locale: {
|
|
132
|
-
emptyText: f ? "" : /* @__PURE__ */
|
|
132
|
+
emptyText: f ? "" : /* @__PURE__ */ ae.jsx(j, { image: j.PRESENTED_IMAGE_SIMPLE })
|
|
133
133
|
}
|
|
134
134
|
}
|
|
135
135
|
};
|
|
@@ -207,7 +207,7 @@ function le(n) {
|
|
|
207
207
|
e(`${r}-${a}`, !1);
|
|
208
208
|
}, l;
|
|
209
209
|
}
|
|
210
|
-
const
|
|
210
|
+
const oe = (n, o = "value", t = "label") => new Map(n.map((e) => [e[o], e[t]]));
|
|
211
211
|
function ue({ queryFn: n, params: o, dataKey: t, fieldNames: e, transform: s }) {
|
|
212
212
|
const [r, d] = S({
|
|
213
213
|
list: [],
|
|
@@ -220,7 +220,7 @@ function ue({ queryFn: n, params: o, dataKey: t, fieldNames: e, transform: s })
|
|
|
220
220
|
data: h,
|
|
221
221
|
label: h[v],
|
|
222
222
|
value: h[$]
|
|
223
|
-
})), w =
|
|
223
|
+
})), w = oe(C);
|
|
224
224
|
d((h) => ({ ...h, list: C, mapData: w }));
|
|
225
225
|
} else
|
|
226
226
|
d((v) => ({ ...v, list: b }));
|
|
@@ -264,7 +264,7 @@ function pe({
|
|
|
264
264
|
const r = s || (t === "Array" ? [] : /* @__PURE__ */ Object.create({})), [d, p] = S(r), [l, a] = S(!1), i = async (g) => {
|
|
265
265
|
a(!0);
|
|
266
266
|
const m = await n(g ?? o);
|
|
267
|
-
p(m.data);
|
|
267
|
+
p(m.data), a(!1);
|
|
268
268
|
}, f = F(i);
|
|
269
269
|
z(() => {
|
|
270
270
|
f();
|