@declarion/react 0.432.0 → 0.443.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.
@@ -3,80 +3,81 @@ import { Btn as t } from "../primitives/Btn.js";
3
3
  import { Icon as n } from "../primitives/Icons.js";
4
4
  import { IconBtn as r } from "../primitives/IconBtn.js";
5
5
  import { Kbd as i } from "../primitives/Kbd.js";
6
- import { renderSchemaField as ee } from "../file-widgets/host.js";
7
- import { useActionRunner as a } from "../actions/ActionRunner.js";
6
+ import { renderSchemaField as a } from "../file-widgets/host.js";
7
+ import { useActionRunner as ee } from "../actions/ActionRunner.js";
8
8
  import { PeekFieldCell as o } from "./PeekFieldCell.js";
9
9
  import { applyRowState as s, defaultFlatForSlot as c, filterLayoutForSlot as l } from "../../lib/actions.js";
10
10
  import { ResponsiveActionBar as u } from "../actions/ResponsiveActionBar.js";
11
11
  import { effectiveScreenForRecord as d, variantActionCodesForRecord as f } from "../../lib/variants.js";
12
- import { useText as p } from "../../hooks/useText.js";
13
- import { useRowTenant as m } from "../../hooks/useRowTenant.js";
14
- import { useUnsavedInput as h } from "../../hooks/useUnsavedInput.js";
15
- import { textWithNodes as g } from "../../lib/language.js";
16
- import { useEffect as _, useMemo as v, useRef as y, useState as b } from "react";
17
- import { Fragment as x, jsx as S, jsxs as C } from "react/jsx-runtime";
12
+ import { useText as te } from "../../hooks/useText.js";
13
+ import { useRowTenant as p } from "../../hooks/useRowTenant.js";
14
+ import { useUnsavedInput as m } from "../../hooks/useUnsavedInput.js";
15
+ import { textWithNodes as ne } from "../../lib/language.js";
16
+ import { inheritRowReferences as h } from "../../lib/reference.js";
17
+ import { useEffect as g, useMemo as _, useRef as v, useState as y } from "react";
18
+ import { Fragment as b, jsx as x, jsxs as S } from "react/jsx-runtime";
18
19
  // src/components/list/QuickPeek.tsx
