@declarion/react 0.45.0 → 0.47.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 (35) hide show
  1. package/dist-lib/{DraggableChildrenTable-BDnJK0AU.js → DraggableChildrenTable-B6KjWkwD.js} +2 -2
  2. package/dist-lib/{DynamicIcon-DeRpAaXm.js → DynamicIcon-Dc2j-rg_.js} +19 -17
  3. package/dist-lib/{Grid-CcCveEE7.js → Grid-OdquWJNX.js} +2 -2
  4. package/dist-lib/{LayoutRenderer-BReuhVdX.js → LayoutRenderer-CzAdhjNT.js} +525 -518
  5. package/dist-lib/{MarkdownRenderer-DPKDFR60.js → MarkdownRenderer-C6bhrAIe.js} +10 -10
  6. package/dist-lib/{RefreshControl-KddgOhUG.js → RefreshControl-F9Ib9asP.js} +18 -18
  7. package/dist-lib/{SmartDetailPage.impl-D_hMxiHy.js → SmartDetailPage.impl-DdSu3kmW.js} +305 -294
  8. package/dist-lib/{SmartRecordListPage.impl-GIo_mPIJ.js → SmartRecordListPage.impl-SkIp0_Rd.js} +165 -154
  9. package/dist-lib/api/agents.d.ts +39 -7
  10. package/dist-lib/components/agents/AgentChatPanel.d.ts +6 -1
  11. package/dist-lib/components/agents/transcript-runs.d.ts +29 -0
  12. package/dist-lib/components/file-widgets/host.d.ts +1 -0
  13. package/dist-lib/components/list/QuickPeek.d.ts +1 -1
  14. package/dist-lib/components/pages/list/ListFloatbar.d.ts +4 -2
  15. package/dist-lib/components/pages/list/cardProjection.d.ts +2 -1
  16. package/dist-lib/components/shared/RowActionsKebab.d.ts +3 -2
  17. package/dist-lib/components/views/ViewSwitcher.d.ts +2 -1
  18. package/dist-lib/hooks/useAgentConversation.d.ts +7 -19
  19. package/dist-lib/hooks/useFilters.d.ts +1 -0
  20. package/dist-lib/icons.js +1 -1
  21. package/dist-lib/index.d.ts +8 -1
  22. package/dist-lib/index.js +3031 -2674
  23. package/dist-lib/lib/actions.d.ts +1 -1
  24. package/dist-lib/lib/filter-evaluator.d.ts +16 -0
  25. package/dist-lib/lib/filters.d.ts +10 -4
  26. package/dist-lib/lib/messages.d.ts +1 -0
  27. package/dist-lib/lib/variants.d.ts +7 -0
  28. package/dist-lib/{registry-DJKp0yaV.js → registry-C2VD-5MD.js} +571 -347
  29. package/dist-lib/testing.js +1 -1
  30. package/dist-lib/types/schema.d.ts +26 -0
  31. package/dist-lib/{useCurrentScreen-A3xZDs7U.js → useCurrentScreen-ow4r-nWa.js} +721 -693
  32. package/dist-lib/{useProperties-TlltWwLv.js → useProperties-lEKfzm2X.js} +92 -61
  33. package/dist-lib/{value-CHY7LgZ-.js → value-CXohNH6a.js} +1 -1
  34. package/dist-lib/vite/index.js +23 -22
  35. package/package.json +12 -12
@@ -170,7 +170,7 @@ export type ResolvedActionLayoutNode = ResolvedActionLeaf | ResolvedActionGroup;
170
170
  * @param rowSelection All selected rows for bulk context (list_toolbar bulk mode).
171
171
  * Pass empty array for non-bulk contexts.
172
172
  */
