@declarion/react 0.1.32 → 0.1.33
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/index.js +1836 -1726
- package/dist-lib/index.js.map +1 -1
- package/dist-lib/lib/ui-actions.d.ts +1 -0
- package/dist-lib/types/schema.d.ts +14 -0
- package/package.json +10 -10
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { UIStep } from "../types/schema";
|
|
2
2
|
export interface UIActionContext {
|
|
3
3
|
row?: Record<string, unknown>;
|
|
4
|
+
params?: Record<string, unknown>;
|
|
4
5
|
}
|
|
5
6
|
export declare function interpolate(template: string, ctx: UIActionContext): string;
|
|
6
7
|
export declare function executeUISteps(steps: UIStep[], ctx: UIActionContext): Promise<void>;
|
|
@@ -306,6 +306,13 @@ export interface HandlerParam {
|
|
|
306
306
|
}>;
|
|
307
307
|
ref?: string;
|
|
308
308
|
display?: HandlerParamDisplay;
|
|
309
|
+
/**
|
|
310
|
+
* Narrows the param's option set. Values may be literals or templates
|
|
311
|
+
* using the ui_steps interpolation vocabulary (e.g. "{{params.other}}").
|
|
312
|
+
* Semantics are type-specific: for type="status", a "status_group" key
|
|
313
|
+
* selects the group whose statuses are offered.
|
|
314
|
+
*/
|
|
315
|
+
filter?: Record<string, string>;
|
|
309
316
|
}
|
|
310
317
|
export interface ActionCondition {
|
|
311
318
|
status?: string[];
|
|
@@ -341,6 +348,13 @@ export interface Action {
|
|
|
341
348
|
conditions?: ActionCondition[];
|
|
342
349
|
resolved_params?: Record<string, HandlerParam>;
|
|
343
350
|
resolved_param_order?: string[];
|
|
351
|
+
/**
|
|
352
|
+
* Default values of params marked hidden+default by the action. The UI
|
|
353
|
+
* seeds formData with these so filter templates resolve references to
|
|
354
|
+
* prefilled siblings (e.g. "{{params.status_group}}") and so the
|
|
355
|
+
* submission payload includes them. Not rendered in the modal.
|
|
356
|
+
*/
|
|
357
|
+
resolved_hidden_defaults?: Record<string, unknown>;
|
|
344
358
|
ui_steps?: UIStep[];
|
|
345
359
|
}
|
|
346
360
|
export interface LanguageDef {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@declarion/react",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.33",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "React SDK for Declarion, the schema-driven business apps platform.",
|
|
@@ -25,14 +25,6 @@
|
|
|
25
25
|
"publishConfig": {
|
|
26
26
|
"access": "public"
|
|
27
27
|
},
|
|
28
|
-
"scripts": {
|
|
29
|
-
"dev": "vite",
|
|
30
|
-
"build": "tsc --noEmit && vite build",
|
|
31
|
-
"build:lib": "vite build --config vite.lib.config.ts && tsc -p tsconfig.lib.json && tsc-alias -p tsconfig.lib.json",
|
|
32
|
-
"lint": "tsc --noEmit",
|
|
33
|
-
"test": "vitest run",
|
|
34
|
-
"preview": "vite preview"
|
|
35
|
-
},
|
|
36
28
|
"peerDependencies": {
|
|
37
29
|
"react": "^19.0.0",
|
|
38
30
|
"react-dom": "^19.0.0"
|
|
@@ -82,5 +74,13 @@
|
|
|
82
74
|
"typescript": "^5.7.0",
|
|
83
75
|
"vite": "^6.0.0",
|
|
84
76
|
"vitest": "^4.1.0"
|
|
77
|
+
},
|
|
78
|
+
"scripts": {
|
|
79
|
+
"dev": "vite",
|
|
80
|
+
"build": "tsc --noEmit && vite build",
|
|
81
|
+
"build:lib": "vite build --config vite.lib.config.ts && tsc -p tsconfig.lib.json && tsc-alias -p tsconfig.lib.json",
|
|
82
|
+
"lint": "tsc --noEmit",
|
|
83
|
+
"test": "vitest run",
|
|
84
|
+
"preview": "vite preview"
|
|
85
85
|
}
|
|
86
|
-
}
|
|
86
|
+
}
|