19
- var w = {
20
+ var C = {
20
21
  tab: "Tab",
21
22
  esc: "Esc"
22
23
  };
23
- function T({ entity: T, entityCode: D, record: O, title: k, recordId: A, avatarName: j, fields: M, refs: N, screen: te, actions: P, screenActionLayout: F, entityActionLayout: I, executeAction: L, onClose: R, onOpen: z, onSave: B }) {
24
- let V = p(), H = m(T), [U, W] = b({ ...O }), [G, K] = b(!1);
25
- h(G);
26
- let q = y(null), { run: J } = a(), Y = d(T, te, U);
27
- _(() => {
28
- W({ ...O }), K(!1);
29
- }, [O]), _(() => {
30
- q.current?.focus();
24
+ function w({ entity: w, entityCode: E, record: D, title: O, recordId: k, avatarName: A, fields: j, refs: M, entities: re, screens: N, screen: P, actions: F, screenActionLayout: I, entityActionLayout: L, executeAction: R, onClose: z, onOpen: B, onSave: V }) {
25
+ let H = te(), U = p(w), [W, G] = y(() => h(D, { ...D })), [K, q] = y(!1);
26
+ m(K);
27
+ let J = v(null), { run: Y } = ee(), X = d(w, P, W);
28
+ g(() => {
29
+ G(h(D, { ...D })), q(!1);
30
+ }, [D]), g(() => {
31
+ J.current?.focus();
31
32
  }, []);
32
- let X = v(() => {
33
- let e = Y?.action_layout ?? F ?? I ?? c(P, "quick_peek"), t = l(e, P, void 0, "quick_peek");
34
- return s(V, t, P, void 0, U, [], H, f(T, U));
33
+ let Z = _(() => {
34
+ let e = X?.action_layout ?? I ?? L ?? c(F, "quick_peek"), t = l(e, F, void 0, "quick_peek");
35
+ return s(H, t, F, void 0, W, [], U, f(w, W));
35
36
  }, [
36
- V,
37
- Y?.action_layout,
38
- F,
37
+ H,
38
+ X?.action_layout,
39
39
  I,
40
- P,
41
- U,
42
- T,
43
- H
44
- ]), Z = ({ code: e, action: t }) => {
45
- J({
40
+ L,
41
+ F,
42
+ W,
43
+ w,
44
+ U
45
+ ]), ie = ({ code: e, action: t }) => {
46
+ Y({
46
47
  action: t,
47
- title: V(t.display?.name) || e,
48
- row: U,
49
- execute: (n) => L(e, t, n)
48
+ title: H(t.display?.name) || e,
49
+ row: W,
50
+ execute: (n) => R(e, t, n)
50
51
  });
51
52
  }, Q = (e, t) => {
52
- let n = {
53
- ...U,
53
+ let n = h(D, {
54
+ ...W,
54
55
  [e]: t
55
- };
56
- W(n), K(!0), B?.(n);
57
- }, ne = Y?.quick_peek?.width ?? 480, $ = M.some((e) => !e.readOnly);
58
- return /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S("div", {
59
- onClick: R,
56
+ });
57
+ G(n), q(!0), V?.(n);
58
+ }, ae = X?.quick_peek?.width ?? 480, $ = j.some((e) => !e.readOnly && (e.kind !== "field" || !e.field.ref?.entity_field));
59
+ return /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ x("div", {
60
+ onClick: z,
60
61
  style: {
61
62
  position: "fixed",
62
63
  inset: 0,
63
64
  background: "var(--scrim-lite)",
64
65
  zIndex: 40
65
66
  }
66
- }), /* @__PURE__ */ C("aside", {
67
- ref: q,
67
+ }), /* @__PURE__ */ S("aside", {
68
+ ref: J,
68
69
  role: "dialog",
69
- "aria-label": V("list.peek.dialog", "Quick peek"),
70
+ "aria-label": H("list.peek.dialog", "Quick peek"),
70
71
  tabIndex: -1,
71
72
  onKeyDown: (e) => {
72
- e.key === "Escape" && R();
73
+ e.key === "Escape" && z();
73
74
  },
74
75
  style: {
75
76
  position: "fixed",
76
77
  top: "var(--topbar-h)",
77
78
  right: 0,
78
79
  bottom: "var(--tabbar-h)",
79
- width: ne,
80
+ width: ae,
80
81
  background: "var(--surface)",
81
82
  borderLeft: "1px solid var(--border)",
82
83
  zIndex: 41,
@@ -85,7 +86,7 @@ function T({ entity: T, entityCode: D, record: O, title: k, recordId: A, avatarN
85
86
  boxShadow: "var(--shadow-lg)"
86
87
  },
87
88
  children: [
88
- /* @__PURE__ */ C("div", {
89
+ /* @__PURE__ */ S("div", {
89
90
  style: {
90
91
  display: "flex",
91
92
  alignItems: "center",
@@ -94,16 +95,16 @@ function T({ entity: T, entityCode: D, record: O, title: k, recordId: A, avatarN
94
95
  gap: 10
95
96
  },
96
97
  children: [
97
- /* @__PURE__ */ S(e, {
98
- name: j || k,
98
+ /* @__PURE__ */ x(e, {
99
+ name: A || O,
99
100
  size: 28
100
101
  }),
101
- /* @__PURE__ */ C("div", {
102
+ /* @__PURE__ */ S("div", {
102
103
  style: {
103
104
  flex: 1,
104
105
  minWidth: 0
105
106
  },
106
- children: [/* @__PURE__ */ S("div", {
107
+ children: [/* @__PURE__ */ x("div", {
107
108
  style: {
108
109
  fontSize: 14,
109
110
  fontWeight: 600,
@@ -112,29 +113,29 @@ function T({ entity: T, entityCode: D, record: O, title: k, recordId: A, avatarN
112
113
  textOverflow: "ellipsis",
113
114
  whiteSpace: "nowrap"
114
115
  },
115
- children: k
116
- }), A && /* @__PURE__ */ S("div", {
116
+ children: O
117
+ }), k && /* @__PURE__ */ x("div", {
117
118
  className: "mono",
118
119
  style: {
119
120
  fontSize: 11,
120
121
  color: "var(--text-4)"
121
122
  },
122
- children: A
123
+ children: k
123
124
  })]
124
125
  }),
125
- /* @__PURE__ */ S(r, {
126
- icon: /* @__PURE__ */ S(n.external, { size: 13 }),
127
- title: G ? V("list.peek.open_in_tab_dirty", "Open in tab (keeps unsaved changes)") : V("list.peek.open_in_tab", "Open in tab"),
128
- onClick: () => z(G ? U : null)
126
+ /* @__PURE__ */ x(r, {
127
+ icon: /* @__PURE__ */ x(n.external, { size: 13 }),
128
+ title: K ? H("list.peek.open_in_tab_dirty", "Open in tab (keeps unsaved changes)") : H("list.peek.open_in_tab", "Open in tab"),
129
+ onClick: () => B(K ? W : null)
129
130
  }),
130
- /* @__PURE__ */ S(r, {
131
- icon: /* @__PURE__ */ S(n.x, { size: 14 }),
132
- title: V("list.peek.close", "Close"),
133
- onClick: R
131
+ /* @__PURE__ */ x(r, {
132
+ icon: /* @__PURE__ */ x(n.x, { size: 14 }),
133
+ title: H("list.peek.close", "Close"),
134
+ onClick: z
134
135
  })
135
136
  ]
136
137
  }),
137
- /* @__PURE__ */ C("div", {
138
+ /* @__PURE__ */ S("div", {
138
139
  style: {
139
140
  flex: 1,
140
141
  overflowY: "auto",
@@ -143,7 +144,7 @@ function T({ entity: T, entityCode: D, record: O, title: k, recordId: A, avatarN
143
144
  flexDirection: "column",
144
145
  gap: 10
145
146
  },
146
- children: [/* @__PURE__ */ C("div", {
147
+ children: [/* @__PURE__ */ S("div", {
147
148
  style: {
148
149
  padding: "8px 10px",
149
150
  background: "var(--accent-soft)",
@@ -154,35 +155,37 @@ function T({ entity: T, entityCode: D, record: O, title: k, recordId: A, avatarN
154
155
  alignItems: "center",
155
156
  gap: 6
156
157
  },
157
- children: [$ && /* @__PURE__ */ S(n.sparkle, { size: 12 }), /* @__PURE__ */ C("span", { children: [$ && /* @__PURE__ */ C(x, { children: [V("list.peek.hint", "Inline quick-edit — click any field to change."), " "] }), g(V("list.peek.keys_hint", "{tab} to move, {esc} to close."), {
158
- tab: /* @__PURE__ */ S(i, { children: w.tab }),
159
- esc: /* @__PURE__ */ S(i, { children: w.esc })
158
+ children: [$ && /* @__PURE__ */ x(n.sparkle, { size: 12 }), /* @__PURE__ */ S("span", { children: [$ && /* @__PURE__ */ S(b, { children: [H("list.peek.hint", "Inline quick-edit — click any field to change."), " "] }), ne(H("list.peek.keys_hint", "{tab} to move, {esc} to close."), {
159
+ tab: /* @__PURE__ */ x(i, { children: C.tab }),
160
+ esc: /* @__PURE__ */ x(i, { children: C.esc })
160
161
  })] })]
161
- }), M.map((e) => /* @__PURE__ */ S(E, {
162
+ }), j.map((e) => /* @__PURE__ */ x(T, {
162
163
  label: e.label,
163
- children: e.kind === "file" ? ee({
164
- entity: T,
165
- entityCode: D,
164
+ children: e.kind === "file" ? a({
165
+ entity: w,
166
+ entityCode: E,
166
167
  fieldName: e.key,
167
- record: U,
168
+ record: W,
168
169
  mode: e.readOnly ? "display" : "edit",
169
170
  onChange: (t) => Q(e.key, t),
170
- refs: N,
171
+ refs: M,
171
172
  disabled: e.readOnly,
172
- t: V
173
- }) : /* @__PURE__ */ S(o, {
173
+ t: H
174
+ }) : /* @__PURE__ */ x(o, {
174
175
  field: e.field,
175
176
  fieldName: e.key,
176
177
  label: e.label,
177
- value: U[e.key],
178
- record: U,
179
- refs: N,
178
+ value: W[e.key],
179
+ record: W,
180
+ refs: M,
181
+ entities: re,
182
+ screens: N,
180
183
  readOnly: e.readOnly,
181
184
  onCommit: (t) => Q(e.key, t)
182
185
  })
183
186
  }, e.key))]
184
187
  }),
185
- /* @__PURE__ */ C("div", {
188
+ /* @__PURE__ */ S("div", {
186
189
  style: {
187
190
  display: "flex",
188
191
  padding: "10px 14px",
@@ -191,7 +194,7 @@ function T({ entity: T, entityCode: D, record: O, title: k, recordId: A, avatarN
191
194
  alignItems: "center"
192
195
  },
193
196
  children: [
194
- G && /* @__PURE__ */ C("span", {
197
+ K && /* @__PURE__ */ S("span", {
195
198
  style: {
196
199
  fontSize: 11,
197
200
  color: "var(--warn)",
@@ -199,46 +202,46 @@ function T({ entity: T, entityCode: D, record: O, title: k, recordId: A, avatarN
199
202
  alignItems: "center",
200
203
  gap: 4
201
204
  },
202
- children: [/* @__PURE__ */ S("span", { style: {
205
+ children: [/* @__PURE__ */ x("span", { style: {
203
206
  width: 6,
204
207
  height: 6,
205
208
  borderRadius: 999,
206
209
  background: "var(--warn)"
207
- } }), V("list.peek.unsaved", "Unsaved")]
210
+ } }), H("list.peek.unsaved", "Unsaved")]
208
211
  }),
209
- /* @__PURE__ */ S("div", {
212
+ /* @__PURE__ */ x("div", {
210
213
  style: {
211
214
  flex: 1,
212
215
  minWidth: 0,
213
216
  display: "flex",
214
217
  justifyContent: "flex-end"
215
218
  },
216
- children: X.length > 0 && /* @__PURE__ */ S(u, {
217
- layout: X,
218
- row: U,
219
- onRun: (e, t) => Z({
219
+ children: Z.length > 0 && /* @__PURE__ */ x(u, {
220
+ layout: Z,
221
+ row: W,
222
+ onRun: (e, t) => ie({
220
223
  code: e,
221
224
  action: t
222
225
  }),
223
226
  kind: "toolbar",
224
- entityActions: P,
227
+ entityActions: F,
225
228
  align: "trailing",
226
- ariaLabel: V("list.peek.actions", "Quick peek actions")
229
+ ariaLabel: H("list.peek.actions", "Quick peek actions")
227
230
  })
228
231
  }),
229
- /* @__PURE__ */ S(t, {
232
+ /* @__PURE__ */ x(t, {
230
233
  kind: "primary",
231
- icon: /* @__PURE__ */ S(n.edit, { size: 13 }),
232
- onClick: () => z(G ? U : null),
233
- children: V("list.peek.open_full", "Open full")
234
+ icon: /* @__PURE__ */ x(n.edit, { size: 13 }),
235
+ onClick: () => B(K ? W : null),
236
+ children: H("list.peek.open_full", "Open full")
234
237
  })
235
238
  ]
236
239
  })
237
240
  ]
238
241
  })] });
239
242
  }
240
- function E({ label: e, children: t }) {
241
- return /* @__PURE__ */ C("div", {
243
+ function T({ label: e, children: t }) {
244
+ return /* @__PURE__ */ S("div", {
242
245
  style: {
243
246
  display: "grid",
244
247
  gridTemplateColumns: "120px 1fr",
@@ -246,14 +249,14 @@ function E({ label: e, children: t }) {
246
249
  padding: "4px 0",
247
250
  borderBottom: "1px solid var(--divider)"
248
251
  },
249
- children: [/* @__PURE__ */ S("div", {
252
+ children: [/* @__PURE__ */ x("div", {
250
253
  style: {
251
254
  fontSize: 11.5,
252
255
  color: "var(--text-3)",
253
256
  fontWeight: 500
254
257
  },
255
258
  children: e
256
- }), /* @__PURE__ */ S("div", { children: t })]
259
+ }), /* @__PURE__ */ x("div", { children: t })]
257
260
  });
258
261
  }
259
- export { E as QEField, T as QuickPeek };
262
+ export { T as QEField, w as QuickPeek };
@@ -659,6 +659,9 @@ function m({ screenCode: s }) {
659
659
  return e && S.fields.get(e)?.type !== "uuid" ? we(G[e]) : void 0;
660
660
  })(),
661
661
  fields: Yn,
662
+ refs: H.current,
663
+ entities: _?.entities,
664
+ screens: _?.screens,
662
665
  screen: Ce(S, x, G),
663
666
  actions: Xn,
664
667
  screenActionLayout: Ce(S, x, G)?.action_layout,
@@ -2,139 +2,140 @@ import { entityCountQueryKey as e, entityDataQueryKey as t, entityDataQueryOptio
2
2
  import { cursorEntityDataQueryKey as a, useCursorEntityData as o } from "../../../hooks/useCursorEntityData.js";
3
3
  import { useRegisterRetainedQuery as s } from "../../../hooks/usePageStateRuntime.js";
4
4
  import { correctEstimateAgainstWindow as c } from "../../../lib/format-count.js";
5
- import { useCallback as l, useEffect as u, useMemo as d, useState as f } from "react";
6
- import { useQueryClient as p } from "@tanstack/react-query";
5
+ import { bindRowReferences as l } from "../../../lib/reference.js";
6
+ import { useCallback as u, useEffect as d, useMemo as f, useState as p } from "react";
7
+ import { useQueryClient as m } from "@tanstack/react-query";
7
8
  // src/components/pages/list/useListQuery.ts
8
- var m = 1e4, h = [];
9
- function g(f) {
10
- let m = p(), { entity: g, entityCode: v, screen: y, screenCode: b, page: x, perPage: S, sortForRequest: C, debouncedSearch: w, filters: T, isHeld: E, prefetchWhileHeld: D, retryHeld: O, includeDeleted: k, expand: A, select: j, runCountQuery: M, urlKey: N } = f, P = T.length > 0 ? T : void 0, F = y?.fixed_filters ? b : void 0, I = d(() => ({
11
- page: x,
12
- per_page: S,
13
- sort: C,
14
- search: w || void 0,
15
- filters: P,
16
- include_deleted: k || void 0,
17
- expand: A,
18
- select: j,
9
+ var h = 1e4, g = [];
10
+ function _(p) {
11
+ let h = m(), { entity: _, entityCode: y, screen: b, screenCode: x, page: S, perPage: C, sortForRequest: w, debouncedSearch: T, filters: E, isHeld: D, prefetchWhileHeld: O, retryHeld: k, includeDeleted: A, expand: j, select: M, runCountQuery: N, urlKey: P } = p, F = E.length > 0 ? E : void 0, I = b?.fixed_filters ? x : void 0, L = f(() => ({
12
+ page: S,
13
+ per_page: C,
14
+ sort: w,
15
+ search: T || void 0,
16
+ filters: F,
17
+ include_deleted: A || void 0,
18
+ expand: j,
19
+ select: M,
19
20
  preview: !0,
20
- screen: F
21
+ screen: I
21
22
  }), [
22
- x,
23
23
  S,
24
24
  C,
25
25
  w,
26
- P,
27
- k,
26
+ T,
27
+ F,
28
28
  A,
29
29
  j,
30
- F
31
- ]), L = {
32
- sort: C,
33
- filters: P,
34
- search: w || void 0,
35
- select: j,
36
- expand: A,
37
- includeDeleted: k || void 0,
38
- screen: y?.fixed_filters ? b : void 0,
30
+ M,
31
+ I
32
+ ]), R = {
33
+ sort: w,
34
+ filters: F,
35
+ search: T || void 0,
36
+ select: M,
37
+ expand: j,
38
+ includeDeleted: A || void 0,
39
+ screen: b?.fixed_filters ? x : void 0,
39
40
  preview: !0,
40
- limit: S
41
- }, R = g?.list_pagination === "cursor";
42
- u(() => {
43
- E && D && !R && v && m.prefetchQuery(n(v, I));
41
+ limit: C
42
+ }, z = _?.list_pagination === "cursor";
43
+ d(() => {
44
+ D && O && !z && y && h.prefetchQuery(n(y, L));
44
45
  }, [
45
- E,
46
46
  D,
47
- R,
48
- v,
49
- I,
50
- m
47
+ O,
48
+ z,
49
+ y,
50
+ L,
51
+ h
51
52
  ]);
52
- let z = i(v, I, !R && !E), B = r(v, I, M && !R && !E), V = o(v, L, R && !E);
53
- s(t(v, I), !R && !E), s(a(v, L), R && !E);
54
- let H = E || (R ? V.isLoading : z.isLoading), U = d(() => E ? h : R ? V.rows : z.data?.data ?? [], [
55
- E,
56
- R,
57
- V.rows,
58
- z.data?.data
59
- ]), W = d(() => {
60
- let e = B.data?.meta?.total, t = B.data?.meta?.count_mode, n = z.data?.meta;
61
- return e === void 0 || !t || !z.data || z.isPlaceholderData || n?.has_more === void 0 ? {
53
+ let B = i(y, L, !z && !D), V = r(y, L, N && !z && !D), H = o(y, R, z && !D);
54
+ s(t(y, L), !z && !D), s(a(y, R), z && !D);
55
+ let U = D || (z ? H.isLoading : B.isLoading), W = f(() => D ? g : z ? H.rows : l(B.data?.data ?? [], B.data?.$refs), [
56
+ D,
57
+ z,
58
+ H.rows,
59
+ B.data
60
+ ]), G = f(() => {
61
+ let e = V.data?.meta?.total, t = V.data?.meta?.count_mode, n = B.data?.meta;
62
+ return e === void 0 || !t || !B.data || B.isPlaceholderData || n?.has_more === void 0 ? {
62
63
  total: e,
63
64
  mode: t
64
65
  } : c(e, t, {
65
- page: x,
66
- perPage: S,
67
- rows: z.data.data?.length ?? 0,
66
+ page: S,
67
+ perPage: C,
68
+ rows: B.data.data?.length ?? 0,
68
69
  hasMore: n.has_more
69
70
  });
70
71
  }, [
71
- B.data?.meta?.total,
72
- B.data?.meta?.count_mode,
73
- z.data,
74
- z.isPlaceholderData,
75
- x,
76
- S
77
- ]), G = R ? V.total : W.total, K = d(() => {
78
- if (!(R || G === void 0 || S <= 0)) return Math.max(1, Math.ceil(G / S));
72
+ V.data?.meta?.total,
73
+ V.data?.meta?.count_mode,
74
+ B.data,
75
+ B.isPlaceholderData,
76
+ S,
77
+ C
78
+ ]), K = z ? H.total : G.total, q = f(() => {
79
+ if (!(z || K === void 0 || C <= 0)) return Math.max(1, Math.ceil(K / C));
79
80
  }, [
80
- R,
81
- G,
82
- S
83
- ]), q = _(H, N), J = R ? a(v, L) : t(v, I), Y = e(v, I), X = M && !R, Z = l(async () => {
84
- E ? O() : v && (await Promise.all([m.cancelQueries({
85
- queryKey: J,
86
- exact: !0
87
- }), X ? m.cancelQueries({
81
+ z,
82
+ K,
83
+ C
84
+ ]), J = v(U, P), Y = z ? a(y, R) : t(y, L), X = e(y, L), Z = N && !z, Q = u(async () => {
85
+ D ? k() : y && (await Promise.all([h.cancelQueries({
88
86
  queryKey: Y,
89
87
  exact: !0
90
- }) : void 0]), await Promise.all([R ? V.refetch() : z.refetch(), X ? B.refetch() : void 0]));
88
+ }), Z ? h.cancelQueries({
89
+ queryKey: X,
90
+ exact: !0
91
+ }) : void 0]), await Promise.all([z ? H.refetch() : B.refetch(), Z ? V.refetch() : void 0]));
91
92
  }, [
92
- E,
93
- O,
94
- v,
95
- m,
96
- J,
93
+ D,
94
+ k,
95
+ y,
96
+ h,
97
97
  Y,
98
98
  X,
99
- R,
100
- V,
99
+ Z,
101
100
  z,
102
- B
103
- ]), Q = l(() => {
104
- V.fetchNextPage();
105
- }, [V]);
101
+ H,
102
+ B,
103
+ V
104
+ ]), $ = u(() => {
105
+ H.fetchNextPage();
106
+ }, [H]);
106
107
  return {
107
- rows: U,
108
- meta: E ? void 0 : z.data?.meta,
109
- refs: E ? void 0 : R ? V.refs : z.data?.$refs,
110
- isLoading: H,
111
- isFetching: E || (R ? V.isFetching : z.isFetching),
112
- isShowingPreviousRows: !E && (R ? V.isPlaceholderData : z.isPlaceholderData),
113
- isError: E ? !1 : R ? V.isError : z.isError,
114
- error: E ? void 0 : R ? V.error : z.error,
115
- isLoadingStale: q,
116
- retry: Z,
117
- countTotal: E ? void 0 : G,
118
- countStrategy: E ? void 0 : R ? V.countMode : W.mode,
119
- countLoading: E || (R ? V.isLoading : B.isLoading),
120
- countError: !E && !R && B.isError,
121
- totalPages: K,
122
- hasMorePages: R ? V.hasMore : z.data?.meta?.has_more ?? (K !== void 0 && x < K),
123
- isCursor: R,
124
- fetchNextPage: Q,
125
- isFetchingNextPage: V.isFetchingNextPage
108
+ rows: W,
109
+ meta: D ? void 0 : B.data?.meta,
110
+ refs: D ? void 0 : z ? H.refs : B.data?.$refs,
111
+ isLoading: U,
112
+ isFetching: D || (z ? H.isFetching : B.isFetching),
113
+ isShowingPreviousRows: !D && (z ? H.isPlaceholderData : B.isPlaceholderData),
114
+ isError: D ? !1 : z ? H.isError : B.isError,
115
+ error: D ? void 0 : z ? H.error : B.error,
116
+ isLoadingStale: J,
117
+ retry: Q,
118
+ countTotal: D ? void 0 : K,
119
+ countStrategy: D ? void 0 : z ? H.countMode : G.mode,
120
+ countLoading: D || (z ? H.isLoading : V.isLoading),
121
+ countError: !D && !z && V.isError,
122
+ totalPages: q,
123
+ hasMorePages: z ? H.hasMore : B.data?.meta?.has_more ?? (q !== void 0 && S < q),
124
+ isCursor: z,
125
+ fetchNextPage: $,
126
+ isFetchingNextPage: H.isFetchingNextPage
126
127
  };
127
128
  }
128
- function _(e, t) {
129
- let [n, r] = f(!1);
130
- return u(() => {
129
+ function v(e, t) {
130
+ let [n, r] = p(!1);
131
+ return d(() => {
131
132
  if (!e) {
132
133
  r(!1);
133
134
  return;
134
135
  }
135
136
  r(!1);
136
- let t = window.setTimeout(() => r(!0), m);
137
+ let t = window.setTimeout(() => r(!0), h);
137
138
  return () => window.clearTimeout(t);
138
139
  }, [e, t]), n;
139
140
  }
140
- export { g as useListQuery };
141
+ export { _ as useListQuery };