@declarion/react 0.59.2 → 0.61.1

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 (39) hide show
  1. package/dist-lib/{AgentChatPanel.impl-DBH1Ff4G.js → AgentChatPanel.impl-rgkewyMl.js} +40 -40
  2. package/dist-lib/{DetailAuditStrip-9eJM2Fml.js → DetailAuditStrip-CSXZoy7v.js} +12 -12
  3. package/dist-lib/{DraggableChildrenTable-4RZC351U.js → DraggableChildrenTable-DruYOxKm.js} +35 -35
  4. package/dist-lib/{Grid-CQabaBLx.js → Grid-Dsf3I0xG.js} +3 -3
  5. package/dist-lib/{LayoutRenderer-DGKWZKpW.js → LayoutRenderer-QN7Wp2W6.js} +465 -465
  6. package/dist-lib/{ListCardsBody-DfGmyNIu.js → ListCardsBody-CNaZ0xwz.js} +27 -27
  7. package/dist-lib/{MarkdownRenderer-BDbzDv_y.js → MarkdownRenderer-BuO5hYJh.js} +2 -2
  8. package/dist-lib/{RefreshControl-Bhoib0ZA.js → RefreshControl-DO9rYcdq.js} +27 -27
  9. package/dist-lib/{SmartDetailPage.impl-DFjz29Ff.js → SmartDetailPage.impl-DFIIx80b.js} +471 -471
  10. package/dist-lib/SmartListPage.impl-D694R32H.js +3051 -0
  11. package/dist-lib/SmartRecordListPage.impl-CB5cuQJV.js +780 -0
  12. package/dist-lib/{SortHeaderMenu-Cijxk4cX.js → SortHeaderMenu-BV-aQbPy.js} +2 -2
  13. package/dist-lib/{action-dispatch-DY0c8U81.js → action-dispatch-gWmOYjOP.js} +189 -189
  14. package/dist-lib/api/data.d.ts +5 -1
  15. package/dist-lib/{cardProjection-Bkl2SSYz.js → cardProjection-BnmWukxk.js} +1 -1
  16. package/dist-lib/components/pages/list/filter-meta.d.ts +1 -1
  17. package/dist-lib/components/pages/list/useActiveView.d.ts +9 -2
  18. package/dist-lib/components/pages/list/useListViews.d.ts +3 -2
  19. package/dist-lib/components/primitives/Fields.d.ts +3 -1
  20. package/dist-lib/{failure-v-uGSpbX.js → failure-BUxXuP4c.js} +6 -6
  21. package/dist-lib/{format-count-DA4wmmWR.js → format-count-bXVfHzbI.js} +247 -247
  22. package/dist-lib/hooks/useObject.d.ts +3 -2
  23. package/dist-lib/index.js +1055 -1047
  24. package/dist-lib/lib/field-classification.d.ts +10 -1
  25. package/dist-lib/{peekDraftStore-D-cTbiIr.js → peekDraftStore-Dk1Ha5u3.js} +7 -7
  26. package/dist-lib/{registry-Cb3W-czW.js → registry-nSeHd5si.js} +445 -439
  27. package/dist-lib/testing.js +3 -3
  28. package/dist-lib/types/api.d.ts +0 -1
  29. package/dist-lib/{useAgentConversation-D97IqE-J.js → useAgentConversation-nT5UypJX.js} +15 -15
  30. package/dist-lib/{useCurrentScreen-BL5NZFCw.js → useCurrentScreen-0WBj7wT6.js} +1176 -1090
  31. package/dist-lib/{useListQuery-BG1GyKtJ.js → useListQuery-C7dq_sEo.js} +5 -5
  32. package/dist-lib/{field-classification-C28XE-_P.js → useOwnRefresh-q80kCMMh.js} +134 -160
  33. package/dist-lib/{useProperties-4Lg3odrt.js → useProperties-CeGKtq7Q.js} +3 -3
  34. package/dist-lib/{useTabSearchMirror-ZVLlINBX.js → useTabSearchMirror-CzNAj82Q.js} +2 -2
  35. package/dist-lib/{useText-BFDCTUSo.js → useText-BsedsJ-J.js} +2 -2
  36. package/dist-lib/{value-By1-WJ8J.js → value-Dwfyghtj.js} +1 -1
  37. package/package.json +9 -9
  38. package/dist-lib/SmartListPage.impl-BrZLE_Gb.js +0 -3046
  39. package/dist-lib/SmartRecordListPage.impl-C1FJLr80.js +0 -780
@@ -1,11 +1,12 @@
1
1
  import type { Entity, FieldAccessInfo, ClassificationTierDef, Schema } from "../types/schema";
