@declarion/react 0.57.0 → 0.59.2

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 (166) hide show
  1. package/README.md +0 -2
  2. package/dist-lib/AgentChatPanel.impl-DBH1Ff4G.js +1200 -0
  3. package/dist-lib/DetailAuditStrip-9eJM2Fml.js +288 -0
  4. package/dist-lib/{DraggableChildrenTable-BV5sb8Uo.js → DraggableChildrenTable-4RZC351U.js} +87 -86
  5. package/dist-lib/Grid-CQabaBLx.js +405 -0
  6. package/dist-lib/{LayoutRenderer-C9AH9cXf.js → LayoutRenderer-DGKWZKpW.js} +1000 -1114
  7. package/dist-lib/{ListCardsBody-DXcDg536.js → ListCardsBody-DfGmyNIu.js} +84 -84
  8. package/dist-lib/MarkdownRenderer-BDbzDv_y.js +87 -0
  9. package/dist-lib/{RefreshControl-CNtN8zSl.js → RefreshControl-Bhoib0ZA.js} +126 -155
  10. package/dist-lib/SmartDetailPage.impl-DFjz29Ff.js +1565 -0
  11. package/dist-lib/SmartListPage.impl-BrZLE_Gb.js +3046 -0
  12. package/dist-lib/{SmartRecordListPage.impl-Bkl9aZJ8.js → SmartRecordListPage.impl-C1FJLr80.js} +281 -280
  13. package/dist-lib/SortHeaderMenu-Cijxk4cX.js +107 -0
  14. package/dist-lib/action-dispatch-DY0c8U81.js +1967 -0
  15. package/dist-lib/api/client.d.ts +5 -0
  16. package/dist-lib/api/data.d.ts +2 -4
  17. package/dist-lib/api/entities.d.ts +8 -15
  18. package/dist-lib/api/events.d.ts +3 -3
  19. package/dist-lib/cardProjection-Bkl2SSYz.js +499 -0
  20. package/dist-lib/components/actions/ResponsiveActionBar.d.ts +17 -16
  21. package/dist-lib/components/agents/AgentChatPanel.d.ts +3 -13
  22. package/dist-lib/components/agents/AgentChatPanel.impl.d.ts +14 -0
  23. package/dist-lib/components/agents/AgentPicker.d.ts +1 -2
  24. package/dist-lib/components/chrome/PageShell.d.ts +7 -0
  25. package/dist-lib/components/chrome/RecordHeader.d.ts +1 -2
  26. package/dist-lib/components/chrome/headerActionZone.d.ts +27 -0
  27. package/dist-lib/components/detail-layout/DetailAuditStrip.d.ts +1 -2
  28. package/dist-lib/components/detail-layout/DetailHighlights.d.ts +1 -2
  29. package/dist-lib/components/detail-layout/blockMeta.d.ts +2 -1
  30. package/dist-lib/components/fields/BoolField.d.ts +1 -1
  31. package/dist-lib/components/fields/EnumField.d.ts +1 -1
  32. package/dist-lib/components/fields/IntArrayField.d.ts +1 -1
  33. package/dist-lib/components/fields/MultilangArrayField.d.ts +2 -0
  34. package/dist-lib/components/fields/MultilangField.d.ts +1 -1
  35. package/dist-lib/components/fields/MultilangTextField.d.ts +1 -1
  36. package/dist-lib/components/fields/NumberField.d.ts +1 -1
  37. package/dist-lib/components/fields/PasswordField.d.ts +1 -1
  38. package/dist-lib/components/fields/RefCombobox.d.ts +1 -1
  39. package/dist-lib/components/fields/SecretField.d.ts +1 -1
  40. package/dist-lib/components/fields/StringArrayField.d.ts +1 -1
  41. package/dist-lib/components/fields/TimestampField.d.ts +1 -1
  42. package/dist-lib/components/fields/cells/registry.d.ts +2 -1
  43. package/dist-lib/components/fields/index.d.ts +2 -1
  44. package/dist-lib/components/fields/langMap.d.ts +2 -0
  45. package/dist-lib/components/fields/secretValue.d.ts +2 -0
  46. package/dist-lib/components/file-widgets/UnknownFileWidget.d.ts +3 -0
  47. package/dist-lib/components/file-widgets/UploadFailureText.d.ts +4 -0
  48. package/dist-lib/components/file-widgets/helpers.d.ts +1 -1
  49. package/dist-lib/components/file-widgets/host.d.ts +4 -3
  50. package/dist-lib/components/file-widgets/types.d.ts +1 -0
  51. package/dist-lib/components/file-widgets/upload.d.ts +18 -3
  52. package/dist-lib/components/filters/filter-op-label.d.ts +3 -0
  53. package/dist-lib/components/layout/ImpersonationBanner.d.ts +1 -1
  54. package/dist-lib/components/layout/ImpersonationFrame.d.ts +1 -1
  55. package/dist-lib/components/layout/Layout.d.ts +2 -1
  56. package/dist-lib/components/layout/Sidebar.d.ts +2 -1
  57. package/dist-lib/components/layout/TenantChip.d.ts +1 -1
  58. package/dist-lib/components/list/ViewSwitcher.d.ts +4 -2
  59. package/dist-lib/components/pages/DocumentsMenu.d.ts +1 -2
  60. package/dist-lib/components/pages/ExportMenu.d.ts +3 -5
  61. package/dist-lib/components/pages/RecordDocumentsPanel.d.ts +1 -2
  62. package/dist-lib/components/pages/auth/AuthShell.d.ts +4 -31
  63. package/dist-lib/components/pages/exportRequest.d.ts +4 -6
  64. package/dist-lib/components/pages/list/DeleteViewDialog.d.ts +8 -0
  65. package/dist-lib/components/pages/list/ListCardRow.d.ts +1 -2
  66. package/dist-lib/components/pages/list/ListCardsBody.d.ts +0 -1
  67. package/dist-lib/components/pages/list/ListFloatbar.d.ts +2 -2
  68. package/dist-lib/components/pages/list/ListHeader.d.ts +2 -2
  69. package/dist-lib/components/pages/list/ListNoRows.d.ts +4 -5
  70. package/dist-lib/components/pages/list/ListToolbar.d.ts +3 -2
  71. package/dist-lib/components/pages/list/ListUrlBanner.d.ts +10 -0
  72. package/dist-lib/components/pages/list/RowActionsCell.d.ts +2 -4
  73. package/dist-lib/components/pages/list/RowContextMenu.d.ts +1 -2
  74. package/dist-lib/components/pages/list/columns.d.ts +2 -1
  75. package/dist-lib/components/pages/list/filter-meta.d.ts +2 -1
  76. package/dist-lib/components/pages/list/useActiveView.d.ts +38 -0
  77. package/dist-lib/components/pages/list/useListColumnLayout.d.ts +6 -5
  78. package/dist-lib/components/pages/list/useListQuery.d.ts +4 -4
  79. package/dist-lib/components/pages/list/useListSort.d.ts +5 -4
  80. package/dist-lib/components/pages/list/useListViews.d.ts +18 -8
  81. package/dist-lib/components/pages/list/useRowMenu.d.ts +2 -3
  82. package/dist-lib/components/pages/profile/Profile.d.ts +3 -0
  83. package/dist-lib/components/params/ParamsBlock.d.ts +1 -13
  84. package/dist-lib/components/params/param-editors.d.ts +3 -11
  85. package/dist-lib/components/primitives/ClassifiedFieldLocked.d.ts +1 -2
  86. package/dist-lib/components/shared/DynamicIcon.d.ts +2 -2
  87. package/dist-lib/components/shared/LoadingSkeleton.d.ts +1 -0
  88. package/dist-lib/components/shared/LucideIcon.d.ts +1 -1
  89. package/dist-lib/components/shared/useOwnRefresh.d.ts +1 -1
  90. package/dist-lib/declarion-react.css +1 -1
  91. package/dist-lib/embed/theme.d.ts +1 -1
  92. package/dist-lib/embed/useEmbedNavigate.d.ts +1 -1
  93. package/dist-lib/failure-v-uGSpbX.js +158 -0
  94. package/dist-lib/{field-classification-D6xQYn-h.js → field-classification-C28XE-_P.js} +514 -307
  95. package/dist-lib/format-count-DA4wmmWR.js +1771 -0
  96. package/dist-lib/hooks/useEntityData.d.ts +1 -1
  97. package/dist-lib/hooks/useFilters.d.ts +7 -5
  98. package/dist-lib/hooks/useLanguage.d.ts +4 -0
  99. package/dist-lib/hooks/useParams.d.ts +4 -51
  100. package/dist-lib/hooks/useRegisterScreenTab.d.ts +1 -1
  101. package/dist-lib/hooks/useSSE.d.ts +3 -3
  102. package/dist-lib/hooks/useTabTitle.d.ts +2 -0
  103. package/dist-lib/hooks/useText.d.ts +3 -3
  104. package/dist-lib/hooks/useVersionWatcher.d.ts +1 -1
  105. package/dist-lib/hooks/useViews.d.ts +20 -0
  106. package/dist-lib/index.d.ts +8 -7
  107. package/dist-lib/index.js +2716 -5803
  108. package/dist-lib/lib/action-dispatch.d.ts +2 -1
  109. package/dist-lib/lib/actions.d.ts +30 -42
  110. package/dist-lib/lib/anchor.d.ts +3 -4
  111. package/dist-lib/lib/decimal-text.d.ts +1 -0
  112. package/dist-lib/lib/document-templates.d.ts +1 -2
  113. package/dist-lib/lib/download.d.ts +2 -1
  114. package/dist-lib/lib/evidence-verdict.d.ts +2 -1
  115. package/dist-lib/lib/failure.d.ts +2 -0
  116. package/dist-lib/lib/field-classification.d.ts +3 -3
  117. package/dist-lib/lib/filters.d.ts +18 -2
  118. package/dist-lib/lib/format-count.d.ts +8 -7
  119. package/dist-lib/lib/language.d.ts +19 -0
  120. package/dist-lib/lib/mass-edit.d.ts +2 -1
  121. package/dist-lib/lib/realtime-query-keys.d.ts +1 -1
  122. package/dist-lib/lib/realtime-reconcile.d.ts +3 -4
  123. package/dist-lib/lib/screen-back.d.ts +4 -6
  124. package/dist-lib/lib/sort.d.ts +9 -9
  125. package/dist-lib/lib/timestamp.d.ts +5 -7
  126. package/dist-lib/lib/ui-actions.d.ts +2 -1
  127. package/dist-lib/peekDraftStore-D-cTbiIr.js +199 -0
  128. package/dist-lib/registry-Cb3W-czW.js +1950 -0
  129. package/dist-lib/safe-url-oSJw5pzO.js +34 -0
  130. package/dist-lib/stores/icon-registry.d.ts +2 -2
  131. package/dist-lib/stores/list-layout.d.ts +3 -4
  132. package/dist-lib/stores/realtime.d.ts +1 -1
  133. package/dist-lib/stores/tabs.d.ts +3 -2
  134. package/dist-lib/testing.d.ts +6 -0
  135. package/dist-lib/testing.js +98 -76
  136. package/dist-lib/types/api.d.ts +7 -8
  137. package/dist-lib/types/fieldType.d.ts +1 -1
  138. package/dist-lib/types/files.d.ts +4 -4
  139. package/dist-lib/types/schema.d.ts +44 -50
  140. package/dist-lib/useAgentConversation-D97IqE-J.js +623 -0
  141. package/dist-lib/{useCurrentScreen-CzwzQpoW.js → useCurrentScreen-BL5NZFCw.js} +2777 -3768
  142. package/dist-lib/useListQuery-BG1GyKtJ.js +103 -0
  143. package/dist-lib/useProperties-4Lg3odrt.js +83 -0
  144. package/dist-lib/{useTabSearchMirror-C39U85cg.js → useTabSearchMirror-ZVLlINBX.js} +49 -51
  145. package/dist-lib/useText-BFDCTUSo.js +952 -0
  146. package/dist-lib/{value-Bo8C8WMU.js → value-By1-WJ8J.js} +74 -76
  147. package/dist-lib/vite/fingerprint-plugin.d.ts +2 -3
  148. package/package.json +9 -9
  149. package/dist-lib/Grid-DWgUPuZ3.js +0 -404
  150. package/dist-lib/MarkdownRenderer-CcSFc2N3.js +0 -85
  151. package/dist-lib/RecordIdBadge-CGxPR-8q.js +0 -24
  152. package/dist-lib/SmartDetailPage.impl-lskCd-WG.js +0 -1846
  153. package/dist-lib/SmartListPage.impl-CrGbdzyK.js +0 -2854
  154. package/dist-lib/SortHeaderMenu-SYSAaqQJ.js +0 -106
  155. package/dist-lib/action-dispatch-CR4ajBtT.js +0 -1985
  156. package/dist-lib/cardProjection-CW5RIMko.js +0 -699
  157. package/dist-lib/components/pages/home/HomeStub.d.ts +0 -6
  158. package/dist-lib/components/pages/jobs/Jobs.d.ts +0 -1
  159. package/dist-lib/components/pages/pipeline/Pipeline.d.ts +0 -1
  160. package/dist-lib/format-count-Dobmi-Ji.js +0 -1551
  161. package/dist-lib/hooks/useUserLocale.d.ts +0 -1
  162. package/dist-lib/lib/messages.d.ts +0 -12
  163. package/dist-lib/peekDraftStore-5wQ7lq_V.js +0 -194
  164. package/dist-lib/registry-CjgUaF7C.js +0 -1768
  165. package/dist-lib/useListQuery-D7Hr5WM1.js +0 -96
  166. package/dist-lib/useProperties-CqtCzFCr.js +0 -81
