@declarion/react 0.59.0 → 0.60.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 (36) hide show
  1. package/dist-lib/{AgentChatPanel.impl-DBH1Ff4G.js → AgentChatPanel.impl-BY-Ir7Sh.js} +39 -39
  2. package/dist-lib/{DetailAuditStrip-GNRA_eP5.js → DetailAuditStrip-B9p1XhjC.js} +26 -27
  3. package/dist-lib/{DraggableChildrenTable-4RZC351U.js → DraggableChildrenTable-CtL7rdT6.js} +34 -34
  4. package/dist-lib/{Grid-CQabaBLx.js → Grid-CYERLdXO.js} +1 -1
  5. package/dist-lib/{LayoutRenderer-DGKWZKpW.js → LayoutRenderer-B08IJKsZ.js} +465 -465
  6. package/dist-lib/{ListCardsBody-DfGmyNIu.js → ListCardsBody-Dje_rays.js} +26 -26
  7. package/dist-lib/{MarkdownRenderer-BDbzDv_y.js → MarkdownRenderer-N0IWjTH5.js} +1 -1
  8. package/dist-lib/{RefreshControl-Bhoib0ZA.js → RefreshControl-BEWSHtAC.js} +26 -26
  9. package/dist-lib/{SmartDetailPage.impl-Ds2RGg6K.js → SmartDetailPage.impl-CYiM-ITJ.js} +467 -467
  10. package/dist-lib/SmartListPage.impl-Db_Pv9Xc.js +3051 -0
  11. package/dist-lib/SmartRecordListPage.impl-hbbLglC1.js +780 -0
  12. package/dist-lib/{SortHeaderMenu-Cijxk4cX.js → SortHeaderMenu-DKKeCGTH.js} +1 -1
  13. package/dist-lib/{action-dispatch-DY0c8U81.js → action-dispatch-DbiOpvd6.js} +187 -187
  14. package/dist-lib/api/data.d.ts +5 -1
  15. package/dist-lib/{cardProjection-Bkl2SSYz.js → cardProjection-nveYLvHR.js} +1 -1
  16. package/dist-lib/components/chrome/headerActionZone.d.ts +27 -0
  17. package/dist-lib/components/pages/list/filter-meta.d.ts +1 -1
  18. package/dist-lib/components/pages/list/useActiveView.d.ts +9 -2
  19. package/dist-lib/components/pages/list/useListViews.d.ts +3 -2
  20. package/dist-lib/{failure-v-uGSpbX.js → failure-BT54OLHy.js} +5 -5
  21. package/dist-lib/{format-count-DA4wmmWR.js → format-count-DLFCdtME.js} +246 -246
  22. package/dist-lib/hooks/useObject.d.ts +3 -2
  23. package/dist-lib/index.js +1083 -1091
  24. package/dist-lib/lib/field-classification.d.ts +10 -1
  25. package/dist-lib/{peekDraftStore-D-cTbiIr.js → peekDraftStore-DSExeoAh.js} +6 -6
  26. package/dist-lib/{registry-Cb3W-czW.js → registry-CRPxNbkk.js} +444 -438
  27. package/dist-lib/testing.js +2 -2
  28. package/dist-lib/{useAgentConversation-D97IqE-J.js → useAgentConversation-BavrHfrU.js} +14 -14
  29. package/dist-lib/{useCurrentScreen-BL5NZFCw.js → useCurrentScreen-BPq7HMF1.js} +1083 -1017
  30. package/dist-lib/{useListQuery-BG1GyKtJ.js → useListQuery-CG1WM4cv.js} +5 -5
  31. package/dist-lib/{field-classification-C28XE-_P.js → useOwnRefresh-C18iWRgr.js} +132 -158
  32. package/dist-lib/{useProperties-4Lg3odrt.js → useProperties-C35JrjwQ.js} +2 -2
  33. package/dist-lib/{useTabSearchMirror-ZVLlINBX.js → useTabSearchMirror-DKktWWLB.js} +1 -1
  34. package/package.json +1 -1
  35. package/dist-lib/SmartListPage.impl-BrZLE_Gb.js +0 -3046
  36. 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-BPq7HMF1.js";
2
2
  //#region src/components/pages/list/cardProjection.ts
3
3
  var n = 4, r = 2, i = 2, a = [
4
4
  "screen_card",
@@ -0,0 +1,27 @@
1
+ import type { CSSProperties } from "react";
2
+ /**
3
+ * The room the action zone demands before it will share a line with whatever
4
+ * came before it. One call to action plus its menu - below that the bar shows a
5
+ * lone menu trigger, which is not worth a line of its own.
6
+ *
7
+ * Measured, not chosen: at 402px the meta items that wrap past the title leave
8
+ * ~190px on their line. A 240px demand refused it and took a THIRD line, so a
9
+ * phone spent one row on a record-id prefix and an info icon with a gap beside
10
+ * them. At 180 the actions finish that row instead - which is what a reader
11
+ * expects when they can see the space.
12
+ */
13
+ export declare const ACTION_ZONE_MIN_WIDTH = 180;
14
+ /**
15
+ * The action zone of every header row, per the UI SDK guide's "Header
16
+ * composition". It is one item of a WRAPPING row that asks for a minimum and
17
+ * pushes itself to the trailing edge: room left after the identity items means
18
+ * it finishes that line, no room means it takes the next one, and
19
+ * `margin-left: auto` keeps it right on either. Being one item, it can never
20
+ * split half-left and half-right.
21
+ *
22
+ * It grows into whatever the line has left. Content-sized, the zone handed the
23
+ * action bar its own minimum as the width to measure - so a line with 1600px
24
+ * free still showed two buttons. The buttons stay flush to the trailing edge
25
+ * inside a zone that is as wide as the space actually is.
26
+ */
27
+ export declare const headerActionZoneStyle: CSSProperties;
@@ -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;
@@ -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`, {