@declarion/react 0.1.61 → 0.1.63

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.
@@ -0,0 +1,32 @@
1
+ import type { Entity, EntityField, PropertyDef, StatusGroupDef } from "../types/schema";
2
+ /** Target kinds mirror engine.MassEditTargetKind in Go. */
3
+ export type MassEditTargetKind = "field" | "status" | "property";
4
+ /** Metadata a property-grid row needs to render a target + editable value cell. */
5
+ export interface MassEditTarget {
6
+ /** Picker key — bare field code, or `$status.<group>` / `$property.<code>`. */
7
+ code: string;
8
+ /** Bare identifier (without prefix) — "priority", "approval", "color". */
9
+ bare: string;
10
+ kind: MassEditTargetKind;
11
+ label: string;
12
+ /** For field targets, the underlying EntityField drives the value renderer. */
13
+ field?: EntityField;
14
+ /** For status targets, the group definition drives the status-picker options. */
15
+ statusGroup?: StatusGroupDef;
16
+ /** For property targets, the property definition drives type/widget/ref. */
17
+ property?: PropertyDef;
18
+ }
19
+ /** Parse `HandlerParam.Filter["targets"]` into a list of allowed keys. */
20
+ export declare function parseTargetFilter(raw: string | undefined): string[];
21
+ /**
22
+ * Build the list of writable mass-edit targets for an entity.
23
+ * - When `whitelist` is set, narrows to those keys only (preserves the
24
+ * order in the whitelist so action authors can curate a picker order).
25
+ * - Without a whitelist, emits every non-PK, non-auto field plus all
26
+ * status groups and properties (when not composite PK). Matches the
27
+ * engine-side BuildMassEditTargets contract.
28
+ * - `entity.readonly` globally hides every target (UI mirrors server
29
+ * gate; the dispatcher will also refuse on its own entity-level
30
+ * permission gate).
31
+ */
32
+ export declare function buildMassEditTargets(entity: Entity | undefined, whitelistRaw?: string | string[]): MassEditTarget[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@declarion/react",
3
- "version": "0.1.61",
3
+ "version": "0.1.63",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "description": "React SDK for Declarion, the schema-driven business apps platform.",
@@ -1,6 +0,0 @@
1
- export interface AIPanelProps {
2
- open: boolean;
3
- onClose: () => void;
4
- context?: string;
5
- }
6
- export declare function AIPanel({ open, onClose, context }: AIPanelProps): import("react/jsx-runtime").JSX.Element | null;