@declarion/react 0.36.1 → 0.36.3
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.
- package/dist-lib/{LayoutRenderer-BUIoUmFl.js → LayoutRenderer-0UKE3pp6.js} +1 -1
- package/dist-lib/{SmartDetailPage.impl-yjxK8z0s.js → SmartDetailPage.impl-Ccz4TqfJ.js} +5 -11
- package/dist-lib/{SmartRecordListPage.impl-CwAiIcia.js → SmartRecordListPage.impl-Y0w4oIe3.js} +3 -3
- package/dist-lib/components/shared/PageHeader.d.ts +10 -2
- package/dist-lib/components/shared/ResponsiveActionBar.d.ts +18 -8
- package/dist-lib/hooks/useCurrentScreen.d.ts +34 -0
- package/dist-lib/index.d.ts +3 -0
- package/dist-lib/index.js +863 -835
- package/dist-lib/{registry-Bnc6QkvA.js → registry-D_zbJrLC.js} +1174 -1166
- package/dist-lib/stores/screen-registry.d.ts +16 -2
- package/dist-lib/{useProperties-Bqr2yTii.js → useProperties-C_1KM72K.js} +1 -1
- package/package.json +1 -1
|
@@ -1,3 +1,17 @@
|
|
|
1
1
|
import type { ComponentType } from "react";
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
/**
|
|
3
|
+
* What the platform hands a custom screen when it mounts it.
|
|
4
|
+
*
|
|
5
|
+
* `screenCode` is the same handle every standard page already receives, so a custom
|
|
6
|
+
* screen can read its own declaration (name, description, entity, route) instead of
|
|
7
|
+
* restating it in code. Prefer the `useCurrentScreen()` hook - it reaches any component
|
|
8
|
+
* in the tree, not just the top one - and take this prop only when the top-level
|
|
9
|
+
* component itself needs the code.
|
|
10
|
+
*
|
|
11
|
+
* It is optional: a screen registered before this existed keeps compiling and running.
|
|
12
|
+
*/
|
|
13
|
+
export interface CustomScreenProps {
|
|
14
|
+
screenCode?: string;
|
|
15
|
+
}
|
|
16
|
+
export declare function registerScreen(code: string, component: ComponentType<CustomScreenProps>): void;
|
|
17
|
+
export declare function getRegisteredScreen(code: string): ComponentType<CustomScreenProps> | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { At as e, V as t, Z as n, Zt as r, cn as i, it as a, kt as o, vn as s } from "./ActionRunner-BrXXs8ga.js";
|
|
2
|
-
import { vt as c } from "./registry-
|
|
2
|
+
import { vt as c } from "./registry-D_zbJrLC.js";
|
|
3
3
|
import { useEffect as l, useMemo as u } from "react";
|
|
4
4
|
import { useSearchParams as d } from "react-router-dom";
|
|
5
5
|
import { useInfiniteQuery as f, useMutation as p, useQueryClient as m } from "@tanstack/react-query";
|