@declarion/react 0.29.0 → 0.30.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.
@@ -48,6 +48,16 @@ export declare function filterUnavailableMutationActions(actions: Array<{
48
48
  * Checks if an action has parameters that need user input.
49
49
  */
50
50
  export declare function actionHasParams(action: Action): boolean;
51
+ /**
52
+ * Tooltip text for an action control (plan 2026-07-02-action-display-description).
53
+ * Precedence: disabled-reason > description > name.
54
+ *
55
+ * A labeled control already shows the name, so its tooltip is the description
56
+ * alone; an icon-only control (`display.icon_only`) has no visible label, so it
57
+ * shows "name - description" to keep the name reachable on hover. Absent
58
+ * description falls back to the name - byte-identical to pre-description behavior.
59
+ */
60
+ export declare function actionTooltip(action: Action | undefined, name: string, isDisabled: boolean, reason: string | null | undefined): string;
51
61
  /**
52
62
  * Builds the full dot-qualified action code for API calls.
53
63
  */
@@ -1,4 +1,4 @@
1
- import { H as e, X as t, Y as n, Z as r, mt as i, t as a } from "./ActionRunner-DtUDeH4F.js";
1
+ import { H as e, X as t, Y as n, Z as r, mt as i, t as a } from "./ActionRunner-HrBGEIPi.js";
2
2
  import { useState as o } from "react";
3
3
  import { MemoryRouter as s } from "react-router-dom";
4
4
  import { QueryClient as c, QueryClientProvider as l } from "@tanstack/react-query";
@@ -186,6 +186,7 @@ export interface ChildQuickAdd {
186
186
  }
187
187
  export interface ChildDisplay {
188
188
  name: LocalizedString;
189
+ description?: LocalizedString;
189
190
  icon?: string;
190
191
  mode?: ChildDisplayMode;
191
192
  columns?: string[];
@@ -268,6 +269,7 @@ export interface ParameterDef {
268
269
  }
269
270
  export interface AssociationDisplay {
270
271
  name?: LocalizedString;
272
+ description?: LocalizedString;
271
273
  icon?: string;
272
274
  }
273
275
  export interface AssociationDef {
@@ -536,6 +538,9 @@ export interface Screen {
536
538
  visibility?: ScreenVisibility;
537
539
  display?: {
538
540
  name: LocalizedString;
541
+ /** Localized explanation of the screen, surfaced via the list-header info
542
+ * affordance (falls back to the entity description). Optional. */
543
+ description?: LocalizedString;
539
544
  icon: string;
540
545
  };
541
546
  columns?: string[];
@@ -617,6 +622,7 @@ export interface ActivityRailConfig {
617
622
  export interface ViewDefinition {
618
623
  code: string;
619
624
  name: LocalizedString;
625
+ description?: LocalizedString;
620
626
  icon?: string;
621
627
  filters?: Array<{
622
628
  field: string;
@@ -806,11 +812,12 @@ export interface Action {
806
812
  */
807
813
  shortcut?: string;
808
814
  /**
809
- * Localized help text for tooltip/popover.
810
- * Reason: separate from display.name so the title stays terse while a
811
- * longer explanation surfaces on hover.
815
+ * Localized explanation of what the action does. Surfaces as the control
816
+ * tooltip (precedence: disabled-reason > description > name) and the
817
+ * ActionDialog subtitle. Optional; absent renders exactly as before.
818
+ * (Supersedes the removed `help` field - plan 2026-07-02 Decision 16.)
812
819
  */
813
- help?: LocalizedString;
820
+ description?: LocalizedString;
814
821
  };
815
822
  visibility?: string[];
816
823
  confirmation?: LocalizedString;
@@ -874,6 +881,7 @@ export interface HandlerDef {
874
881
  entity?: string;
875
882
  display?: {
876
883
  name?: LocalizedString;
884
+ description?: LocalizedString;
877
885
  icon?: string;
878
886
  };
879
887
  params?: OrderedMap<HandlerParam>;
@@ -1,4 +1,4 @@
1
- import { Ft as e, It as t, zt as n } from "./ActionRunner-DtUDeH4F.js";
1
+ import { Ft as e, It as t, zt as n } from "./ActionRunner-HrBGEIPi.js";
2
2
  import { useCallback as r, useEffect as i, useRef as a, useState as o } from "react";
3
3
  //#region src/components/file-widgets/helpers.ts
4
4
  var s = ["thumb_200", "thumb_300"];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@declarion/react",
3
- "version": "0.29.0",
3
+ "version": "0.30.0",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "description": "React SDK for Declarion, the schema-driven business apps platform.",