@@ -0,0 +1,103 @@
1
+ import { Ct as e, Et as t, Tt as n, l as r, s as i, wt as a } from "./useCurrentScreen-BL5NZFCw.js";
2
+ import { y as o } from "./field-classification-C28XE-_P.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, p = [];
7
+ function m(c) {
8
+ let u = d(), { entity: f, entityCode: m, screen: g, screenCode: _, page: v, perPage: y, sortForRequest: b, debouncedSearch: x, filters: S, isHeld: C, retryHeld: w, includeDeleted: T, expand: E, select: D, runCountQuery: O, urlKey: k } = c, A = S.length > 0 ? S : void 0, j = {
9
+ page: v,
10
+ per_page: y,
11
+ sort: b,
12
+ search: x || void 0,
13
+ filters: A,
14
+ include_deleted: T || void 0,
15
+ expand: E,
16
+ select: D,
17
+ preview: !0,
18
+ screen: g?.fixed_filters ? _ : void 0
19
+ }, M = {
20
+ sort: b,
21
+ filters: A,
22
+ search: x || void 0,
23
+ select: D,
24
+ expand: E,
25
+ includeDeleted: T || void 0,
26
+ screen: g?.fixed_filters ? _ : void 0,
27
+ preview: !0,
28
+ limit: y
29
+ }, N = f?.list_pagination === "cursor", P = t(m, j, !N && !C), F = n(m, j, O && !N && !C), I = r(m, M, N && !C);
30
+ o(a(m, j), !N && !C), o(i(m, M), N && !C);
31
+ let L = C || (N ? I.isLoading : P.isLoading), R = l(() => C ? p : N ? I.rows : P.data?.data ?? [], [
32
+ C,
33
+ N,
34
+ I.rows,
35
+ P.data?.data
36
+ ]), z = N ? I.total : F.data?.meta?.total, B = l(() => {
37
+ if (!(N || z === void 0 || y <= 0)) return Math.max(1, Math.ceil(z / y));
38
+ }, [
39
+ N,
40
+ z,
41
+ y
42
+ ]), V = h(L, k), H = N ? i(m, M) : a(m, j), U = e(m, j), W = O && !N, G = s(async () => {
43
+ if (C) {
44
+ w();
45
+ return;
46
+ }
47
+ m && (await Promise.all([u.cancelQueries({
48
+ queryKey: H,
49
+ exact: !0
50
+ }), W ? u.cancelQueries({
51
+ queryKey: U,
52
+ exact: !0
53
+ }) : void 0]), await Promise.all([N ? I.refetch() : P.refetch(), W ? F.refetch() : void 0]));
54
+ }, [
55
+ C,
56
+ w,
57
+ m,
58
+ u,
59
+ H,
60
+ U,
61
+ W,
62
+ N,
63
+ I,
64
+ P,
65
+ F
66
+ ]), K = s(() => {
67
+ I.fetchNextPage();
68
+ }, [I]);
69
+ return {
70
+ rows: R,
71
+ meta: C ? void 0 : P.data?.meta,
72
+ refs: C ? void 0 : N ? I.refs : P.data?.$refs,
73
+ isLoading: L,
74
+ isFetching: C || (N ? I.isFetching : P.isFetching),
75
+ isError: C ? !1 : N ? I.isError : P.isError,
76
+ error: C ? void 0 : N ? I.error : P.error,
77
+ isLoadingStale: V,
78
+ retry: G,
79
+ countTotal: C ? void 0 : z,
80
+ countStrategy: C ? void 0 : N ? I.countMode : F.data?.meta?.count_mode,
81
+ countLoading: C || (N ? I.isLoading : F.isLoading),
82
+ countError: !C && !N && F.isError,
83
+ totalPages: B,
84
+ hasMorePages: N ? I.hasMore : P.data?.meta?.has_more ?? (B !== void 0 && v < B),
85
+ isCursor: N,
86
+ fetchNextPage: K,
87
+ isFetchingNextPage: I.isFetchingNextPage
88
+ };
89
+ }
90
+ function h(e, t) {
91
+ let [n, r] = u(!1);
92
+ return c(() => {
93
+ if (!e) {
94
+ r(!1);
95
+ return;
96
+ }
97
+ r(!1);
98
+ let t = window.setTimeout(() => r(!0), f);
99
+ return () => window.clearTimeout(t);
100
+ }, [e, t]), n;
101
+ }
102
+ //#endregion
103
+ export { m as t };
@@ -0,0 +1,83 @@
1
+ import { kt as e } from "./useCurrentScreen-BL5NZFCw.js";
2
+ import { t } from "./useText-BFDCTUSo.js";
3
+ import { t as n, u as r } from "./failure-v-uGSpbX.js";
4
+ import { useMutation as i, useQueryClient as a } from "@tanstack/react-query";
5
+ //#region src/api/status.ts
6
+ async function o(e, t, n, i, a) {
7
+ let o = {
8
+ status_group_code: n,
9
+ status_code: i
10
+ };
11
+ a != null && (o.note = a);
12
+ let s = (await r(`${e}.__update`, {
13
+ object_ids: [t],
14
+ entity: e,
15
+ fields: { $statuses: [o] }
16
+ })).result?.rows?.[0]?.$statuses ?? [];
17
+ return s.find((e) => e.group_code === n) ?? s[0];
18
+ }
19
+ //#endregion
20
+ //#region src/hooks/useObjectStatus.ts
21
+ function s(r, s) {
22
+ let c = a(), l = t("errors");
23
+ return i({
24
+ mutationFn: ({ groupCode: e, statusCode: t, note: n }) => o(r, s, e, t, n),
25
+ onSuccess: () => {
26
+ c.invalidateQueries({ queryKey: ["entity-item", r] });
27
+ },
28
+ onError: (t) => {
29
+ e.error(n(l, t));
30
+ }
31
+ });
32
+ }
33
+ //#endregion
34
+ //#region src/api/properties.ts
35
+ async function c(e, t, n, i) {
36
+ let a = (await r(`${e}.__update`, {
37
+ object_ids: [t],
38
+ entity: e,
39
+ fields: { $properties: [{
40
+ property_code: n,
41
+ value: i
42
+ }] }
43
+ })).result?.rows?.[0]?.$properties ?? [];
44
+ return a.find((e) => e.property_code === n) ?? a[0];
45
+ }
46
+ async function l(e, t, n) {
47
+ await r(`${e}.__update`, {
48
+ object_ids: [t],
49
+ entity: e,
50
+ fields: { $properties: [{
51
+ property_code: n,
52
+ value: null
53
+ }] }
54
+ });
55
+ }
56
+ //#endregion
57
+ //#region src/hooks/useProperties.ts
58
+ function u(r, o) {
59
+ let s = a(), l = t("errors");
60
+ return i({
61
+ mutationFn: ({ propertyCode: e, value: t }) => c(r, o, e, t),
62
+ onSuccess: () => {
63
+ s.invalidateQueries({ queryKey: ["entity-item", r] });
64
+ },
65
+ onError: (t) => {
66
+ e.error(n(l, t));
67
+ }
68
+ });
69
+ }
70
+ function d(r, o) {
71
+ let s = a(), c = t("errors");
72
+ return i({
73
+ mutationFn: (e) => l(r, o, e),
74
+ onSuccess: () => {
75
+ s.invalidateQueries({ queryKey: ["entity-item", r] });
76
+ },
77
+ onError: (t) => {
78
+ e.error(n(c, t));
79
+ }
80
+ });
81
+ }
82
+ //#endregion
83
+ export { u as n, s as r, d as t };
@@ -1,9 +1,9 @@
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
- import { useEffect as i, useLayoutEffect as a } from "react";
4
- import { useSearchParams as o } from "react-router";
1
+ import { D as e, t } from "./useText-BFDCTUSo.js";
2
+ import { L as n } from "./field-classification-C28XE-_P.js";
3
+ import { useEffect as r, useLayoutEffect as i } from "react";
4
+ import { useSearchParams as a } from "react-router";
5
5
  //#region src/lib/filters.ts
