@declarion/react 0.393.0 → 0.395.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.
@@ -7,22 +7,22 @@ import { useText as d } from "../../hooks/useText.js";
7
7
  import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
8
8
  // src/components/detail-layout/FieldsBlock.tsx
9
9
  function h({ fields: r, ctx: h }) {
10
- let _ = d(), { entity: v, entityCode: y, record: b, mode: x, onFieldChange: S, schema: C } = h, w = h.columns ?? 2, T = r.filter((e) => g(h, e.code)), E = w === 1 && r.length === 1;
11
- return T.length === 0 ? null : /* @__PURE__ */ p(c, {
12
- columns: w,
13
- children: T.map((r) => {
14
- let c = r.code, d = `${y ?? "field"}-${c}`, g = `${d}-label`, w = v.fields.get(c), T = !!(w?.auto || w?.readonly || w?.source), D = o(v, c), O = D?.read === "denied", k = D?.write === "denied", A = x === "display" ? O : k || O, j = T || x === "edit" && k ? "display" : x, M = A ? /* @__PURE__ */ p(i, {
15
- tier: D.classification,
10
+ let _ = d(), { entity: v, entityCode: y, record: b, mode: x, onFieldChange: S, schema: C, isNew: w } = h, T = h.columns ?? 2, E = r.filter((e) => g(h, e.code)), D = T === 1 && r.length === 1;
11
+ return E.length === 0 ? null : /* @__PURE__ */ p(c, {
12
+ columns: T,
13
+ children: E.map((r) => {
14
+ let c = r.code, d = `${y ?? "field"}-${c}`, g = `${d}-label`, T = v.fields.get(c), E = !!(T?.auto || T?.readonly || T?.source || T?.immutable && !w), O = o(v, c), k = O?.read === "denied", A = O?.write === "denied", j = x === "display" ? k : A || k, M = E || x === "edit" && A ? "display" : x, N = j ? /* @__PURE__ */ p(i, {
15
+ tier: O.classification,
16
16
  tierDef: a(C, v, c),
17
- requiredPermission: D?.required_permission,
18
- variant: j === "edit" ? "input" : "value"
17
+ requiredPermission: O?.required_permission,
18
+ variant: M === "edit" ? "input" : "value"
19
19
  }) : t({
20
20
  entity: v,
21
21
  entityCode: y,
22
22
  fieldName: c,
23
23
  record: b,
24
- mode: j,
25
- onChange: S && !T ? (e) => S(c, e) : void 0,
24
+ mode: M,
25
+ onChange: S && !E ? (e) => S(c, e) : void 0,
26
26
  refs: h.refs,
27
27
  entities: C?.entities,
28
28
  screens: C?.screens,
@@ -32,40 +32,40 @@ function h({ fields: r, ctx: h }) {
32
32
  structure: r.structure,
33
33
  detailScreen: r.detail_screen
34
34
  });
35
- if (!M) return null;
36
- let N = x === "display" && r.actions && r.actions.length > 0 ? /* @__PURE__ */ p(f, { children: r.actions.map((t, n) => /* @__PURE__ */ p(e, {
35
+ if (!N) return null;
36
+ let P = x === "display" && r.actions && r.actions.length > 0 ? /* @__PURE__ */ p(f, { children: r.actions.map((t, n) => /* @__PURE__ */ p(e, {
37
37
  actionCode: `${c}.action[${n}]`,
38
38
  action: t,
39
39
  entityCode: y,
40
40
  row: b,
41
41
  variant: "ghost",
42
42
  size: "icon"
43
- }, n)) }) : void 0, P = !!w && l.has(w.type), F = j === "display" ? u(w, b?.[c]) : void 0, I = _(w?.display?.description);
44
- return E && (P || r.structure || v.files?.get(c)) ? /* @__PURE__ */ m("div", {
43
+ }, n)) }) : void 0, F = !!T && l.has(T.type), I = M === "display" ? u(T, b?.[c]) : void 0, L = _(T?.display?.description);
44
+ return D && (F || r.structure || v.files?.get(c)) ? /* @__PURE__ */ m("div", {
45
45
  style: { gridColumn: "1 / -1" },
46
- children: [M, j === "edit" && I && /* @__PURE__ */ p("div", {
46
+ children: [N, M === "edit" && L && /* @__PURE__ */ p("div", {
47
47
  style: {
48
48
  fontSize: 11.5,
49
49
  lineHeight: 1.4,
50
50
  color: "var(--text-3)",
51
51
  marginTop: 3
52
52
  },
53
- children: I
53
+ children: L
54
54
  })]
55
55
  }, c) : /* @__PURE__ */ p(s, {
56
56
  "data-testid": `field-${c}`,
57
57
  label: n(_, v, c, C.entities),
58
- htmlFor: j === "edit" ? d : void 0,
58
+ htmlFor: M === "edit" ? d : void 0,
59
59
  labelId: g,
60
- labelTitle: I || void 0,
61
- required: w?.required ?? !1,
62
- mode: j,
63
- span: P,
60
+ labelTitle: L || void 0,
61
+ required: T?.required ?? !1,
62
+ mode: M,
63
+ span: F,
64
64
  error: h.fieldErrors?.[c],
65
- hint: j === "edit" && I ? I : void 0,
66
- actions: N,
67
- copyValue: F,
68
- children: M
65
+ hint: M === "edit" && L ? L : void 0,
66
+ actions: P,
67
+ copyValue: I,
68
+ children: N
69
69
  }, c);
70
70
  })
71
71
  });
@@ -1,4 +1,4 @@
1
- import { $ as Action, $t as FileFieldValue, A as EnrichedRow, At as resolveDetailRoute, B as Refs, Bt as FilterURLState, C as ApiErrorBody, Ct as extractPkValues, D as CURSOR_SEMANTICS_MISMATCH, Dt as pkValuesFromId, E as CURSOR_LANGUAGE_CHANGED, Et as pkValuePartsToId, F as LoginResponse, Ft as pickLocalized, G as V2ListParams, Gt as hasOrGroups, H as StatusInfo, Ht as NO_VALUE_OPS, I as ParamLookup, It as pluralText, J as V2ParamInstance, Jt as setFiltersInURL, K as V2ListResponse, Kt as parseFilterURLState, L as PropertyValue, Lt as textWithNodes, M as ListMeta, Mt as TextFn, N as ListParams, Nt as TextVars, O as CheckSetupResponse, Ot as pkValuesToDetailId, P as ListResponse, Pt as makeTextFn, Q as isCursorStaleError, Qt as FileFieldMode, R as PublicParam, Rt as FilterNode, S as ApiError, St as buildRowDetailHref, T as BrandingIdentity, Tt as getPrimaryKeyFields, U as Tenant, Ut as OP_LABELS, V as SignupResponse, Vt as FilterValueResolver, W as TenantEnv, Wt as countActiveFilters, X as V2StatusInstance, Xt as FileFieldDef, Y as V2PropertyInstance, Yt as FileAddress, Z as errorCodeOf, Zt as FileFieldDisplay, _ as executeAction, _t as StatusDef, a as ResponsiveMode, at as EnumDef, b as AggregateParams, bt as buildDetailHrefFromId, c as resolveViewportCategory, ct as LocalizedString, d as ActionExecuteResponse, dt as PkValues, en as HydratedFile, et as AreaDef, f as ActionItemError, ft as PropertyDef, g as deleteObject, gt as SpecialValue, h as buildActionBody, ht as Screen, i as ResponsiveBreakpoints, it as EntityField, j as ImpersonationInfo, jt as MANDATORY_LANGUAGE, k as DataResponse, kt as pkValuesToId, l as ActionBatchError, lt as NavNode, m as GetEntityOptions, mt as Schema, n as useResponsiveMode, nn as UploadedFile, nt as ClassificationTierDef, o as ResponsiveViewport, ot as FieldAccessInfo, p as ActionItemSkip, pt as RefConfig, q as V2Meta, qt as parseFiltersFromURL, r as DEFAULT_RESPONSIVE_BREAKPOINTS, rn as OrderedMap, rt as Entity, s as ViewportCategory, st as LanguageDef, t as ResponsiveModeProvider, tn as UploadProgress, tt as ChildRelation, u as ActionExecuteRequest, ut as ParameterDef, v as restoreObject, vt as StatusGroupDef, w as AuthUser, wt as fieldDisplayName, x as AggregateResponse, xt as buildEntityDetailHref, y as AggregateGroup, yt as StructureDef, z as PublicParamsResponse, zt as FilterOp } from "./useResponsiveMode-DW7OD59J.js";
1
+ import { $ as Action, $t as FileFieldValue, A as EnrichedRow, At as resolveDetailRoute, B as Refs, Bt as FilterURLState, C as ApiErrorBody, Ct as extractPkValues, D as CURSOR_SEMANTICS_MISMATCH, Dt as pkValuesFromId, E as CURSOR_LANGUAGE_CHANGED, Et as pkValuePartsToId, F as LoginResponse, Ft as pickLocalized, G as V2ListParams, Gt as hasOrGroups, H as StatusInfo, Ht as NO_VALUE_OPS, I as ParamLookup, It as pluralText, J as V2ParamInstance, Jt as setFiltersInURL, K as V2ListResponse, Kt as parseFilterURLState, L as PropertyValue, Lt as textWithNodes, M as ListMeta, Mt as TextFn, N as ListParams, Nt as TextVars, O as CheckSetupResponse, Ot as pkValuesToDetailId, P as ListResponse, Pt as makeTextFn, Q as isCursorStaleError, Qt as FileFieldMode, R as PublicParam, Rt as FilterNode, S as ApiError, St as buildRowDetailHref, T as BrandingIdentity, Tt as getPrimaryKeyFields, U as Tenant, Ut as OP_LABELS, V as SignupResponse, Vt as FilterValueResolver, W as TenantEnv, Wt as countActiveFilters, X as V2StatusInstance, Xt as FileFieldDef, Y as V2PropertyInstance, Yt as FileAddress, Z as errorCodeOf, Zt as FileFieldDisplay, _ as executeAction, _t as StatusDef, a as ResponsiveMode, at as EnumDef, b as AggregateParams, bt as buildDetailHrefFromId, c as resolveViewportCategory, ct as LocalizedString, d as ActionExecuteResponse, dt as PkValues, en as HydratedFile, et as AreaDef, f as ActionItemError, ft as PropertyDef, g as deleteObject, gt as SpecialValue, h as buildActionBody, ht as Screen, i as ResponsiveBreakpoints, it as EntityField, j as ImpersonationInfo, jt as MANDATORY_LANGUAGE, k as DataResponse, kt as pkValuesToId, l as ActionBatchError, lt as NavNode, m as GetEntityOptions, mt as Schema, n as useResponsiveMode, nn as UploadedFile, nt as ClassificationTierDef, o as ResponsiveViewport, ot as FieldAccessInfo, p as ActionItemSkip, pt as RefConfig, q as V2Meta, qt as parseFiltersFromURL, r as DEFAULT_RESPONSIVE_BREAKPOINTS, rn as OrderedMap, rt as Entity, s as ViewportCategory, st as LanguageDef, t as ResponsiveModeProvider, tn as UploadProgress, tt as ChildRelation, u as ActionExecuteRequest, ut as ParameterDef, v as restoreObject, vt as StatusGroupDef, w as AuthUser, wt as fieldDisplayName, x as AggregateResponse, xt as buildEntityDetailHref, y as AggregateGroup, yt as StructureDef, z as PublicParamsResponse, zt as FilterOp } from "./useResponsiveMode-Yo2rIWFA.js";
2
2
  import { i as setIconRegistry, n as getIcon, t as IconDef } from "./icon-registry-BY2tt-GF.js";
3
3
  import { i as DynamicIcon, n as IconName, r as IconProps, t as Icon } from "./Icons-BdXCxyw3.js";
4
4
  import { ButtonHTMLAttributes, CSSProperties, ComponentType, InputHTMLAttributes, MouseEvent, ReactNode, RefObject } from "react";
@@ -1,4 +1,4 @@
1
- import { B as Refs, M as ListMeta, Mt as TextFn, P as ListResponse, ct as LocalizedString, d as ActionExecuteResponse, k as DataResponse, mt as Schema, o as ResponsiveViewport, u as ActionExecuteRequest } from "./useResponsiveMode-DW7OD59J.js";
1
+ import { B as Refs, M as ListMeta, Mt as TextFn, P as ListResponse, ct as LocalizedString, d as ActionExecuteResponse, k as DataResponse, mt as Schema, o as ResponsiveViewport, u as ActionExecuteRequest } from "./useResponsiveMode-Yo2rIWFA.js";
2
2
  import { ReactElement, ReactNode } from "react";
3
3
  import { QueryClient } from "@tanstack/react-query";
4
4
  import { RenderResult } from "@testing-library/react";
@@ -115,7 +115,7 @@ function h(e) {
115
115
  };
116
116
  }
117
117
  function g(e) {
118
- return !e.primary && !e.auto && !e.readonly && !e.source;
118
+ return !e.primary && !e.auto && !e.readonly && !e.source && !e.immutable;
119
119
  }
120
120
  function _(e, t) {
121
121
  return !e || e.readonly ? !1 : e.mutations?.[t] ?? !0;
@@ -229,11 +229,6 @@ interface RefConfig {
229
229
  field?: string;
230
230
  display?: RefDisplay;
231
231
  fields?: string[];
232
- /** Narrows the option set offered by this ref's entity-select dropdown (edit
233
- * combobox or action-param picker) to rows matching these conditions - e.g.
234
- * only `is_active = true`. Read-side only (not a write/security boundary).
235
- * The shared filter tree, so a declared narrowing takes the same shapes a
236
- * list query's `filters` takes. */
237
232
  options_filter?: FilterNode[];
238
233
  }
239
234
  /** One declared special value ({code, label}), offered in the list filter and in
@@ -267,14 +262,6 @@ interface EntityField {
267
262
  */
268
263
  name?: string;
269
264
  type: string;
270
- /**
271
- * Computed and stamped by the server: whether a CROSS-store read can order by
272
- * this field. Meaningful only where the entity's list_pagination is "cursor".
273
- * Asked rather than re-derived here - a second copy of the backend's type
274
- * allowlist drifts the day either side moves, and the symptom is an operator
275
- * clicking a column header and getting a raw backend error in place of the
276
- * table.
277
- */
278
265
  cross_store_sortable?: boolean;
279
266
  required?: boolean;
280
267
  primary?: boolean;
@@ -286,6 +273,7 @@ interface EntityField {
286
273
  width?: number;
287
274
  };
288
275
  readonly?: boolean;
276
+ immutable?: boolean;
289
277
  source?: string;
290
278
  timezone?: string;
291
279
  precision?: number;
@@ -334,15 +322,6 @@ interface EntityField {
334
322
  structure?: string;
335
323
  array?: boolean;
336
324
  copyable?: boolean;
337
- /**
338
- * Names the data_classifications tier gating reads + writes on this field. Read-side: stripped from the
339
- * row when the caller lacks `classification:<tier>:read`. Write-side:
340
- * 422 FIELDS_FORBIDDEN when the caller writes the key without
341
- * `classification:<tier>:write`. Frontend reads the tier's localized
342
- * display name from the top-level `classifications:` map and
343
- * cross-references `schema.entities.<code>.field_access.<field>` for
344
- * the per-caller decision.
345
- */
346
325
  classification?: string;
347
326
  }
348
327
  /**
@@ -403,19 +382,6 @@ interface ChildDisplay {
403
382
  searchable?: boolean;
404
383
  filters?: string[];
405
384
  position_field?: string;
406
- /**
407
- * Row interaction for `mode: table`.
408
- * - `navigate`: identity cell (first column) is a link to the child's
409
- * detail; other cells read-only. Default for associated entities
410
- * (child has its own detail screen).
411
- * - `inline_edit`: click a cell to edit it; typing auto-saves after a
412
- * 500ms debounce. One active cell at a time.
413
- * - `row_edit`: a per-row Edit button puts the whole row into edit mode
414
- * (all editable cells become inputs); an explicit Confirm/Cancel pair
415
- * commits or discards. Nothing persists until Confirm - same flow as
416
- * the "Add row" draft.
417
- * - `readonly`: pure display.
418
- */
419
385
  interaction?: "navigate" | "inline_edit" | "row_edit" | "readonly";
420
386
  }
421
387
  interface ChildRelation {
@@ -544,24 +510,11 @@ interface Entity {
544
510
  tenant_key?: string;
545
511
  children?: ChildRelation[];
546
512
  status_groups?: Record<string, StatusGroupDef>;
547
- /** Computed by the server: this entity's rows are evidence-covered (an
548
- * `evidence:` block, or an audit table the core audit source covers). Drives
549
- * the evidence panel / `?expand=evidence` the same way `status_groups` drives
550
- * the statuses surface. Absent for uncovered entities. */
551
513
  evidence_covered?: boolean;
552
514
  properties?: Record<string, PropertyDef>;
553
515
  search_fields?: string[];
554
516
  actions?: Record<string, Action>;
555
517
  variants?: OrderedMap<EntityVariant>;
556
- /**
557
- * Platform-default action codes the engine must NOT inject for this entity
558
- * (`__new`, `__edit`, `__create`, ...). Declared in the entity's YAML.
559
- *
560
- * A disabled `__new` closes the CREATE ROUTE too, not only the toolbar
561
- * button: `<list>/new` is the detail route with the literal id `new`, so
562
- * without this the form the removed button pointed at still rendered for
563
- * anyone who typed the address or kept a bookmark.
564
- */
565
518
  disable_defaults?: string[];
566
519
  handlers?: Record<string, HandlerDef>;
567
520
  associations?: Record<string, AssociationDef>;
@@ -571,94 +524,20 @@ interface Entity {
571
524
  * explicit `enabled: false` opts out, mirroring the Go ExportEnabled()
572
525
  * helper. Same shape ships on Screen for per-screen overrides. */
573
526
  export?: ExportConfig;
574
- /** At most one row visible per caller. Loader requires either a
575
- * caller-bound `prefilter` or `access: self` to back this. Frontend
576
- * routes a singleton entity's detail screen at the screen's declared
577
- * `route:` without a `:id` segment, and skips list-route registration. */
578
527
  singleton?: boolean;
579
528
  notes?: boolean;
580
529
  /** Carrier scope its `$params` writes land under (e.g. my_tenant -> "tenant",
581
530
  * profile -> "user"). Absent = writes land under the entity's own code. Used
582
531
  * by ParamsBlock to compute the attachable parameter set. */
583
532
  params_scope?: string;
584
- /** Server-enforced WHERE applied unconditionally on every read/write.
585
- * Values may be literal scalars
586
- * OR `$caller.*` expressions (`$caller.user_id`, `$caller.tenant_id`)
587
- * resolved at request time. Security boundary, not a UX hint. */
588
533
  prefilter?: Record<string, unknown>;
589
- /** Hard entity-wide access tier gate (checked BEFORE the deny-by-default
590
- * read/write decision). `"self"` restricts every read/write to rows where
591
- * the field marked `owner: true` matches the caller's user id (chokepoint +
592
- * with_check). `"tenant_admin"` admits any administrative standing in the
593
- * active tenant (superadmin / tenant_owner / any role grant). `"superadmin"`
594
- * admits only the platform-wide god flag. Empty = no tier floor (standard
595
- * RBAC). The legacy `"platform_admin"` alias was removed. */
596
534
  access?: "self" | "tenant_admin" | "superadmin";
597
- /** Deny-by-default authorization. Absent = every op
598
- * requires its `entity:<code>:<op>` grant. `public.<op>: true` opts that op
599
- * out of the grant requirement, opening it to all authenticated callers
600
- * (NOT anonymous). The Entity.Access floor is checked first and is never
601
- * waived by `public`. Mirrors engine.Entity.Public (*OpSet). The wire form
602
- * is always the object shape (never a bare bool). Replaces the removed
603
- * boolean `permissions`. */
604
535
  public?: OpSet;
605
- /**
606
- * Optional structural tree for placing and grouping actions across all
607
- * placement slots. Absent = runtime composes a flat list from all actions
608
- * matching each slot's visibility[], sorted by position ascending.
609
- * Server delivers RBAC-pruned nodes in tagged-union wire format.
610
- */
611
536
  action_layout?: ActionLayoutNode[];
612
- /**
613
- * Per-caller classification access
614
- * decision keyed by field name. Only present for entities that
615
- * declare at least one classified field; absent on non-classification
616
- * entities so the wire stays byte-equivalent for non-classification
617
- * deployments. Frontend reads this map to render the locked-widget
618
- * badge, disable write inputs, and surface the required_permission
619
- * hint to the user.
620
- */
621
537
  field_access?: Record<string, FieldAccessInfo>;
622
- /**
623
- * Per-entity realtime opt-in. When true the entity is in the CDC
624
- * publication, its list views auto-update from the SSE stream, and the
625
- * toolbar shows a green "Live" indicator. Absent or false (default OFF)
626
- * means the entity is not live: no indicator, and the always-present
627
- * manual refresh control is the only freshness mechanism. Server emits
628
- * this with `omitempty`, so `false` arrives as absent.
629
- */
630
538
  realtime?: boolean;
631
- /**
632
- * Per-entity row-count strategy for list views. "exact" (default, also
633
- * the meaning of absent) shows an exact total; "estimated" shows an
634
- * O(1) query-planner estimate, rendered coarse (~3.6M) for high-volume
635
- * tables. Independent of `realtime`. The SDK keys list-view count
636
- * precision on the response `meta.count_mode`, not this field, so a
637
- * forced exact count still renders precisely.
638
- */
639
539
  count?: "exact" | "estimated";
640
- /**
641
- * Computed (server-side, never author-set) pagination mode the generated
642
- * admin list MUST use: "offset" (numbered pages) or "cursor" (keyset /
643
- * infinite scroll). "cursor" iff the entity declares `persistence.archive`
644
- * AND the deployment has ClickHouse wired at boot - a cross-store hot+cold
645
- * read cannot offset-paginate. Absent means "offset" (every plain Postgres /
646
- * ClickHouse-only / ClickHouse-disabled-archive entity). The SDK branches the
647
- * list UI on this.
648
- */
649
540
  list_pagination?: "offset" | "cursor";
650
- /**
651
- * Static, per-caller document-generation capability computed from the
652
- * SYSTEM document template registry at schema projection (registry-only,
653
- * no DB read, no ETag impact - system templates are boot-static and are
654
- * covered by the schema fingerprint). Absent (or both flags falsy) means
655
- * no system template applies for this caller/tenant/entity - the
656
- * frontend's Generate affordance renders nothing UNLESS a tenant-uploaded
657
- * template is found via the lazy `document.templates.available` runtime
658
- * probe (tenant templates are runtime data and are never baked into the
659
- * schema). `generate_one` gates the detail-scope toolbar; `generate_many`
660
- * gates the list-scope toolbar.
661
- */
662
541
  documents?: {
663
542
  generate_one?: boolean;
664
543
  generate_many?: boolean;
@@ -828,10 +707,6 @@ interface Screen {
828
707
  entity?: string;
829
708
  route: string;
830
709
  component?: string;
831
- /** Deny-by-default authorization. CUSTOM (entity-less) screens only: true
832
- * makes the screen visible to all authenticated callers (data inside still
833
- * gates per entity). A load error on an entity-bound screen. Mirrors
834
- * engine.Screen.Public (*bool). */
835
710
  public?: boolean;
836
711
  /** Overrides the derived visibility rule for this screen (any grant string,
837
712
  * typically `screen:<code>` to retarget or to tighten an entity-bound
@@ -871,13 +746,6 @@ interface Screen {
871
746
  * field code. Append/replace/clear the entity field's declared values for
872
747
  * just this screen. Mirrors engine.Screen.SpecialValues. */
873
748
  special_values?: Record<string, ScreenSpecialValues>;
874
- /** Per-field operator lists, keyed by filter field code, published by the
875
- * server from the ONE vocabulary the query builder enforces
876
- * (engine.OperatorsByFieldType, plus the $status / $property sets). The
877
- * filter drawer renders exactly these; it keeps no table of its own,
878
- * because a client-side guess had already diverged - array, multilang,
879
- * json and bytes fields were offered two operators the builder rejects
880
- * and denied `contains`, the one that works. */
881
749
  filter_operators?: Record<string, string[]>;
882
750
  views?: ViewDefinition[];
883
751
  /** Code of the view this list OPENS on. A starting point, never a bound: the
@@ -898,12 +766,6 @@ interface Screen {
898
766
  * Either gate being false hides the toolbar Export menu and makes the
899
767
  * POST endpoint return 403 EXPORT_DISABLED. */
900
768
  export?: ExportConfig;
901
- /**
902
- * Optional per-screen structural tree for placing and grouping actions.
903
- * When set, fully replaces entity.action_layout for this screen.
904
- * Absent = inherit entity.action_layout (then default-flat if also absent).
905
- * Server delivers RBAC-pruned nodes in tagged-union wire format.
906
- */
907
769
  action_layout?: ActionLayoutNode[];
908
770
  }
909
771
  interface QuickPeekConfig {
@@ -997,12 +859,6 @@ interface HandlerParam {
997
859
  * normalizeRefConfig before use. */
998
860
  ref?: string | RefConfig;
999
861
  display?: HandlerParamDisplay;
1000
- /**
1001
- * Narrows the param's option set. Values may be literals or templates
1002
- * using the ui_steps interpolation vocabulary (e.g. "${params.other}").
1003
- * Semantics are type-specific: for type="status", a "status_group" key
1004
- * selects the group whose statuses are offered.
1005
- */
1006
862
  filter?: Record<string, string>;
1007
863
  }
1008
864
  interface ActionCondition {
@@ -1066,49 +922,19 @@ interface ActionConditionEntry {
1066
922
  */
1067
923
  type ActionConditionList = ActionConditionEntry[];
1068
924
  interface Action {
1069
- /**
1070
- * Server-side handler code. One of four dispatch fields.
1071
- * Reason: the new wire format encodes dispatch mode by which field is set
1072
- * (handler | association | widget | href), so an explicit `type` enum is
1073
- * redundant and was removed. Exactly one of the four should be set per action.
1074
- */
1075
925
  handler?: string;
1076
926
  /**
1077
927
  * Association code for nav-only actions that navigate to a related list.
1078
928
  * Reason: same dispatch-by-field-presence rule.
1079
929
  */
1080
930
  association?: string;
1081
- /**
1082
- * SDK widget registry name. The SDK has no widget registry yet: an action
1083
- * carrying `widget` logs a warning and falls back to `onRun`.
1084
- * Reason: lets actions render bespoke UI (e.g. inline picker) instead of
1085
- * server-handled forms, without inventing a new entity per widget.
1086
- */
1087
931
  widget?: string;
1088
- /**
1089
- * Client-side navigation URL template (supports `${id}` and other row tokens).
1090
- * Reason: replaces the implicit "edit"/"create" type enum - any href-driven
1091
- * action (open a custom screen, deep-link a report) uses this field; the
1092
- * server never dispatches it.
1093
- */
1094
932
  href?: string;
1095
- /**
1096
- * Widget-specific opaque metadata. Schema/Action loader passes through
1097
- * untouched; the widget consumes its own keys.
1098
- * Reason: keeps the Action shape stable as new widgets ship without
1099
- * growing the typed surface for each one.
1100
- */
1101
933
  config?: Record<string, unknown>;
1102
934
  entity?: string;
1103
935
  display: {
1104
936
  name: LocalizedString;
1105
937
  icon: string;
1106
- /**
1107
- * Promotes the action to a header button (vs. dropdown item).
1108
- * Reason: explicit per-action UX control replaces the old position<=10
1109
- * heuristic, lets schema authors mark their headline action even when
1110
- * other actions sort earlier.
1111
- */
1112
938
  primary?: boolean;
1113
939
  /**
1114
940
  * Render as icon-only button (no label text).
@@ -1127,12 +953,6 @@ interface Action {
1127
953
  * neither renders it nor binds the key yet.
1128
954
  */
1129
955
  shortcut?: string;
1130
- /**
1131
- * Localized explanation of what the action does. Surfaces as the control
1132
- * tooltip (precedence: disabled-reason > description > name) and the
1133
- * ActionDialog subtitle. Optional; absent renders exactly as before.
1134
- * Supersedes the removed `help` field.
1135
- */
1136
956
  description?: LocalizedString;
1137
957
  };
1138
958
  visibility?: string[];
@@ -1167,23 +987,8 @@ interface Action {
1167
987
  /** Screen code to navigate to after a long_running action starts (resolved via schema.screens). */
1168
988
  progress_screen?: string;
1169
989
  resolved_params?: OrderedMap<HandlerParam>;
1170
- /**
1171
- * Default values of params marked hidden+default by the action. The UI
1172
- * seeds formData with these so filter templates resolve references to
1173
- * prefilled siblings (e.g. "${params.status_group}") and so the
1174
- * submission payload includes them. Not rendered in the modal.
1175
- */
1176
990
  resolved_hidden_defaults?: Record<string, unknown>;
1177
991
  ui_steps?: UIStep[];
1178
- /**
1179
- * Server-derived: the action needs at least one selected row to be
1180
- * meaningful (the list toolbar greys it while nothing is selected). Derived
1181
- * from the handler's id-arity contract (cannot run without object IDs),
1182
- * association mode, or an href `${id}` row-link. ABSENT means the server did
1183
- * not derive it (older server, or widget/ui_steps modes) - consumers MUST
1184
- * fall back to the list_floatbar slot proxy, NOT treat absent as false. See
1185
- * actionRequiresSelection in lib/actions.ts.
1186
- */
1187
992
  requires_selection?: boolean;
1188
993
  timeout_ms?: number;
1189
994
  invoke?: string;
@@ -1216,34 +1021,10 @@ interface Schema {
1216
1021
  enums: Record<string, EnumDef>;
1217
1022
  parameters: Record<string, ParameterDef>;
1218
1023
  messages?: Record<string, LocalizedString>;
1219
- /**
1220
- * Declared error types, code -> title per language. For rendering a STORED
1221
- * code - on an agent turn, a job row, an audit row - in the reader's
1222
- * language. An error answering a request carries its own title in the
1223
- * response and needs none of this.
1224
- *
1225
- * Errors are NEVER declared under `messages`: a failure has a type, and a
1226
- * type has a title.
1227
- */
1228
1024
  errors?: Record<string, LocalizedString>;
1229
1025
  areas?: AreaDef[];
1230
1026
  accents?: Record<string, AccentDef>;
1231
- /**
1232
- * data_classifications catalog keyed by
1233
- * tier code — display name + description + audit_on_read flag + icon
1234
- * + sod_protected flag. Absent when the consumer declares no tiers
1235
- * (preserves byte-equivalent wire shape for non-classification
1236
- * deployments). Frontend resolves the localized tier name from this
1237
- * map when rendering locked-widget badges.
1238
- */
1239
1027
  classifications?: Record<string, ClassificationTierDef>;
1240
- /**
1241
- * Consumer-declared icon glyphs, keyed by the name referenced at `icon:`
1242
- * call sites. Carries ONLY declared/overridden entries (the built-in ~119
1243
- * travel as bare names, never here); absent when no module declares an
1244
- * `icons:` block. The Admin loads this into the runtime icon registry
1245
- * (setIconRegistry) so custom glyphs render across the chrome.
1246
- */
1247
1028
  icons?: Record<string, IconDef>;
1248
1029
  }
1249
1030
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@declarion/react",
3
- "version": "0.393.0",
3
+ "version": "0.395.0",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "description": "React SDK for Declarion, the schema-driven business apps platform.",