@declarion/react 0.19.0 → 0.22.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.
- package/dist-lib/{ActionRunner-F1HBBKyQ.js → ActionRunner-C2A73D9b.js} +1321 -1317
- package/dist-lib/{DraggableChildrenTable-D7kzLdIg.js → DraggableChildrenTable-CzbVcMu7.js} +47 -47
- package/dist-lib/{Grid-Cz_2olTR.js → Grid-8k-ysclX.js} +1 -1
- package/dist-lib/{MarkdownRenderer-Cm-nbv6g.js → MarkdownRenderer--n1GTrwy.js} +1 -1
- package/dist-lib/api/entities.d.ts +9 -2
- package/dist-lib/index.js +3054 -3031
- package/dist-lib/lib/actions.d.ts +14 -1
- package/dist-lib/testing.js +1 -1
- package/dist-lib/types/schema.d.ts +1 -0
- package/package.json +6 -6
|
@@ -1,4 +1,17 @@
|
|
|
1
|
-
import type { Action, ActionCondition, LocalizedString, Schema } from "../types/schema";
|
|
1
|
+
import type { Action, ActionCondition, Entity, LocalizedString, Schema } from "../types/schema";
|
|
2
|
+
/**
|
|
3
|
+
* rowDetailId builds the detail-route id for a row - the value an href's
|
|
4
|
+
* `${id}` placeholder and a detail screen's `:id` segment receive - addressing
|
|
5
|
+
* it by the entity's REAL primary key (any single field or a composite key), so
|
|
6
|
+
* an entity whose PK is not named `id` (e.g. `schedule.code`) resolves correctly
|
|
7
|
+
* instead of emitting an empty `${id}`. Falls back to a raw `id` lookup only
|
|
8
|
+
* when no entity is in scope (defensive; an href dispatch always has one) or the
|
|
9
|
+
* row has no resolvable PK yet (an optimistic placeholder).
|
|
10
|
+
*
|
|
11
|
+
* Single source of truth for row -> detail-id, shared by ResponsiveActionBar
|
|
12
|
+
* (action_layout dispatch) and ActionButton (flat href dispatch).
|
|
13
|
+
*/
|
|
14
|
+
export declare function rowDetailId(row: Record<string, unknown> | undefined, entity: Entity | undefined): string;
|
|
2
15
|
/**
|
|
3
16
|
* Evaluates action conditions against row data.
|
|
4
17
|
* Returns true if the action is available (all conditions pass).
|
package/dist-lib/testing.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Pt as e, ct as t, lt as n, t as r, tt as i, ut as a } from "./ActionRunner-
|
|
1
|
+
import { Pt as e, ct as t, lt as n, t as r, tt as i, ut as a } from "./ActionRunner-C2A73D9b.js";
|
|
2
2
|
import { MemoryRouter as o } from "react-router-dom";
|
|
3
3
|
import { QueryClient as s, QueryClientProvider as c } from "@tanstack/react-query";
|
|
4
4
|
import { Toaster as l } from "sonner";
|
|
@@ -384,6 +384,7 @@ export declare function extractPkValues(entity: Entity, record: Record<string, u
|
|
|
384
384
|
export declare function pkValuePartsToId(values: string[]): string;
|
|
385
385
|
export declare function pkValuesToId(pkValues: PkValues): string;
|
|
386
386
|
export declare function pkValuesToDetailId(entity: Entity, pkValues: PkValues): string;
|
|
387
|
+
export declare function singlePkValues(entity: Entity, value: string): PkValues | undefined;
|
|
387
388
|
export declare function pkValuesFromId(id: string, expectedCount: number): string[] | null;
|
|
388
389
|
export declare function resolveDetailRoute(list: Pick<Screen, "detail_screen"> | undefined, entity: Pick<Entity, "detail_screen"> | undefined, allScreens: Record<string, {
|
|
389
390
|
route?: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@declarion/react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.22.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "React SDK for Declarion, the schema-driven business apps platform.",
|
|
@@ -41,9 +41,9 @@
|
|
|
41
41
|
"access": "public"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
|
+
"@testing-library/react": "^16.3.0",
|
|
44
45
|
"react": "^19.0.0",
|
|
45
|
-
"react-dom": "^19.0.0"
|
|
46
|
-
"@testing-library/react": "^16.3.0"
|
|
46
|
+
"react-dom": "^19.0.0"
|
|
47
47
|
},
|
|
48
48
|
"peerDependenciesMeta": {
|
|
49
49
|
"@testing-library/react": {
|
|
@@ -68,11 +68,11 @@
|
|
|
68
68
|
"class-variance-authority": "^0.7.1",
|
|
69
69
|
"clsx": "^2.1.1",
|
|
70
70
|
"date-fns": "^4.4.0",
|
|
71
|
-
"lucide-react": "^1.
|
|
71
|
+
"lucide-react": "^1.21.0",
|
|
72
72
|
"mdast-util-to-string": "^4.0.0",
|
|
73
73
|
"monaco-editor": "^0.55.1",
|
|
74
74
|
"react-markdown": "^10.1.0",
|
|
75
|
-
"react-router-dom": "^7.
|
|
75
|
+
"react-router-dom": "^7.18.0",
|
|
76
76
|
"react-textarea-autosize": "^8.5.9",
|
|
77
77
|
"recharts": "^3.8.1",
|
|
78
78
|
"remark-breaks": "^4.0.0",
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
"tailwindcss": "^4.3.1",
|
|
108
108
|
"tsc-alias": "^1.8.17",
|
|
109
109
|
"typescript": "^6.0.3",
|
|
110
|
-
"typescript-eslint": "^8.
|
|
110
|
+
"typescript-eslint": "^8.62.0",
|
|
111
111
|
"vite": "^8.0.16",
|
|
112
112
|
"vitest": "^4.1.9"
|
|
113
113
|
},
|