2
+ import type { FilterNode } from "./filters";
2
3
  /**
3
4
  * isFieldReadable returns true when the caller can see the field's
4
5
  * value. Non-classified fields are always readable (no entry in
5
6
  * field_access). Classified fields are readable when field_access
6
7
  * marks read="granted".
7
8
  */
8
- export declare function isFieldReadable(entity: Entity | undefined, fieldName: string): boolean;
9
+ export declare function isFieldReadable(entity: Pick<Entity, "field_access"> | undefined, fieldName: string): boolean;
9
10
  /**
10
11
  * isFieldWritable returns true when the caller can submit a new value
11
12
  * for the field. Form components disable input + show a lock badge
@@ -50,3 +51,11 @@ export declare function isFieldSoDProtected(schema: Schema | undefined, entity:
50
51
  * both classification name + required_permission hint).
51
52
  */
52
53
  export declare function fieldAccessInfo(entity: Entity | undefined, fieldName: string): FieldAccessInfo | undefined;
54
+ /**
55
+ * The server refuses a filter, sort or search naming a field the caller may not
56
+ * read (`classification.field_unreadable`). A DECLARED default the SDK sends -
57
+ * `sort_default`, a view, `options_filter` - is trimmed to what the caller may read.
58
+ */
59
+ export declare function isQueryFieldReadable(entity: Pick<Entity, "field_access"> | undefined, code: string): boolean;
60
+ export declare function readableSort(entity: Pick<Entity, "field_access"> | undefined, sort: string | undefined): string | undefined;
61
+ export declare function readableFilters(entity: Pick<Entity, "field_access"> | undefined, nodes: FilterNode[]): FilterNode[];
@@ -1,7 +1,7 @@
1
1
  import { s as e } from "./DynamicIcon-DW5krHuX.js";
2
- import { Pn as t, Rn as n, i as r, on as i, rn as a } from "./useCurrentScreen-BL5NZFCw.js";
3
- import { A as o, t as s } from "./useText-BFDCTUSo.js";
4
- import { t as c, u as l } from "./failure-v-uGSpbX.js";
2
+ import { Jn as t, Wn as n, gn as r, i, pn as a } from "./useCurrentScreen-0WBj7wT6.js";
3
+ import { A as o, t as s } from "./useText-BsedsJ-J.js";
4
+ import { t as c, u as l } from "./failure-BUxXuP4c.js";
5
5
  import { useMemo as u, useRef as d, useState as f } from "react";
6
6
  import { useQuery as p } from "@tanstack/react-query";
7
7
  import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
@@ -24,7 +24,7 @@ function y(e, t) {
24
24
  //#region src/components/pages/DocumentsMenu.tsx
25
25
  var b = "document-templates-available";
26
26
  function x({ entityCode: o, scope: _, objectIds: y = [], viewState: x, selectedIds: T = [], capability: E, canManageTemplates: D = !1 }) {
27
- let O = s(), k = s("errors"), { run: A } = r(), j = d(null), [M, N] = f(!1), P = _ === "detail" ? !!E?.generate_one : !!E?.generate_many, F = D && !P, { data: I, isLoading: L, error: R } = p({
27
+ let O = s(), k = s("errors"), { run: A } = i(), j = d(null), [M, N] = f(!1), P = _ === "detail" ? !!E?.generate_one : !!E?.generate_many, F = D && !P, { data: I, isLoading: L, error: R } = p({
28
28
  queryKey: [b, o],
29
29
  queryFn: async () => (await l("document.templates.available", { entity: o })).result?.templates ?? [],
30
30
  enabled: M || F,
@@ -69,10 +69,10 @@ function x({ entityCode: o, scope: _, objectIds: y = [], viewState: x, selectedI
69
69
  }
70
70
  });
71
71
  }
72
- let { isPhone: K } = i();
72
+ let { isPhone: K } = r();
73
73
  if (!H) return null;
74
74
  let q = O("document.menu.generate", "Generate");
75
- return /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h(n, {
75
+ return /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h(t, {
76
76
  ref: j,
77
77
  kind: "ghost",
78
78
  size: "sm",
@@ -82,7 +82,7 @@ function x({ entityCode: o, scope: _, objectIds: y = [], viewState: x, selectedI
82
82
  "aria-label": q,
83
83
  title: q,
84
84
  children: K ? null : q
85
- }), /* @__PURE__ */ g(t, {
85
+ }), /* @__PURE__ */ g(n, {
86
86
  open: M,
87
87
  anchor: j.current,
88
88
  onClose: () => N(!1),