@declarion/react 0.54.0 → 0.56.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.
Files changed (175) hide show
  1. package/dist-lib/{DraggableChildrenTable-CPoUY99R.js → DraggableChildrenTable-BV5sb8Uo.js} +32 -32
  2. package/dist-lib/{Grid--QAEby8k.js → Grid-DWgUPuZ3.js} +45 -45
  3. package/dist-lib/{JsonEditor-DoNmyrYd.js → JsonEditor-Dz1PQHC8.js} +2 -2
  4. package/dist-lib/{LayoutRenderer-BxZ7Nd9b.js → LayoutRenderer-C9AH9cXf.js} +716 -714
  5. package/dist-lib/{ListCardsBody-BPV4GPrv.js → ListCardsBody-DXcDg536.js} +29 -29
  6. package/dist-lib/{MarkdownRenderer-CIKuh_0i.js → MarkdownRenderer-CcSFc2N3.js} +1 -1
  7. package/dist-lib/{RefreshControl-DMLkZP3R.js → RefreshControl-CNtN8zSl.js} +41 -41
  8. package/dist-lib/{SmartDetailPage.impl-SnNu6Ug-.js → SmartDetailPage.impl-lskCd-WG.js} +492 -492
  9. package/dist-lib/{SmartListPage.impl-C73pR7Iw.js → SmartListPage.impl-CrGbdzyK.js} +744 -743
  10. package/dist-lib/{SmartRecordListPage.impl-rJjQZe1V.js → SmartRecordListPage.impl-Bkl9aZJ8.js} +129 -129
  11. package/dist-lib/{SortHeaderMenu-DQ_KrkWk.js → SortHeaderMenu-SYSAaqQJ.js} +1 -1
  12. package/dist-lib/{action-dispatch-DsuUS7ae.js → action-dispatch-CR4ajBtT.js} +179 -179
  13. package/dist-lib/api/auth.d.ts +1 -1
  14. package/dist-lib/api/batch.d.ts +1 -1
  15. package/dist-lib/api/data.d.ts +3 -3
  16. package/dist-lib/api/entities.d.ts +1 -1
  17. package/dist-lib/api/events.d.ts +13 -4
  18. package/dist-lib/api/params.d.ts +1 -1
  19. package/dist-lib/api/properties.d.ts +1 -1
  20. package/dist-lib/api/schema.d.ts +1 -1
  21. package/dist-lib/api/status.d.ts +1 -1
  22. package/dist-lib/{cardProjection-BadzqyeQ.js → cardProjection-CW5RIMko.js} +24 -24
  23. package/dist-lib/components/actions/ActionButton.d.ts +1 -1
  24. package/dist-lib/components/actions/ActionDialog.d.ts +1 -1
  25. package/dist-lib/components/actions/ActionRunner.d.ts +1 -1
  26. package/dist-lib/components/actions/ObjectActionBar.d.ts +3 -3
  27. package/dist-lib/components/actions/PropertyGridEditor.d.ts +2 -2
  28. package/dist-lib/components/actions/ResponsiveActionBar.d.ts +2 -2
  29. package/dist-lib/components/actions/RowActionsKebab.d.ts +1 -1
  30. package/dist-lib/components/agents/AgentConversationDrawer.d.ts +1 -1
  31. package/dist-lib/components/agents/AgentPicker.d.ts +1 -1
  32. package/dist-lib/components/agents/transcript-runs.d.ts +1 -1
  33. package/dist-lib/components/chrome/AssociationTabs.d.ts +1 -1
  34. package/dist-lib/components/chrome/Breadcrumbs.d.ts +1 -1
  35. package/dist-lib/components/detail-layout/AssociatedBlock.d.ts +1 -1
  36. package/dist-lib/components/detail-layout/AssociatedToolbar.d.ts +1 -1
  37. package/dist-lib/components/detail-layout/ChildrenBlock.d.ts +2 -2
  38. package/dist-lib/components/detail-layout/DetailAuditStrip.d.ts +2 -2
  39. package/dist-lib/components/detail-layout/DetailHighlights.d.ts +3 -3
  40. package/dist-lib/components/detail-layout/DraggableChildrenTable.d.ts +3 -3
  41. package/dist-lib/components/detail-layout/EditableChildrenTable.d.ts +3 -3
  42. package/dist-lib/components/detail-layout/EvidenceBlock.d.ts +1 -1
  43. package/dist-lib/components/detail-layout/FieldsBlock.d.ts +1 -1
  44. package/dist-lib/components/detail-layout/LayoutColumn.d.ts +1 -1
  45. package/dist-lib/components/detail-layout/LayoutRenderer.d.ts +3 -3
  46. package/dist-lib/components/detail-layout/LayoutRow.d.ts +1 -1
  47. package/dist-lib/components/detail-layout/LayoutTabs.d.ts +1 -1
  48. package/dist-lib/components/detail-layout/PropertiesBlock.d.ts +1 -1
  49. package/dist-lib/components/detail-layout/QuickAddForm.d.ts +2 -2
  50. package/dist-lib/components/detail-layout/SectionBlock.d.ts +1 -1
  51. package/dist-lib/components/detail-layout/StatusesBlock.d.ts +1 -1
  52. package/dist-lib/components/detail-layout/TimelineComposer.d.ts +2 -2
  53. package/dist-lib/components/detail-layout/blockMeta.d.ts +1 -1
  54. package/dist-lib/components/detail-layout/useQuickAdd.d.ts +2 -2
  55. package/dist-lib/components/detail-layout/widgets/WidgetHost.d.ts +1 -1
  56. package/dist-lib/components/fields/RefCombobox.d.ts +2 -2
  57. package/dist-lib/components/fields/cells/factories/host-icons.d.ts +1 -1
  58. package/dist-lib/components/fields/cells/registry.d.ts +2 -2
  59. package/dist-lib/components/fields/index.d.ts +3 -3
  60. package/dist-lib/components/file-widgets/helpers.d.ts +1 -1
  61. package/dist-lib/components/file-widgets/host.d.ts +3 -3
  62. package/dist-lib/components/file-widgets/payload.d.ts +2 -2
  63. package/dist-lib/components/file-widgets/types.d.ts +1 -1
  64. package/dist-lib/components/file-widgets/useEmbedFileSrc.d.ts +1 -1
  65. package/dist-lib/components/filters/FilterChips.d.ts +1 -1
  66. package/dist-lib/components/filters/FilterDrawer.d.ts +3 -3
  67. package/dist-lib/components/layout/CommandPalette.d.ts +2 -2
  68. package/dist-lib/components/layout/Layout.d.ts +3 -3
  69. package/dist-lib/components/layout/Rail.d.ts +2 -2
  70. package/dist-lib/components/layout/Sidebar.d.ts +1 -1
  71. package/dist-lib/components/layout/TabStrip.d.ts +1 -1
  72. package/dist-lib/components/layout/TenantChip.d.ts +1 -1
  73. package/dist-lib/components/layout/TopBar.d.ts +1 -1
  74. package/dist-lib/components/layout/tab-close.d.ts +1 -1
  75. package/dist-lib/components/list/InlineEditCell.d.ts +1 -1
  76. package/dist-lib/components/list/PeekFieldCell.d.ts +2 -2
  77. package/dist-lib/components/list/QuickPeek.d.ts +3 -3
  78. package/dist-lib/components/list/ViewSwitcher.d.ts +1 -1
  79. package/dist-lib/components/pages/DocumentsMenu.d.ts +1 -1
  80. package/dist-lib/components/pages/ExportMenu.d.ts +1 -1
  81. package/dist-lib/components/pages/RecordDocumentsPanel.d.ts +1 -1
  82. package/dist-lib/components/pages/auth/AuthShell.d.ts +1 -1
  83. package/dist-lib/components/pages/exportRequest.d.ts +1 -1
  84. package/dist-lib/components/pages/list/ListCardRow.d.ts +3 -3
  85. package/dist-lib/components/pages/list/ListCardsBody.d.ts +3 -3
  86. package/dist-lib/components/pages/list/ListFloatbar.d.ts +3 -3
  87. package/dist-lib/components/pages/list/ListHeader.d.ts +3 -3
  88. package/dist-lib/components/pages/list/ListNoRows.d.ts +1 -1
  89. package/dist-lib/components/pages/list/ListTable.d.ts +2 -2
  90. package/dist-lib/components/pages/list/ListTableRow.d.ts +1 -1
  91. package/dist-lib/components/pages/list/ListToolbar.d.ts +7 -5
  92. package/dist-lib/components/pages/list/RowActionsCell.d.ts +1 -1
  93. package/dist-lib/components/pages/list/RowContextMenu.d.ts +1 -1
  94. package/dist-lib/components/pages/list/SortHeaderMenu.d.ts +1 -1
  95. package/dist-lib/components/pages/list/cardProjection.d.ts +2 -2
  96. package/dist-lib/components/pages/list/columns.d.ts +3 -3
  97. package/dist-lib/components/pages/list/filter-meta.d.ts +2 -2
  98. package/dist-lib/components/pages/list/sortable-header.d.ts +1 -1
  99. package/dist-lib/components/pages/list/table-features.d.ts +1 -1
  100. package/dist-lib/components/pages/list/use-filter-value-labels.d.ts +4 -4
  101. package/dist-lib/components/pages/list/useListColumnLayout.d.ts +1 -1
  102. package/dist-lib/components/pages/list/useListQuery.d.ts +4 -8
  103. package/dist-lib/components/pages/list/useListRowInteraction.d.ts +4 -4
  104. package/dist-lib/components/pages/list/useListSelection.d.ts +2 -2
  105. package/dist-lib/components/pages/list/useListSort.d.ts +1 -1
  106. package/dist-lib/components/pages/list/useListViews.d.ts +3 -3
  107. package/dist-lib/components/pages/list/useRowMenu.d.ts +3 -3
  108. package/dist-lib/components/pages/tenant-params/TenantParamsPage.d.ts +1 -1
  109. package/dist-lib/components/params/param-editors.d.ts +1 -1
  110. package/dist-lib/components/primitives/ClassifiedFieldLocked.d.ts +1 -1
  111. package/dist-lib/components/shared/MarkdownRenderer.d.ts +1 -1
  112. package/dist-lib/components/shared/StatusGroupsDisplay.d.ts +2 -2
  113. package/dist-lib/embed/screen-location.d.ts +1 -1
  114. package/dist-lib/{field-classification-sMkkAEg9.js → field-classification-D6xQYn-h.js} +271 -400
  115. package/dist-lib/{format-count-B5SLlNOb.js → format-count-Dobmi-Ji.js} +238 -238
  116. package/dist-lib/hooks/useAgentConversation.d.ts +1 -1
  117. package/dist-lib/hooks/useAllEntityData.d.ts +1 -1
  118. package/dist-lib/hooks/useAssociatedData.d.ts +1 -1
  119. package/dist-lib/hooks/useBranding.d.ts +4 -4
  120. package/dist-lib/hooks/useBrandingChrome.d.ts +2 -2
  121. package/dist-lib/hooks/useChildrenData.d.ts +1 -1
  122. package/dist-lib/hooks/useCurrentScreen.d.ts +1 -1
  123. package/dist-lib/hooks/useCursorEntityData.d.ts +5 -5
  124. package/dist-lib/hooks/useEntity.d.ts +1 -1
  125. package/dist-lib/hooks/useEntityData.d.ts +8 -1
  126. package/dist-lib/hooks/useFilters.d.ts +1 -1
  127. package/dist-lib/hooks/useImpersonation.d.ts +1 -1
  128. package/dist-lib/hooks/useLiveObject.d.ts +2 -2
  129. package/dist-lib/hooks/useMutations.d.ts +3 -3
  130. package/dist-lib/hooks/useObject.d.ts +1 -1
  131. package/dist-lib/hooks/useParams.d.ts +2 -2
  132. package/dist-lib/hooks/useRealtimeThresholds.d.ts +1 -0
  133. package/dist-lib/hooks/useRegisterScreenTab.d.ts +1 -1
  134. package/dist-lib/hooks/useResponsiveMode.d.ts +1 -1
  135. package/dist-lib/hooks/useSSE.d.ts +1 -2
  136. package/dist-lib/hooks/useScreen.d.ts +1 -1
  137. package/dist-lib/hooks/useTimelineData.d.ts +2 -2
  138. package/dist-lib/hooks/useViews.d.ts +1 -1
  139. package/dist-lib/index.js +811 -811
  140. package/dist-lib/lib/action-dispatch.d.ts +2 -2
  141. package/dist-lib/lib/actions.d.ts +1 -1
  142. package/dist-lib/lib/brand-tokens.d.ts +1 -1
  143. package/dist-lib/lib/branding.d.ts +1 -1
  144. package/dist-lib/lib/child-config.d.ts +1 -1
  145. package/dist-lib/lib/children-validation.d.ts +2 -2
  146. package/dist-lib/lib/document-templates.d.ts +1 -1
  147. package/dist-lib/lib/evidence-verdict.d.ts +1 -1
  148. package/dist-lib/lib/mass-edit.d.ts +1 -1
  149. package/dist-lib/lib/messages.d.ts +2 -2
  150. package/dist-lib/lib/realtime-query-keys.d.ts +22 -0
  151. package/dist-lib/lib/realtime-reconcile.d.ts +1 -10
  152. package/dist-lib/lib/realtime-resync.d.ts +23 -0
  153. package/dist-lib/lib/rich-text.d.ts +1 -1
  154. package/dist-lib/lib/schema-routing.d.ts +1 -1
  155. package/dist-lib/lib/screen-back.d.ts +1 -1
  156. package/dist-lib/lib/size-value.d.ts +1 -1
  157. package/dist-lib/lib/toast.d.ts +2 -2
  158. package/dist-lib/lib/ui-actions.d.ts +1 -1
  159. package/dist-lib/lib/variants.d.ts +1 -1
  160. package/dist-lib/{peekDraftStore-CbHFwz_F.js → peekDraftStore-5wQ7lq_V.js} +17 -17
  161. package/dist-lib/{registry-D0RhCnEL.js → registry-CjgUaF7C.js} +511 -511
  162. package/dist-lib/stores/auth.d.ts +1 -1
  163. package/dist-lib/stores/preferences.d.ts +1 -1
  164. package/dist-lib/stores/realtime.d.ts +86 -19
  165. package/dist-lib/testing.d.ts +4 -4
  166. package/dist-lib/testing.js +40 -40
  167. package/dist-lib/types/api.d.ts +1 -1
  168. package/dist-lib/types/schema.d.ts +2 -2
  169. package/dist-lib/{useCurrentScreen-DVTXCj_K.js → useCurrentScreen-CzwzQpoW.js} +2476 -1967
  170. package/dist-lib/useListQuery-D7Hr5WM1.js +96 -0
  171. package/dist-lib/{useProperties-BcIz-MyO.js → useProperties-CqtCzFCr.js} +25 -25
  172. package/dist-lib/{useTabSearchMirror-UYCsopxP.js → useTabSearchMirror-C39U85cg.js} +13 -13
  173. package/dist-lib/{value-CQzGOI0F.js → value-Bo8C8WMU.js} +4 -4
  174. package/package.json +10 -10
  175. package/dist-lib/useListQuery-C2nq58YV.js +0 -90
