@declarion/react 0.1.4 → 0.1.21

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.
@@ -1,3 +1,9 @@
1
1
  export declare function ensureRefresh(): Promise<void>;
2
+ type PersistentAuthFailureHandler = () => void;
3
+ /** Replace the handler invoked on persistent 401. Intended for tests
4
+ * and non-browser consumers. Returns the previous handler so callers
5
+ * can restore it if needed. */
6
+ export declare function setPersistentAuthFailureHandler(h: PersistentAuthFailureHandler): PersistentAuthFailureHandler;
2
7
  export declare function apiFetch<T>(path: string, options?: RequestInit): Promise<T>;
3
8
  export declare function callHandler<R = unknown>(code: string, args?: unknown): Promise<R>;
9
+ export {};
@@ -1,5 +1,29 @@
1
1
  interface SmartListPageProps {
2
2
  screenCode: string;
3
3
  }
4
+ /**
5
+ * Resolve the target href for a row click on a list screen per the
6
+ * entity-canonical DSL. `list.detail_screen` is tri-valued:
7
+ *
8
+ * absent -> inherit entity.detail_screen
9
+ * DETAIL_SCREEN_NONE ("none") -> explicit opt-out (disabled)
10
+ * any other code -> override with that detail screen
11
+ *
12
+ * Resolution:
13
+ * if list.detail_screen === "none" -> null (disabled)
14
+ * elif list.detail_screen is set -> use screens[list.detail_screen]
15
+ * elif entity.detail_screen is set -> use screens[entity.detail_screen]
16
+ * else -> null (disabled)
17
+ *
18
+ * Returns null when no navigation target exists; callers MUST render
19
+ * non-interactive rows in that case (no cursor, no click handler).
20
+ */
21
+ export declare function resolveDetailHref(list: {
22
+ detail_screen?: string;
23
+ }, id: string, entity: {
24
+ detail_screen?: string;
25
+ } | undefined, allScreens: Record<string, {
26
+ route?: string;
27
+ }> | undefined): string | null;
4
28
  export declare function SmartListPage({ screenCode }: SmartListPageProps): import("react/jsx-runtime").JSX.Element | null;
5
29
  export {};