@declarion/react 0.1.31 → 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.
@@ -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[];
@@ -331,8 +338,6 @@ export interface Action {
331
338
  handler?: string;
332
339
  type?: string;
333
340
  association?: string;
334
- scope?: string;
335
- batch_mode?: string;
336
341
  entity?: string;
337
342
  display: {
338
343
  name: LocalizedString;
@@ -343,6 +348,13 @@ export interface Action {
343
348
  conditions?: ActionCondition[];
344
349
  resolved_params?: Record<string, HandlerParam>;
345
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>;
346
358
  ui_steps?: UIStep[];
347
359
  }
348
360
  export interface LanguageDef {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@declarion/react",
3
- "version": "0.1.31",
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
+ }