@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
@@ -4,7 +4,11 @@ import type { ExportRequest } from "../components/pages/exportRequest.d.ts";
4
4
  export declare function listEntities(entity: string, params?: ListParams, options?: {
5
5
  signal?: AbortSignal;
6
6
  }): Promise<ListResponse>;
7
- export declare function getEntity(entity: string, pkValues: PkValues | string): Promise<DataResponse>;
7
+ /** What a single-record read asks the server to compute beside the row. */
8
+ export interface GetEntityOptions {
9
+ expand?: readonly "evidence"[];
10
+ }
11
+ export declare function getEntity(entity: string, pkValues: PkValues | string, options?: GetEntityOptions): Promise<DataResponse>;
8
12
  export declare function createEntity(entity: string, data: Record<string, unknown>): Promise<DataResponse>;
9
13
  export declare function updateEntity(entity: string, pkValues: PkValues | string, data: Record<string, unknown>): Promise<DataResponse>;
10
14
  export declare function deleteObject(entity: string, pkValues: PkValues | string): Promise<void>;
@@ -1,4 +1,4 @@
1
- import { h as e, yn as t } from "./useCurrentScreen-BL5NZFCw.js";
1
+ import { h as e, kn as t } from "./useCurrentScreen-0WBj7wT6.js";
2
2
  //#region src/components/pages/list/cardProjection.ts
3
3
  var n = 4, r = 2, i = 2, a = [
4
4
  "screen_card",
@@ -22,4 +22,4 @@ import type { TextFn } from "../../../lib/language.d.ts";
22
22
  export declare function buildFilterFieldMeta(t: TextFn, screen: (Pick<Screen, "filters"> & {
23
23
  filter_special_values?: Record<string, ScreenFilterSpecialValues>;
24
24
  filter_operators?: Record<string, string[]>;
25
- }) | undefined, entity: Pick<Entity, "fields" | "status_groups" | "properties"> | undefined, entities?: Record<string, Entity>): FilterFieldMeta[];
25
+ }) | undefined, entity: Pick<Entity, "fields" | "status_groups" | "properties" | "field_access"> | undefined, entities?: Record<string, Entity>): FilterFieldMeta[];
@@ -1,5 +1,5 @@
1
1
  import type { FilterNode } from "../../../lib/filters.d.ts";
2
- import type { Screen } from "../../../types/schema.d.ts";
2
+ import type { Entity, Screen } from "../../../types/schema.d.ts";
3
3
  import type { ViewItem } from "../../list/ViewSwitcher.d.ts";
4
4
  export declare function baseViewSearchParams(current: URLSearchParams): URLSearchParams;