@@ -0,0 +1,96 @@
1
+ import { bt as e, l as t, s as n, vt as r, xt as i, yt as a } from "./useCurrentScreen-CzwzQpoW.js";
2
+ import { g as o } from "./field-classification-D6xQYn-h.js";
3
+ import { useCallback as s, useEffect as c, useMemo as l, useState as u } from "react";
4
+ import { useQueryClient as d } from "@tanstack/react-query";
5
+ //#region src/components/pages/list/useListQuery.ts
6
+ var f = 1e4;
7
+ function p(c) {
8
+ let u = d(), { entity: f, entityCode: p, screen: h, screenCode: g, page: _, perPage: v, sortForRequest: y, debouncedSearch: b, filters: x, filterError: S, includeDeleted: C, expand: w, select: T, runCountQuery: E, urlKey: D } = c, O = S ? void 0 : x.length > 0 ? x : void 0, k = {
9
+ page: _,
10
+ per_page: v,
11
+ sort: y,
12
+ search: b || void 0,
13
+ filters: O,
14
+ include_deleted: C || void 0,
15
+ expand: w,
16
+ select: T,
17
+ preview: !0,
18
+ screen: h?.fixed_filters ? g : void 0
19
+ }, A = {
20
+ sort: y,
21
+ filters: O,
22
+ search: b || void 0,
23
+ select: T,
24
+ expand: w,
25
+ includeDeleted: C || void 0,
26
+ screen: h?.fixed_filters ? g : void 0,
27
+ preview: !0,
28
+ limit: v
29
+ }, j = f?.list_pagination === "cursor", M = i(p, k, !j), N = e(p, k, E && !j), P = t(p, A, j);
30
+ o(a(p, k), !j), o(n(p, A), j);
31
+ let F = j ? P.isLoading : M.isLoading, I = l(() => j ? P.rows : M.data?.data ?? [], [
32
+ j,
33
+ P.rows,
34
+ M.data?.data
35
+ ]), L = j ? P.total : N.data?.meta?.total, R = l(() => {
36
+ if (!(j || L === void 0 || v <= 0)) return Math.max(1, Math.ceil(L / v));
37
+ }, [
38
+ j,
39
+ L,
40
+ v
41
+ ]), z = m(F, D), B = j ? n(p, A) : a(p, k), V = r(p, k), H = E && !j, U = s(async () => {
42
+ p && (await Promise.all([u.cancelQueries({
43
+ queryKey: B,
44
+ exact: !0
45
+ }), H ? u.cancelQueries({
46
+ queryKey: V,
47
+ exact: !0
48
+ }) : void 0]), await Promise.all([j ? P.refetch() : M.refetch(), H ? N.refetch() : void 0]));
49
+ }, [
50
+ p,
51
+ u,
52
+ B,
53
+ V,
54
+ H,
55
+ j,
56
+ P,
57
+ M,
58
+ N
59
+ ]), W = s(() => {
60
+ P.fetchNextPage();
61
+ }, [P]);
62
+ return {
63
+ rows: I,
64
+ meta: M.data?.meta,
65
+ refs: j ? P.refs : M.data?.$refs,
66
+ isLoading: F,
67
+ isFetching: j ? P.isFetching : M.isFetching,
68
+ isError: j ? P.isError : M.isError,
69
+ error: j ? P.error : M.error,
70
+ isLoadingStale: z,
71
+ retry: U,
72
+ countTotal: L,
73
+ countStrategy: j ? P.countMode : N.data?.meta?.count_mode,
74
+ countLoading: j ? P.isLoading : N.isLoading,
75
+ countError: !j && N.isError,
76
+ totalPages: R,
77
+ hasMorePages: j ? P.hasMore : M.data?.meta?.has_more ?? (R !== void 0 && _ < R),
78
+ isCursor: j,
79
+ fetchNextPage: W,
80
+ isFetchingNextPage: P.isFetchingNextPage
81
+ };
82
+ }
83
+ function m(e, t) {
84
+ let [n, r] = u(!1);
85
+ return c(() => {
86
+ if (!e) {
87
+ r(!1);
88
+ return;
89
+ }
90
+ r(!1);
91
+ let t = window.setTimeout(() => r(!0), f);
92
+ return () => window.clearTimeout(t);
93
+ }, [e, t]), n;
94
+ }
95
+ //#endregion
96
+ export { p as t };
@@ -1,39 +1,39 @@
1
- import { Mt as e, Yt as t } from "./useCurrentScreen-DVTXCj_K.js";
1
+ import { en as e, jt as t } from "./useCurrentScreen-CzwzQpoW.js";
2
2
  import { useMutation as n, useQueryClient as r } from "@tanstack/react-query";