6
- var s = /* @__PURE__ */ new Set([
6
+ var o = /* @__PURE__ */ new Set([
7
7
  "is_empty",
8
8
  "is_not_empty",
9
9
  "today",
@@ -13,7 +13,7 @@ var s = /* @__PURE__ */ new Set([
13
13
  "last_30_days",
14
14
  "last_hour",
15
15
  "last_24_hours"
16
- ]), c = /* @__PURE__ */ new Set(["in", "not_in"]), l = {
16
+ ]), s = /* @__PURE__ */ new Set(["in", "not_in"]), c = {
17
17
  eq: "is",
18
18
  not_eq: "is not",
19
19
  gt: ">",
@@ -34,22 +34,30 @@ var s = /* @__PURE__ */ new Set([
34
34
  last_30_days: "last 30 days",
35
35
  last_hour: "last hour",
36
36
  last_24_hours: "last 24 hours"
37
+ }, l = class extends Error {
38
+ code;
39
+ constructor(e, t) {
40
+ super(t), this.code = e, this.name = "FilterURLError";
41
+ }
37
42
  };
38
43
  function u(e) {
39
44
  let t = e.get("filters");
40
45
  if (t == null || t === "") return {
41
46
  filters: [],
42
- error: null
47
+ error: null,
48
+ errorCode: null
43
49
  };
44
50
  try {
45
51
  return {
46
52
  filters: d(e),
47
- error: null
53
+ error: null,
54
+ errorCode: null
48
55
  };
49
56
  } catch (e) {
50
57
  return {
51
58
  filters: [],
52
- error: e instanceof Error ? e.message : "The filters URL value is invalid."
59
+ error: String(e instanceof Error ? e.message : e),
60
+ errorCode: e instanceof l ? e.code : null
53
61
  };
54
62
  }
55
63
  }
@@ -60,37 +68,27 @@ function d(e) {
60
68
  try {
61
69
  n = JSON.parse(t);
62
70
  } catch {
63
- throw Error("The filters URL value is not valid JSON.");
71
+ throw new l("filter.url_not_json", "The filters URL value is not valid JSON.");
64
72
  }
65
- if (!Array.isArray(n) || !n.every(y)) throw Error("The filters URL value is not a valid filter tree.");
73
+ if (!Array.isArray(n) || !n.every(y)) throw new l("filter.url_not_tree", "The filters URL value is not a valid filter tree.");
66
74
  return n;
67
75
  }
68
76
  function f(e, t) {
69
- e.length === 0 ? t.delete("filters") : t.set("filters", JSON.stringify(e));
77
+ return JSON.stringify(e) === JSON.stringify(t);
70
78
  }
71
- function p(e) {
72
- return e.some((e) => !e || typeof e != "object" ? !1 : e.or != null || e.and != null && p(e.and));
79
+ function p(e, t, n = []) {
80
+ f(e, n) ? t.delete("filters") : t.set("filters", JSON.stringify(e));
73
81
  }
74
82
  function m(e) {
83
+ return e.some((e) => !e || typeof e != "object" ? !1 : e.or != null || e.and != null && m(e.and));
84
+ }
85
+ function h(e) {
75
86
  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)));
87
+ for (let n of e) n && typeof n == "object" && (n.field && n.op && t.push(n), n.or && t.push(...h(n.or)), n.and && t.push(...h(n.and)));
77
88
  return t;
78
89
  }
79
- function h(e) {
80
- return m(e).length;
81
- }
82
- function g(e, n) {
83
- if (!e.field || !e.op) return "";
84
- let r = l[e.op] || e.op;
85
- if (s.has(e.op)) return `${r}`;
86
- let i = e.field, a = (e) => {
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
- }
91
- return t(e);
92
- };
93
- return `${r} ${Array.isArray(e.value) ? e.value.map(a).join(", ") : a(e.value)}`;
90
+ function g(e) {
91
+ return h(e).length;
94
92
  }
95
93
  function _(e, t) {
96
94
  return {
@@ -124,54 +122,54 @@ function v(e, t) {
124
122
  }
125
123
  function y(e) {
126
124
  if (typeof e != "object" || !e || Array.isArray(e)) return !1;
127
- let t = e, n = Object.prototype.hasOwnProperty.call(t, "field"), r = Object.prototype.hasOwnProperty.call(t, "op"), i = Object.prototype.hasOwnProperty.call(t, "value"), a = Object.prototype.hasOwnProperty.call(t, "or"), o = Object.prototype.hasOwnProperty.call(t, "and");
128
- if (a && o) return !1;
129
- if (a || o) {
125
+ let t = e, n = Object.prototype.hasOwnProperty.call(t, "field"), r = Object.prototype.hasOwnProperty.call(t, "op"), i = Object.prototype.hasOwnProperty.call(t, "value"), a = Object.prototype.hasOwnProperty.call(t, "or"), s = Object.prototype.hasOwnProperty.call(t, "and");
126
+ if (a && s) return !1;
127
+ if (a || s) {
130
128
  if (n || r || i) return !1;
131
129
  let e = a ? t.or : t.and;
132
130
  return Array.isArray(e) && e.length > 0 && e.every(y);
133
131
  }
134
132
  if (!(n && r && typeof t.field == "string" && t.field.length > 0 && typeof t.op == "string" && b.has(t.op))) return !1;
135
133
  let c = t.op;
136
- return s.has(c) ? !i || t.value === null : i && t.value !== null;
134
+ return o.has(c) ? !i || t.value === null : i && t.value !== null;
137
135
  }
138
- var b = new Set(Object.keys(l));
136
+ var b = new Set(Object.keys(c));
139
137
  //#endregion
140
138
  //#region src/hooks/useRegisterScreenTab.ts
141
- function x(t, n, a, o) {
139
+ function x(t, i, a, o) {
142
140
  let s = e();
143
- i(() => {
144
- t && !s.enabled && r.getState().openTab({
141
+ r(() => {
142
+ t && !s.enabled && n.getState().openTab({
145
143
  pathname: t,
146
144
  search: o,
147
- title: n,
145
+ title: i,
148
146
  icon: a,
149
147
  closable: !0
150
148
  });
151
149
  }, [
152
150
  t,
153
- n,
151
+ i,
154
152
  a,
155
153
  s.enabled
156
154
  ]);
157
155
  }
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);
156
+ function S(e, n, r) {
157
+ let i = t(), a = e?.route, o = n ? i(e?.display?.name) || i(n.display.name_plural) : "", s = e?.display?.icon || n?.display.icon;
158
+ x(n ? a : void 0, o, s, r);
161
159
  }
162
160
  //#endregion
163
161
  //#region src/hooks/useTabSearchMirror.ts
164
162
  function C(t) {
165
- let n = e(), [i] = o();
166
- a(() => {
167
- if (!t || n.enabled) return;
168
- let e = r.getState(), a = e.findTabByPathname(t);
169
- a && e.updateTabSearch(a.id, i.toString());
163
+ let r = e(), [o] = a();
164
+ i(() => {
165
+ if (!t || r.enabled) return;
166
+ let e = n.getState(), i = e.findTabByPathname(t);
167
+ i && e.updateTabSearch(i.id, o.toString());
170
168
  }, [
171
- i,
169
+ o,
172
170
  t,
173
- n.enabled
171
+ r.enabled
174
172
  ]);
175
173
  }
176
174
  //#endregion
177
- export { s as a, _ as c, p as d, u as f, f as h, c as i, m as l, v as m, S as n, l as o, d as p, x as r, h as s, C as t, g as u };
175
+ export { o as a, _ as c, m as d, u as f, p as h, s as i, f as l, v as m, S as n, c as o, d as p, x as r, g as s, C as t, h as u };