173
- export declare function applyRowState(layout: ResolvedActionLayoutNode[], entityActions: Record<string, Action> | undefined, globalActions: Record<string, Action> | undefined, row: Record<string, unknown>, rowSelection: Record<string, unknown>[]): ResolvedActionLayoutNode[];
173
+ export declare function applyRowState(layout: ResolvedActionLayoutNode[], entityActions: Record<string, Action> | undefined, globalActions: Record<string, Action> | undefined, row: Record<string, unknown>, rowSelection: Record<string, unknown>[], allowedActionCodes?: ReadonlySet<string>): ResolvedActionLayoutNode[];
174
174
  /**
175
175
  * Composes a flat ResolvedActionLayoutNode[] from an entity's actions map,
176
176
  * filtered to those that include the given slot in their visibility array,
@@ -0,0 +1,16 @@
1
+ import type { FilterNode } from "./filters";
2
+ /** Metadata needed to evaluate a record-only filter condition. */
3
+ export interface FilterRecordField {
4
+ type: "string" | "text" | "rich_text" | "email" | "url" | "phone" | "enum" | "int" | "float" | "decimal" | "date" | "timestamp" | "time" | "bool" | "ref" | "uuid" | (string & {});
5
+ }
6
+ export type FilterRecordFields = Readonly<Record<string, FilterRecordField>>;
7
+ export type FilterRecord = Readonly<Record<string, unknown>>;
8
+ /**
9
+ * Evaluate a loader-validated filter tree against one already-loaded record.
10
+ *
11
+ * This deliberately accepts only the deterministic record subset: it has no
12
+ * caller, clock, relation lookup, or value coercion input. A missing field is
13
+ * the same as null for `is_empty`; every other operator returns false for a
14
+ * missing, null, or empty value.
15
+ */
16
+ export declare function evaluateFilterTree(nodes: FilterNode[], fields: FilterRecordFields, record: FilterRecord): boolean;
@@ -4,8 +4,8 @@ export interface FilterNode {
4
4
  field?: string;
5
5
  op?: FilterOp;
6
6
  value?: unknown;
7
- /** OR group: each inner array is AND-ed, groups are OR-ed */
8
- or?: FilterNode[][];
7
+ /** OR group: child nodes are OR-ed. */
8
+ or?: FilterNode[];
9
9
  /** Explicit AND group (rarely needed, top-level is implicit AND) */
10
10
  and?: FilterNode[];
11
11
  }
@@ -39,7 +39,13 @@ export declare const NO_VALUE_OPS: Set<FilterOp>;
39
39
  export declare const MULTI_VALUE_OPS: Set<FilterOp>;
40
40
  /** Human-friendly display names for operators. */
41
41
  export declare const OP_LABELS: Record<FilterOp, string>;
42
+ export interface FilterURLState {
43
+ filters: FilterNode[];
44
+ error: string | null;
45
+ }
42
46
  /** Parse filters from URL search params (JSON `filters` param). */
47
+ export declare function parseFilterURLState(searchParams: URLSearchParams): FilterURLState;
48
+ /** Parse the final tree and reject malformed URL state instead of treating it as no filter. */
43
49
  export declare function parseFiltersFromURL(searchParams: URLSearchParams): FilterNode[];
44
50
  /** Write filters to URL search params. */
45
51
  export declare function setFiltersInURL(filters: FilterNode[], searchParams: URLSearchParams): void;
@@ -48,7 +54,7 @@ export declare function setFiltersInURL(filters: FilterNode[], searchParams: URL
48
54
  * Uses the JSON `filters` param for the API request.
49
55
  */
50
56
  export declare function filtersToApiParams(filters: FilterNode[]): URLSearchParams;
51
- /** Check if the filter tree has any OR groups (needs Level 2 UI). */
57
+ /** Check if the filter tree has any OR groups. */
52
58
  export declare function hasOrGroups(nodes: FilterNode[]): boolean;
53
59
  /** Extract flat field conditions from a FilterNode array (ignoring OR/AND structure). */
54
60
  export declare function flatFieldConditions(nodes: FilterNode[]): FilterNode[];
@@ -67,5 +73,5 @@ export declare function countActiveFilters(nodes: FilterNode[]): number;
67
73
  export declare function formatFilterChip(node: FilterNode, resolveValue?: FilterValueResolver): string;
68
74
  /** Create a simple equality filter node. */
69
75
  export declare function eqFilter(field: string, value: string): FilterNode;
70
- /** Remove a filter node by field name, recursing into OR/AND groups. */
76
+ /** Remove a filter node by field name, recursing through the final tree. */
71
77
  export declare function removeFilter(nodes: FilterNode[], field: string): FilterNode[];
@@ -1,5 +1,6 @@
1
1
  import { type LocalizedString } from "../types/schema";
2
2
  import type { PublicParam } from "../types/api";
3
+ export declare const DEFAULT_LOCALE = "en";
3
4
  export type MessageCatalog = Record<string, LocalizedString> | undefined;
4
5
  export declare function localizedMessage(messages: MessageCatalog, code: string, locale: string, fallback?: string): string;
5
6
  export declare function publicLocale(parameters: PublicParam[] | undefined): string;
@@ -0,0 +1,7 @@
1
+ import { type FilterRecord } from "./filter-evaluator";
2
+ import type { Entity, Screen } from "../types/schema";
3
+ export declare function resolveEntityVariantCode(entity: Entity, record: FilterRecord): string | undefined;
4
+ export declare function variantActionCodesForRecord(entity: Entity | undefined, record: FilterRecord): ReadonlySet<string> | undefined;
5
+ export declare function commonVariantActionCodes(entity: Entity | undefined, records: readonly FilterRecord[]): ReadonlySet<string> | undefined;
6
+ export declare function resolveScreenVariantCode(entity: Entity, screen: Screen, record: FilterRecord): string | undefined;
7
+ export declare function effectiveScreenForRecord(entity: Entity | undefined, screen: Screen | undefined, record: FilterRecord): Screen | undefined;