5
5
  /** Scoped to who is asking as well as to the screen: a tenant switch or a
@@ -8,6 +8,7 @@ export declare function defaultViewClearedKey(screenCode: string, tenantId?: str
8
8
  interface ActiveViewInput {
9
9
  screenCode: string;
10
10
  screen: Screen | undefined;
11
+ entity: Entity | undefined;
11
12
  searchParams: URLSearchParams;
12
13
  setSearchParams: (next: URLSearchParams, options?: {
13
14
  replace?: boolean;
@@ -21,6 +22,12 @@ export interface ViewDefaults {
21
22
  columns: string[];
22
23
  sort: string | undefined;
23
24
  }
25
+ /** The query a view (or none) states, less any field the caller may not read,
26
+ * which the server would refuse; an emptied sort falls back to `sort_default`. */
27
+ export declare function viewQuery(entity: Entity | undefined, view: ViewItem | undefined, screen: Screen | undefined): {
28
+ filters: FilterNode[];
29
+ sort: string | undefined;
30
+ };
24
31
  export interface ActiveView {
25
32
  all: ViewItem[];
26
33
  activeId: string | null;
@@ -34,5 +41,5 @@ export interface ActiveView {
34
41
  }
35
42
  /** Resolves the list's active view from the `view` URL parameter. It runs above
36
43
  * the filter, column and sort hooks because each of them falls back to it. */
37
- export declare function useActiveView({ screenCode, screen, searchParams, setSearchParams, userId, tenantId, filterError, }: ActiveViewInput): ActiveView;
44
+ export declare function useActiveView({ screenCode, screen, entity, searchParams, setSearchParams, userId, tenantId, filterError, }: ActiveViewInput): ActiveView;
38
45
  export {};
@@ -1,10 +1,11 @@
1
1
  import { type FilterNode } from "../../../lib/filters.d.ts";
2
- import { type Screen } from "../../../types/schema.d.ts";
2
+ import { type Entity, type Screen } from "../../../types/schema.d.ts";
3
3
  import type { ViewItem } from "../../list/ViewSwitcher.d.ts";
4
4
  import type { TextFn } from "../../../lib/language.d.ts";
5
5
  interface ListViewsInput {
6
6
  screenCode: string;
7
7
  screen: Screen | undefined;
8
+ entity: Entity | undefined;
8
9
  searchParams: URLSearchParams;
9
10
  setSearchParams: (next: URLSearchParams, options?: {
10
11
  replace?: boolean;
@@ -49,7 +50,7 @@ export interface ListViews {
49
50
  * A view owns the LOGICAL layout - filters, columns, sort - and nothing else.
50
51
  * Column widths are per device and never travel in one.
51
52
  */
52
- export declare function useListViews({ screenCode, screen, searchParams, setSearchParams, userId, tenantId, all, activeId, active, clearedKey, filters, visibleColumns, sort, }: ListViewsInput): ListViews;
53
+ export declare function useListViews({ screenCode, screen, entity, searchParams, setSearchParams, userId, tenantId, all, activeId, active, clearedKey, filters, visibleColumns, sort, }: ListViewsInput): ListViews;
53
54
  /** The name a save dialog offers to overwrite, or null when the active view is
54
55
  * not the caller's to overwrite. */
55
56
  export declare function overwritableViewName(t: TextFn, active: ViewItem | undefined): string | null;
@@ -3,8 +3,10 @@ export type FieldLabelProps = {
3
3
  children?: ReactNode;
4
4
  required?: boolean;
5
5
  hint?: string;
6
+ htmlFor?: string;
7
+ id?: string;
6
8
  };
7
- export declare const FieldLabel: ({ children, required, hint }: FieldLabelProps) => import("react").JSX.Element;
9
+ export declare const FieldLabel: ({ children, required, hint, htmlFor, id }: FieldLabelProps) => import("react").JSX.Element;
8
10
  export type TextInputProps = Omit<InputHTMLAttributes<HTMLInputElement>, "value" | "onChange" | "prefix"> & {
9
11
  value?: string | null;
10
12
  onChange?: (v: string) => void;
@@ -1,4 +1,4 @@
1
- import { $ as e, M as t, N as n, R as r, nt as i, rt as a } from "./useText-BFDCTUSo.js";
1
+ import { $ as e, M as t, N as n, R as r, nt as i, rt as a } from "./useText-BsedsJ-J.js";
2
2
  import { n as o } from "./safe-url-oSJw5pzO.js";
3
3
  //#region src/api/data.ts
4
4
  function s(e, t) {
@@ -13,15 +13,15 @@ async function c(e, n = {}, r = {}) {
13
13
  }
14
14
  return t(s(e, n), { signal: r.signal });
15
15
  }
16
- async function l(e, n) {
16
+ async function l(e, n, r = {}) {
17
17
  if (C) {
18
18
  let t = C(e, n);
19
19
  if (t !== void 0) return t;
20
20
  }
21
- let r = new URLSearchParams();
22
- if (typeof n == "string") r.set("id", n);
23
- else for (let [e, t] of Object.entries(n)) r.set(e, t);
24
- return t(`/api/data/${e}?${r.toString()}`);
21
+ let i = new URLSearchParams();
22
+ if (typeof n == "string") i.set("id", n);
23
+ else for (let [e, t] of Object.entries(n)) i.set(e, t);
24
+ return r.expand?.length && i.set("expand", r.expand.join(",")), t(`/api/data/${e}?${i.toString()}`);
25
25
  }
26
26
  async function u(e, t) {
27
27
  return { data: ((await E(`${e}.__create`, {