3
3
  //#region src/api/status.ts
4
- async function i(e, n, r, i, a) {
4
+ async function i(t, n, r, i, a) {
5
5
  let o = {
6
6
  status_group_code: r,
7
7
  status_code: i
8
8
  };
9
9
  a != null && (o.note = a);
10
- let s = (await t(`${e}.__update`, {
10
+ let s = (await e(`${t}.__update`, {
11
11
  object_ids: [n],
12
- entity: e,
12
+ entity: t,
13
13
  fields: { $statuses: [o] }
14
14
  })).result?.rows?.[0]?.$statuses ?? [];
15
15
  return s.find((e) => e.group_code === r) ?? s[0];
16
16
  }
17
17
  //#endregion
18
18
  //#region src/hooks/useObjectStatus.ts
19
- function a(t, a) {
19
+ function a(e, a) {
20
20
  let o = r();
21
21
  return n({
22
- mutationFn: ({ groupCode: e, statusCode: n, note: r }) => i(t, a, e, n, r),
22
+ mutationFn: ({ groupCode: t, statusCode: n, note: r }) => i(e, a, t, n, r),
23
23
  onSuccess: () => {
24
- o.invalidateQueries({ queryKey: ["entity-item", t] });
24
+ o.invalidateQueries({ queryKey: ["entity-item", e] });
25
25
  },
26
- onError: (t) => {
27
- e.error(t.message);
26
+ onError: (e) => {
27
+ t.error(e.message);
28
28
  }
29
29
  });
30
30
  }
31
31
  //#endregion
32
32
  //#region src/api/properties.ts
33
- async function o(e, n, r, i) {
34
- let a = (await t(`${e}.__update`, {
33
+ async function o(t, n, r, i) {
34
+ let a = (await e(`${t}.__update`, {
35
35
  object_ids: [n],
36
- entity: e,
36
+ entity: t,
37
37
  fields: { $properties: [{
38
38
  property_code: r,
39
39
  value: i
@@ -41,10 +41,10 @@ async function o(e, n, r, i) {
41
41
  })).result?.rows?.[0]?.$properties ?? [];
42
42
  return a.find((e) => e.property_code === r) ?? a[0];
43
43
  }
44
- async function s(e, n, r) {
45
- await t(`${e}.__update`, {
44
+ async function s(t, n, r) {
45
+ await e(`${t}.__update`, {
46
46
  object_ids: [n],
47
- entity: e,
47
+ entity: t,
48
48
  fields: { $properties: [{
49
49
  property_code: r,
50
50
  value: null
@@ -53,27 +53,27 @@ async function s(e, n, r) {
53
53
  }
54
54
  //#endregion
55
55
  //#region src/hooks/useProperties.ts
56
- function c(t, i) {
56
+ function c(e, i) {
57
57
  let a = r();
58
58
  return n({
59
- mutationFn: ({ propertyCode: e, value: n }) => o(t, i, e, n),
59
+ mutationFn: ({ propertyCode: t, value: n }) => o(e, i, t, n),
60
60
  onSuccess: () => {
61
- a.invalidateQueries({ queryKey: ["entity-item", t] });
61
+ a.invalidateQueries({ queryKey: ["entity-item", e] });
62
62
  },
63
- onError: (t) => {
64
- e.error(t.message);
63
+ onError: (e) => {
64
+ t.error(e.message);
65
65
  }
66
66
  });
67
67
  }
68
- function l(t, i) {
68
+ function l(e, i) {
69
69
  let a = r();
70
70
  return n({
71
- mutationFn: (e) => s(t, i, e),
71
+ mutationFn: (t) => s(e, i, t),
72
72
  onSuccess: () => {
73
- a.invalidateQueries({ queryKey: ["entity-item", t] });
73
+ a.invalidateQueries({ queryKey: ["entity-item", e] });
74
74
  },
75
- onError: (t) => {
76
- e.error(t.message);
75
+ onError: (e) => {
76
+ t.error(e.message);
77
77
  }
78
78
  });
79
79
  }
@@ -1,5 +1,5 @@
1
- import { Ht as e, Zn as t, lr as n } from "./useCurrentScreen-DVTXCj_K.js";
2
- import { M as r } from "./field-classification-sMkkAEg9.js";
1
+ import { Vt as e, mr as t, nr as n } from "./useCurrentScreen-CzwzQpoW.js";
2
+ import { M as r } from "./field-classification-D6xQYn-h.js";
3
3
  import { useEffect as i, useLayoutEffect as a } from "react";
4
4
  import { useSearchParams as o } from "react-router";
5
5
  //#region src/lib/filters.ts
@@ -73,22 +73,22 @@ function p(e) {
73
73
  }
74
74
  function m(e) {
75
75
  let t = [];
76
- for (let n of e) !n || typeof n != "object" || (n.field && n.op && t.push(n), n.or && t.push(...m(n.or)), n.and && t.push(...m(n.and)));
76
+ for (let n of e) n && typeof n == "object" && (n.field && n.op && t.push(n), n.or && t.push(...m(n.or)), n.and && t.push(...m(n.and)));
77
77
  return t;
78
78
  }
79
79
  function h(e) {
80
80
  return m(e).length;
81
81
  }
82
- function g(e, t) {
82
+ function g(e, n) {
83
83
  if (!e.field || !e.op) return "";
84
84
  let r = l[e.op] || e.op;
85
85
  if (s.has(e.op)) return `${r}`;
86
86
  let i = e.field, a = (e) => {
87
- if (t) {
88
- let n = t(i, e);
89
- return n.label != null && (n.status === "special" || n.status === "resolved") ? n.label : n.raw;
87
+ if (n) {
88
+ let t = n(i, e);
89
+ return t.label != null && (t.status === "special" || t.status === "resolved") ? t.label : t.raw;
90
90
  }
91
- return n(e);
91
+ return t(e);
92
92
  };
93
93
  return `${r} ${Array.isArray(e.value) ? e.value.map(a).join(", ") : a(e.value)}`;
94
94
  }
@@ -101,7 +101,7 @@ function _(e, t) {
101
101
  }
102
102
  function v(e, t) {
103
103
  let n = [];
104
- for (let r of e) if (!(!r || typeof r != "object") && r.field !== t) {
104
+ for (let r of e) if (r && typeof r == "object" && r.field !== t) {
105
105
  if (r.or) {
106
106
  let e = v(r.or, t);
107
107
  e.length > 0 && n.push({
@@ -141,7 +141,7 @@ var b = new Set(Object.keys(l));
141
141
  function x(t, n, a, o) {
142
142
  let s = e();
143
143
  i(() => {
144
- !t || s.enabled || r.getState().openTab({
144
+ t && !s.enabled && r.getState().openTab({
145
145
  pathname: t,
146
146
  search: o,
147
147
  title: n,
@@ -155,9 +155,9 @@ function x(t, n, a, o) {
155
155
  s.enabled
156
156
  ]);
157
157
  }
158
- function S(e, n, r) {
159
- let i = e?.route, a = n ? t(e?.display?.name) || t(n.display.name_plural) : "", o = e?.display?.icon || n?.display.icon;
160
- x(n ? i : void 0, a, o, r);
158
+ function S(e, t, r) {
159
+ let i = e?.route, a = t ? n(e?.display?.name) || n(t.display.name_plural) : "", o = e?.display?.icon || t?.display.icon;
160
+ x(t ? i : void 0, a, o, r);
161
161
  }
162
162
  //#endregion
163
163
  //#region src/hooks/useTabSearchMirror.ts
@@ -1,4 +1,4 @@
1
- import { En as e, On as t, Tn as n, zn as r } from "./useCurrentScreen-DVTXCj_K.js";
1
+ import { An as e, Nn as t, Wn as n, jn as r } from "./useCurrentScreen-CzwzQpoW.js";
2
2
  import { useCallback as i, useEffect as a, useRef as o, useState as s } from "react";
3
3
  //#region src/embed/file-src.ts
4
4
  var c = "/api/files";
@@ -30,10 +30,10 @@ function p(e) {
30
30
  return `${e}${e.includes("?") ? "&" : "?"}disposition=attachment`;
31
31
  }
32
32
  async function m(t, i) {
33
- let a = await n(), o = await fetch(t, f(a, i));
33
+ let a = await e(), o = await fetch(t, f(a, i));
34
34
  if (o.status !== 401) return o;
35
- await r(o), e();
36
- let s = await n();
35
+ await n(o), r();
36
+ let s = await e();
37
37
  return fetch(t, f(s, i));
38
38
  }
39
39
  async function h(e, n, r) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@declarion/react",
3
- "version": "0.54.0",
3
+ "version": "0.56.0",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "description": "React SDK for Declarion, the schema-driven business apps platform.",
@@ -67,11 +67,11 @@
67
67
  "@radix-ui/react-slot": "^1.3.3",
68
68
  "@tanstack/react-query": "^5.102.8",
69
69
  "@tanstack/react-table": "^9.2.4",
70
- "@tanstack/react-virtual": "^3.14.10",
70
+ "@tanstack/react-virtual": "^3.14.13",
71
71
  "class-variance-authority": "^0.7.1",
72
72
  "clsx": "^2.1.1",
73
73
  "date-fns": "^4.4.0",
74
- "lucide-react": "^1.41.0",
74
+ "lucide-react": "^1.46.0",
75
75
  "mdast-util-to-string": "^4.0.0",
76
76
  "monaco-editor": "^0.56.0",
77
77
  "react-markdown": "^10.1.0",
@@ -95,8 +95,8 @@
95
95
  "@testing-library/jest-dom": "^7.0.1",
96
96
  "@testing-library/react": "^16.3.3",
97
97
  "@testing-library/user-event": "^14.6.7",
98
- "@types/react": "^19.2.18",
99
- "@types/react-dom": "^19.2.7",
98
+ "@types/react": "^19.3.0",
99
+ "@types/react-dom": "^19.3.0",
100
100
  "@vitejs/plugin-react": "^6.1.1",
101
101
  "@vitest/coverage-v8": "^5.0.0",
102
102
  "axe-core": "^4.13.0",
@@ -105,13 +105,13 @@
105
105
  "jsdom": "^30.0.1",
106
106
  "msw": "^2.15.0",
107
107
  "publint": "^0.3.24",
108
- "react": "^19.2.8",
109
- "react-dom": "^19.2.8",
108
+ "react": "^19.3.0",
109
+ "react-dom": "^19.3.0",
110
110
  "tailwindcss": "^4.3.3",
111
- "tsc-alias": "^1.9.4",
111
+ "tsc-alias": "^1.9.5",
112
112
  "typescript": "^6.0.3",
113
- "typescript-eslint": "^8.69.0",
114
- "vite": "^8.2.2",
113
+ "typescript-eslint": "^8.70.0",
114
+ "vite": "^8.3.0",
115
115
  "vitest": "^5.0.0"
116
116
  },
117
117
  "scripts": {
@@ -1,90 +0,0 @@
1
- import { C as e, St as t, T as n, bt as r, xt as i } from "./useCurrentScreen-DVTXCj_K.js";
2
- import { g as a } from "./field-classification-sMkkAEg9.js";
3
- import { useCallback as o, useEffect as s, useMemo as c, useState as l } from "react";
4
- import { useQueryClient as u } from "@tanstack/react-query";
5
- //#region src/components/pages/list/useListQuery.ts
6
- var d = 1e4;
7
- function f(s) {
8
- let l = u(), { entity: d, entityCode: f, screen: m, screenCode: h, page: g, perPage: _, sortForRequest: v, debouncedSearch: y, filters: b, filterError: x, includeDeleted: S, expand: C, select: w, runCountQuery: T, urlKey: E } = s, D = x ? void 0 : b.length > 0 ? b : void 0, O = {
9
- page: g,
10
- per_page: _,
11
- sort: v,
12
- search: y || void 0,
13
- filters: D,
14
- include_deleted: S || void 0,
15
- expand: C,
16
- select: w,
17
- preview: !0,
18
- screen: m?.fixed_filters ? h : void 0
19
- }, k = {
20
- sort: v,
21
- filters: D,
22
- search: y || void 0,
23
- select: w,
24
- expand: C,
25
- includeDeleted: S || void 0,
26
- screen: m?.fixed_filters ? h : void 0,
27
- preview: !0,
28
- limit: _
29
- }, A = d?.list_pagination === "cursor", j = t(f, O, !A), M = i(f, O, T && !A), N = n(f, k, A);
30
- a(r(f, O), !A), a(e(f, k), A);
31
- let P = A ? N.isLoading : j.isLoading, F = c(() => A ? N.rows : j.data?.data ?? [], [
32
- A,
33
- N.rows,
34
- j.data?.data
35
- ]), I = A ? N.total : M.data?.meta?.total, L = c(() => {
36
- if (!(A || I === void 0 || _ <= 0)) return Math.max(1, Math.ceil(I / _));
37
- }, [
38
- A,
39
- I,
40
- _
41
- ]), R = p(P, E), z = A ? e(f, k) : r(f, O), B = o(async () => {
42
- f && (await l.cancelQueries({
43
- queryKey: z,
44
- exact: !0
45
- }), await (A ? N.refetch() : j.refetch()));
46
- }, [
47
- f,
48
- l,
49
- z,
50
- A,
51
- N,
52
- j
53
- ]), V = o(() => {
54
- N.fetchNextPage();
55
- }, [N]);
56
- return {
57
- rows: F,
58
- meta: j.data?.meta,
59
- refs: A ? N.refs : j.data?.$refs,
60
- isLoading: P,
61
- isFetching: A ? N.isFetching : j.isFetching,
62
- isError: A ? N.isError : j.isError,
63
- error: A ? N.error : j.error,
64
- isLoadingStale: R,
65
- retry: B,
66
- countTotal: I,
67
- countStrategy: A ? N.countMode : M.data?.meta?.count_mode,
68
- countLoading: A ? N.isLoading : M.isLoading,
69
- countError: !A && M.isError,
70
- totalPages: L,
71
- hasMorePages: A ? N.hasMore : j.data?.meta?.has_more ?? (L !== void 0 && g < L),
72
- isCursor: A,
73
- fetchNextPage: V,
74
- isFetchingNextPage: N.isFetchingNextPage
75
- };
76
- }
77
- function p(e, t) {
78
- let [n, r] = l(!1);
79
- return s(() => {
80
- if (!e) {
81
- r(!1);
82
- return;
83
- }
84
- r(!1);
85
- let t = window.setTimeout(() => r(!0), d);
86
- return () => window.clearTimeout(t);
87
- }, [e, t]), n;
88
- }
89
- //#endregion
90
- export { f as t };