@adoptai/genui-components 0.1.45 → 0.1.55
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/builders/BlockForm.d.ts +31 -0
- package/dist/builders/BlockForm.d.ts.map +1 -0
- package/dist/builders/BuilderForm.d.ts +10 -2
- package/dist/builders/BuilderForm.d.ts.map +1 -1
- package/dist/builders/BuilderRecap.d.ts.map +1 -1
- package/dist/builders/ContextSlot.d.ts +6 -0
- package/dist/builders/ContextSlot.d.ts.map +1 -1
- package/dist/builders/FieldRenderer.d.ts +5 -2
- package/dist/builders/FieldRenderer.d.ts.map +1 -1
- package/dist/builders/StepperBuilder.d.ts +4 -2
- package/dist/builders/StepperBuilder.d.ts.map +1 -1
- package/dist/builders/fields.d.ts +22 -1
- package/dist/builders/fields.d.ts.map +1 -1
- package/dist/builders/hooks.d.ts +17 -0
- package/dist/builders/hooks.d.ts.map +1 -1
- package/dist/builders/index.d.ts +5 -5
- package/dist/builders/index.d.ts.map +1 -1
- package/dist/builders/resolver.d.ts +4 -1
- package/dist/builders/resolver.d.ts.map +1 -1
- package/dist/builders/schemas.d.ts +196 -1
- package/dist/builders/schemas.d.ts.map +1 -1
- package/dist/composites/journal-entry/resolver.cjs +2 -2
- package/dist/composites/journal-entry/resolver.cjs.map +1 -1
- package/dist/composites/journal-entry/resolver.js +2 -2
- package/dist/composites/journal-entry/resolver.js.map +1 -1
- package/dist/composites/waterfall-chart/resolver.cjs +21 -7
- package/dist/composites/waterfall-chart/resolver.cjs.map +1 -1
- package/dist/composites/waterfall-chart/resolver.d.ts.map +1 -1
- package/dist/composites/waterfall-chart/resolver.js +21 -7
- package/dist/composites/waterfall-chart/resolver.js.map +1 -1
- package/dist/composites/workflow-stepper/resolver.cjs +2 -0
- package/dist/composites/workflow-stepper/resolver.cjs.map +1 -1
- package/dist/composites/workflow-stepper/resolver.d.ts.map +1 -1
- package/dist/composites/workflow-stepper/resolver.js +2 -0
- package/dist/composites/workflow-stepper/resolver.js.map +1 -1
- package/dist/index.cjs +1415 -783
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1415 -783
- package/dist/index.js.map +1 -1
- package/dist/renderer.cjs +28 -12
- package/dist/renderer.cjs.map +1 -1
- package/dist/renderer.js +28 -12
- package/dist/renderer.js.map +1 -1
- package/dist/resolver.cjs +28 -12
- package/dist/resolver.cjs.map +1 -1
- package/dist/resolver.js +28 -12
- package/dist/resolver.js.map +1 -1
- package/dist/schemas/index.cjs +3 -3
- package/dist/schemas/index.cjs.map +1 -1
- package/dist/schemas/index.d.ts +1 -0
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +3 -3
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/workflow-stepper.d.ts +1 -0
- package/dist/schemas/workflow-stepper.d.ts.map +1 -1
- package/dist/tool-definitions.json +4 -3
- package/package.json +2 -2
- package/dist/builders/EscalationCard.d.ts +0 -17
- package/dist/builders/EscalationCard.d.ts.map +0 -1
- package/dist/builders/FormBuilder.d.ts +0 -19
- package/dist/builders/FormBuilder.d.ts.map +0 -1
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { BuilderPayload } from "./schemas";
|
|
2
|
+
import type { BuilderState } from "./hooks";
|
|
3
|
+
import type { FileUploadResult, EntitySearch, EntityCreate } from "./fields";
|
|
4
|
+
/** Single-block builder presentation. Two cosmetic variants of the SAME form:
|
|
5
|
+
* - "escalation": compact, accent left-rail, no title (the host/dock owns it),
|
|
6
|
+
* outlined "Continue" CTA, no in-card cancel. A high-urgency interruption
|
|
7
|
+
* that lifts into the dock.
|
|
8
|
+
* - "form": a standalone card with border + shadow, serif title, filled
|
|
9
|
+
* "Submit" CTA, and a Cancel button. Structured intake.
|
|
10
|
+
* Behaviour (fields, validation, context, recap) is identical; only chrome,
|
|
11
|
+
* default labels, title and cancel differ. Multi-block flows use StepperBuilder. */
|
|
12
|
+
export type BlockFormVariant = "escalation" | "form";
|
|
13
|
+
export interface BlockFormProps {
|
|
14
|
+
builder: BuilderPayload;
|
|
15
|
+
state: BuilderState;
|
|
16
|
+
onSubmit: () => void;
|
|
17
|
+
onCancel?: () => void;
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
onFileUpload?: (file: File) => Promise<FileUploadResult>;
|
|
20
|
+
onEntitySearch?: EntitySearch;
|
|
21
|
+
onEntityCreate?: EntityCreate;
|
|
22
|
+
/** When true, omit the built-in action button(s) — the host (e.g. a sticky
|
|
23
|
+
* dock footer) renders the CTA and drives submit via `submitRef`. */
|
|
24
|
+
hideActions?: boolean;
|
|
25
|
+
/** Compact presentation for tight containers (the docked action tray). */
|
|
26
|
+
dense?: boolean;
|
|
27
|
+
/** Cosmetic variant. Defaults to "form". */
|
|
28
|
+
variant?: BlockFormVariant;
|
|
29
|
+
}
|
|
30
|
+
export declare function BlockForm({ builder, state, onSubmit, onCancel, disabled, onFileUpload, onEntitySearch, onEntityCreate, hideActions, dense, variant, }: BlockFormProps): import("react/jsx-runtime").JSX.Element | null;
|
|
31
|
+
//# sourceMappingURL=BlockForm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BlockForm.d.ts","sourceRoot":"","sources":["../../src/builders/BlockForm.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7E;;;;;;;qFAOqF;AACrF,MAAM,MAAM,gBAAgB,GAAG,YAAY,GAAG,MAAM,CAAC;AAErD,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,cAAc,CAAC;IACxB,KAAK,EAAE,YAAY,CAAC;IACpB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,gBAAgB,CAAC,CAAC;IACzD,cAAc,CAAC,EAAE,YAAY,CAAC;IAC9B,cAAc,CAAC,EAAE,YAAY,CAAC;IAC9B;0EACsE;IACtE,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,0EAA0E;IAC1E,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,4CAA4C;IAC5C,OAAO,CAAC,EAAE,gBAAgB,CAAC;CAC5B;AAED,wBAAgB,SAAS,CAAC,EACxB,OAAO,EACP,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,YAAY,EACZ,cAAc,EACd,cAAc,EACd,WAAW,EACX,KAAK,EACL,OAAgB,GACjB,EAAE,cAAc,kDA6FhB"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import type { ValidationFailure } from "./hooks";
|
|
2
3
|
import type { BuilderPayload } from "./schemas";
|
|
3
|
-
import type { FileUploadResult } from "./fields";
|
|
4
|
+
import type { FileUploadResult, EntitySearch, EntityCreate } from "./fields";
|
|
4
5
|
/** Per-block answers. `blocks` is the authoritative shape (one entry per block,
|
|
5
6
|
* so reused field names across blocks never collide). `values` is a flat
|
|
6
7
|
* convenience copy of the single block's answers when there's exactly one block
|
|
@@ -21,6 +22,9 @@ export interface BuilderFormProps {
|
|
|
21
22
|
onCancel?: () => void;
|
|
22
23
|
disabled?: boolean;
|
|
23
24
|
onFileUpload?: (file: File) => Promise<FileUploadResult>;
|
|
25
|
+
/** Search/create handlers for `entity_picker` fields (host-injected). */
|
|
26
|
+
onEntitySearch?: EntitySearch;
|
|
27
|
+
onEntityCreate?: EntityCreate;
|
|
24
28
|
/** Fired on every field edit with the current (UNVALIDATED) draft, so a host
|
|
25
29
|
* chrome — e.g. a docked panel — can show live progress (filled groups,
|
|
26
30
|
* file count) without owning the form state. */
|
|
@@ -35,6 +39,10 @@ export interface BuilderFormProps {
|
|
|
35
39
|
/** Compact presentation for tight containers (the docked action tray) —
|
|
36
40
|
* forwarded to the escalation presentation. */
|
|
37
41
|
dense?: boolean;
|
|
42
|
+
/** Fired when a submit attempt is blocked by required-field validation, with
|
|
43
|
+
* the failing fields. Lets the host (dock) scroll to + focus the offending
|
|
44
|
+
* field and show a summary instead of the submit silently doing nothing. */
|
|
45
|
+
onValidationError?: (failure: ValidationFailure) => void;
|
|
38
46
|
}
|
|
39
|
-
export declare function BuilderFormResolver({ builder, onSubmit, onCancel, disabled, onFileUpload, onChange, submitRef, hideActions, dense, }: BuilderFormProps): import("react/jsx-runtime").JSX.Element;
|
|
47
|
+
export declare function BuilderFormResolver({ builder, onSubmit, onCancel, disabled, onFileUpload, onEntitySearch, onEntityCreate, onChange, submitRef, hideActions, dense, onValidationError, }: BuilderFormProps): import("react/jsx-runtime").JSX.Element;
|
|
40
48
|
//# sourceMappingURL=BuilderForm.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BuilderForm.d.ts","sourceRoot":"","sources":["../../src/builders/BuilderForm.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAiC,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"BuilderForm.d.ts","sourceRoot":"","sources":["../../src/builders/BuilderForm.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAiC,MAAM,OAAO,CAAC;AAItD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AACjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7E;;;kDAGkD;AAClD,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,GAAG,SAAS,GAAG,YAAY,CAAC;IAChD,MAAM,EAAE,K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3,"file":"BuilderRecap.d.ts","sourceRoot":"","sources":["../../src/builders/BuilderRecap.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAA8B,MAAM,WAAW,CAAC;AAC5E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,cAAc,CAAC;IACxB,KAAK,EAAE,YAAY,CAAC;CACrB;AAED;;;2BAG2B;AAC3B,wBAAgB,YAAY,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,iBAAiB,
|
|
1
|
+
{"version":3,"file":"BuilderRecap.d.ts","sourceRoot":"","sources":["../../src/builders/BuilderRecap.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAA8B,MAAM,WAAW,CAAC;AAC5E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,cAAc,CAAC;IACxB,KAAK,EAAE,YAAY,CAAC;CACrB;AAED;;;2BAG2B;AAC3B,wBAAgB,YAAY,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,iBAAiB,2CAiIjE"}
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
interface ContextSlotProps {
|
|
2
2
|
payload: Record<string, unknown>;
|
|
3
3
|
}
|
|
4
|
+
/** Read-only composite embedded above a builder's fields (e.g. the data under
|
|
5
|
+
* review at a gated step). Unlike standalone `render_ui`, this payload is NOT
|
|
6
|
+
* validated server-side — the agent hand-authors it and often under-specifies
|
|
7
|
+
* nested fields. So validate against the composite's Zod schema here: on success
|
|
8
|
+
* render the parsed (defaults-filled) payload; on failure show a neutral note
|
|
9
|
+
* instead of silently blanking, so the gap is visible rather than mysterious. */
|
|
4
10
|
export declare function ContextSlot({ payload }: ContextSlotProps): import("react/jsx-runtime").JSX.Element | null;
|
|
5
11
|
export {};
|
|
6
12
|
//# sourceMappingURL=ContextSlot.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContextSlot.d.ts","sourceRoot":"","sources":["../../src/builders/ContextSlot.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ContextSlot.d.ts","sourceRoot":"","sources":["../../src/builders/ContextSlot.tsx"],"names":[],"mappings":"AAOA,UAAU,gBAAgB;IACxB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAClC;AA6BD;;;;;iFAKiF;AACjF,wBAAgB,WAAW,CAAC,EAAE,OAAO,EAAE,EAAE,gBAAgB,kDAkCxD"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { FileUploadResult } from "./fields";
|
|
1
|
+
import type { FileUploadResult, EntitySearch, EntityCreate } from "./fields";
|
|
2
2
|
import type { BuilderField } from "./schemas";
|
|
3
3
|
export interface FieldRendererProps {
|
|
4
4
|
field: BuilderField;
|
|
@@ -7,10 +7,13 @@ export interface FieldRendererProps {
|
|
|
7
7
|
disabled?: boolean;
|
|
8
8
|
error?: string;
|
|
9
9
|
onFileUpload?: (file: File) => Promise<FileUploadResult>;
|
|
10
|
+
/** Search/create handlers for `entity_picker` fields (host-injected). */
|
|
11
|
+
onEntitySearch?: EntitySearch;
|
|
12
|
+
onEntityCreate?: EntityCreate;
|
|
10
13
|
/** Compact presentation for tight containers — forwarded to the field. In
|
|
11
14
|
* dense mode the per-field description is dropped (the field label carries
|
|
12
15
|
* it) to save vertical space. */
|
|
13
16
|
dense?: boolean;
|
|
14
17
|
}
|
|
15
|
-
export declare function FieldRenderer({ field, value, onChange, disabled, error, onFileUpload, dense }: FieldRendererProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare function FieldRenderer({ field, value, onChange, disabled, error, onFileUpload, onEntitySearch, onEntityCreate, dense }: FieldRendererProps): import("react/jsx-runtime").JSX.Element;
|
|
16
19
|
//# sourceMappingURL=FieldRenderer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldRenderer.d.ts","sourceRoot":"","sources":["../../src/builders/FieldRenderer.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"FieldRenderer.d.ts","sourceRoot":"","sources":["../../src/builders/FieldRenderer.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC7E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAE9C,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,YAAY,CAAC;IACpB,KAAK,EAAE,OAAO,CAAC;IACf,QAAQ,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,gBAAgB,CAAC,CAAC;IACzD,yEAAyE;IACzE,cAAc,CAAC,EAAE,YAAY,CAAC;IAC9B,cAAc,CAAC,EAAE,YAAY,CAAC;IAC9B;;sCAEkC;IAClC,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,wBAAgB,aAAa,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,KAAK,EAAE,EAAE,kBAAkB,2CA4BjJ"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { BuilderPayload } from "./schemas";
|
|
2
2
|
import type { BuilderState } from "./hooks";
|
|
3
|
-
import type { FileUploadResult } from "./fields";
|
|
3
|
+
import type { FileUploadResult, EntitySearch, EntityCreate } from "./fields";
|
|
4
4
|
export interface StepperBuilderProps {
|
|
5
5
|
builder: BuilderPayload;
|
|
6
6
|
state: BuilderState;
|
|
@@ -8,6 +8,8 @@ export interface StepperBuilderProps {
|
|
|
8
8
|
onCancel?: () => void;
|
|
9
9
|
disabled?: boolean;
|
|
10
10
|
onFileUpload?: (file: File) => Promise<FileUploadResult>;
|
|
11
|
+
onEntitySearch?: EntitySearch;
|
|
12
|
+
onEntityCreate?: EntityCreate;
|
|
11
13
|
/** Compact, bare presentation for a host tray (the docked composer): drop
|
|
12
14
|
* the outer card chrome + height cap and fill the host height, so the TRAY
|
|
13
15
|
* bounds it. The pinned header (progress) + footer nav are kept — a stepper
|
|
@@ -21,5 +23,5 @@ export interface StepperBuilderProps {
|
|
|
21
23
|
* scrolls (tall context tables + fields no longer overflow the card), and the
|
|
22
24
|
* header + footer nav stay pinned so navigation is always reachable.
|
|
23
25
|
*/
|
|
24
|
-
export declare function StepperBuilder({ builder, state, onSubmit, onCancel, disabled, onFileUpload, dense }: StepperBuilderProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export declare function StepperBuilder({ builder, state, onSubmit, onCancel, disabled, onFileUpload, onEntitySearch, onEntityCreate, dense }: StepperBuilderProps): import("react/jsx-runtime").JSX.Element;
|
|
25
27
|
//# sourceMappingURL=StepperBuilder.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StepperBuilder.d.ts","sourceRoot":"","sources":["../../src/builders/StepperBuilder.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"StepperBuilder.d.ts","sourceRoot":"","sources":["../../src/builders/StepperBuilder.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7E,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,cAAc,CAAC;IACxB,KAAK,EAAE,YAAY,CAAC;IACpB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,gBAAgB,CAAC,CAAC;IACzD,cAAc,CAAC,EAAE,YAAY,CAAC;IAC9B,cAAc,CAAC,EAAE,YAAY,CAAC;IAC9B;;;iDAG6C;IAC7C,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,KAAK,EAAE,EAAE,mBAAmB,2CAsHxJ"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import type { BuilderField } from "./schemas";
|
|
2
|
+
import type { BuilderField, EntityOption } from "./schemas";
|
|
3
3
|
export type FileUploadResult = {
|
|
4
4
|
object_key: string;
|
|
5
5
|
filename: string;
|
|
@@ -7,12 +7,24 @@ export type FileUploadResult = {
|
|
|
7
7
|
size: number;
|
|
8
8
|
upload_id: string;
|
|
9
9
|
};
|
|
10
|
+
/** Host-injected search for an `entity_picker` field. `source` is the field's
|
|
11
|
+
* allowlist key (e.g. "workstreams"); the host maps it to a real authed query
|
|
12
|
+
* and returns candidate rows. Throwing surfaces an inline error + retry. */
|
|
13
|
+
export type EntitySearch = (source: string, query: string) => Promise<EntityOption[]>;
|
|
14
|
+
/** Host-injected create for an `entity_picker` field. Returns the new record as
|
|
15
|
+
* an option so the picker can select it. Reject (e.g. 403 for non-admins) to
|
|
16
|
+
* surface the error inline. */
|
|
17
|
+
export type EntityCreate = (source: string, values: Record<string, unknown>) => Promise<EntityOption>;
|
|
10
18
|
export interface FieldProps {
|
|
11
19
|
field: BuilderField;
|
|
12
20
|
value: unknown;
|
|
13
21
|
onChange: (v: unknown) => void;
|
|
14
22
|
disabled?: boolean;
|
|
15
23
|
onFileUpload?: (file: File) => Promise<FileUploadResult>;
|
|
24
|
+
/** Search callback for `entity_picker` fields (host-injected). */
|
|
25
|
+
onEntitySearch?: EntitySearch;
|
|
26
|
+
/** Create callback for `entity_picker` fields (host-injected). */
|
|
27
|
+
onEntityCreate?: EntityCreate;
|
|
16
28
|
error?: string;
|
|
17
29
|
/** Compact presentation for tight containers (e.g. the docked action tray):
|
|
18
30
|
* the empty file dropzone collapses to a single slim row instead of a tall
|
|
@@ -27,5 +39,14 @@ export declare function MultiSelectField({ field, value, onChange, disabled }: F
|
|
|
27
39
|
export declare function DateField({ field, value, onChange, disabled, error }: FieldProps): import("react/jsx-runtime").JSX.Element;
|
|
28
40
|
export declare function CheckboxField({ field, value, onChange, disabled }: FieldProps): import("react/jsx-runtime").JSX.Element;
|
|
29
41
|
export declare function FileUploadField({ field, value, onChange, disabled, onFileUpload, error, dense }: FieldProps): import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
/** Server-backed search-as-you-type combobox. Queries an allowlisted `source`
|
|
43
|
+
* via host-injected `onEntitySearch`; selecting sets the field value to the
|
|
44
|
+
* chosen option's `value` (e.g. a workstream id). With `allow_create`, a pinned
|
|
45
|
+
* "Create new" row opens an inline sub-form wired to `onEntityCreate`. */
|
|
46
|
+
export declare function EntityPickerField({ field, value, onChange, disabled, error, onEntitySearch, onEntityCreate }: FieldProps): import("react/jsx-runtime").JSX.Element;
|
|
47
|
+
/** Assign files to role categories — grouped cards + inline Move. Self-contained:
|
|
48
|
+
* candidate files + AI suggestions ride `field.file_map` (no host callback).
|
|
49
|
+
* Submits `{category_id: [path], "unassigned": [path]}`. */
|
|
50
|
+
export declare function FileMapField({ field, value, onChange, disabled }: FieldProps): import("react/jsx-runtime").JSX.Element;
|
|
30
51
|
export declare const FIELD_REGISTRY: Record<string, React.ComponentType<FieldProps>>;
|
|
31
52
|
//# sourceMappingURL=fields.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fields.d.ts","sourceRoot":"","sources":["../../src/builders/fields.tsx"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"fields.d.ts","sourceRoot":"","sources":["../../src/builders/fields.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAEjF,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAoC,MAAM,WAAW,CAAC;AAsB9F,MAAM,MAAM,gBAAgB,GAAG;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;4EAE4E;AAC5E,MAAM,MAAM,YAAY,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC;AACtF;;+BAE+B;AAC/B,MAAM,MAAM,YAAY,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,OAAO,CAAC,YAAY,CAAC,CAAC;AAEtG,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,YAAY,CAAC;IACpB,KAAK,EAAE,OAAO,CAAC;IACf,QAAQ,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,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AAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,EAAE,UAAU,2CA+PxH;AAYD;;4DAE4D;AAC5D,wBAAgB,YAAY,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,UAAU,2CAmL5E;AAED,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC,CAW1E,CAAC"}
|
package/dist/builders/hooks.d.ts
CHANGED
|
@@ -4,6 +4,20 @@ import type { BuilderBlock } from "./schemas";
|
|
|
4
4
|
* 16-exception HITL stepper) does NOT collide into one shared value. Null-byte
|
|
5
5
|
* separator can't appear in ids/names. */
|
|
6
6
|
export declare function fieldKey(blockId: string, name: string): string;
|
|
7
|
+
/** A required field that failed validation, with enough info for the host to
|
|
8
|
+
* scroll to + focus it (`fieldKey`) and jump to its step (`blockIndex`). */
|
|
9
|
+
export interface ValidationFailure {
|
|
10
|
+
/** Composite `fieldKey(blockId, name)` of the first failing field. */
|
|
11
|
+
firstKey: string | null;
|
|
12
|
+
/** Block id of the first failing field. */
|
|
13
|
+
firstBlockId: string | null;
|
|
14
|
+
/** Field name of the first failing field. */
|
|
15
|
+
firstName: string | null;
|
|
16
|
+
/** Block index of the first failing field (for stepper navigation). */
|
|
17
|
+
firstBlockIndex: number;
|
|
18
|
+
/** All failing composite keys. */
|
|
19
|
+
failingKeys: string[];
|
|
20
|
+
}
|
|
7
21
|
export interface BuilderState {
|
|
8
22
|
/** Composite-keyed (`fieldKey(blockId, name)`) value map. */
|
|
9
23
|
values: Record<string, unknown>;
|
|
@@ -14,6 +28,9 @@ export interface BuilderState {
|
|
|
14
28
|
setFieldValue: (blockId: string, name: string, value: unknown) => void;
|
|
15
29
|
validateBlock: (blockIdx: number) => boolean;
|
|
16
30
|
validateAll: () => boolean;
|
|
31
|
+
/** Like `validateAll` but returns the failing fields so the host can give
|
|
32
|
+
* feedback (scroll/focus/summary) instead of a silent no-op. */
|
|
33
|
+
validateAllDetailed: () => ValidationFailure;
|
|
17
34
|
currentBlock: number;
|
|
18
35
|
setCurrentBlock: (idx: number) => void;
|
|
19
36
|
isMultiBlock: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../src/builders/hooks.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAE9C;;;0CAG0C;AAC1C,wBAAgB,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAE9D;AAED,MAAM,WAAW,YAAY;IAC3B,6DAA6D;IAC7D,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,iCAAiC;IACjC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;IACrD,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;IAChE,aAAa,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACvE,aAAa,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC;IAC7C,WAAW,EAAE,MAAM,OAAO,CAAC;IAC3B,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,YAAY,EAAE,OAAO,CAAC;CACvB;
|
|
1
|
+
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../src/builders/hooks.ts"],"names":[],"mappings":"AAGA,OA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B,eAAe,CAAC,MAAM,EAAE,YAAY,EAAE,GAAG,YAAY,CA6HpE"}
|
package/dist/builders/index.d.ts
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
export { builderSchema, builderBlockSchema, builderFieldSchema, builderFieldOptionSchema, builderFieldValidationSchema, BUILDER_FIELD_TYPES, } from "./schemas";
|
|
2
|
-
export type { BuilderPayload, BuilderBlock, BuilderField, BuilderFieldType, BuilderFieldOption, } from "./schemas";
|
|
1
|
+
export { builderSchema, builderBlockSchema, builderFieldSchema, builderFieldOptionSchema, builderFieldValidationSchema, entityOptionSchema, entityCreateFieldSchema, fileMapConfigSchema, fileMapCategorySchema, fileMapFileSchema, BUILDER_FIELD_TYPES, } from "./schemas";
|
|
2
|
+
export type { BuilderPayload, BuilderBlock, BuilderField, BuilderFieldType, BuilderFieldOption, EntityOption, EntityCreateField, FileMapConfig, FileMapCategory, FileMapFile, FileMapValue, } from "./schemas";
|
|
3
3
|
export { validateBuilderPayload } from "./validateBuilder";
|
|
4
4
|
export { BuilderFormResolver } from "./BuilderForm";
|
|
5
5
|
export type { BuilderFormProps, BuilderSubmission } from "./BuilderForm";
|
|
6
6
|
export { BuilderRecap } from "./BuilderRecap";
|
|
7
7
|
export type { BuilderRecapProps } from "./BuilderRecap";
|
|
8
|
-
export {
|
|
8
|
+
export { BlockForm } from "./BlockForm";
|
|
9
|
+
export type { BlockFormProps, BlockFormVariant } from "./BlockForm";
|
|
9
10
|
export { StepperBuilder } from "./StepperBuilder";
|
|
10
|
-
export { EscalationCard } from "./EscalationCard";
|
|
11
11
|
export { resolveBuilder } from "./resolver";
|
|
12
12
|
export type { ResolveBuilderCallbacks } from "./resolver";
|
|
13
13
|
export { FieldRenderer } from "./FieldRenderer";
|
|
14
14
|
export type { FieldRendererProps } from "./FieldRenderer";
|
|
15
15
|
export { ContextSlot } from "./ContextSlot";
|
|
16
16
|
export { FIELD_REGISTRY } from "./fields";
|
|
17
|
-
export type { FieldProps, FileUploadResult } from "./fields";
|
|
17
|
+
export type { FieldProps, FileUploadResult, EntitySearch, EntityCreate } from "./fields";
|
|
18
18
|
export { useBuilderState } from "./hooks";
|
|
19
19
|
export type { BuilderState } from "./hooks";
|
|
20
20
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/builders/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,aAAa,EACb,kBAAkB,EAClB,kBAAkB,EAClB,wBAAwB,EACxB,4BAA4B,EAC5B,mBAAmB,GACpB,MAAM,WAAW,CAAC;AAEnB,YAAY,EACV,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,gBAAgB,EAChB,kBAAkB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/builders/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,aAAa,EACb,kBAAkB,EAClB,kBAAkB,EAClB,wBAAwB,EACxB,4BAA4B,EAC5B,kBAAkB,EAClB,uBAAuB,EACvB,mBAAmB,EACnB,qBAAqB,EACrB,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,WAAW,CAAC;AAEnB,YAAY,EACV,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,gBAAgB,EAChB,kBAAkB,EAClB,YAAY,EACZ,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,WAAW,EACX,YAAY,GACb,MAAM,WAAW,CAAC;AAGnB,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAG3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACpD,YAAY,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,YAAY,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,YAAY,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,YAAY,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAG1D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,YAAY,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,YAAY,EAAE,UAAU,EAAE,gBAAgB,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACzF,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC1C,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { BuilderSubmission } from "./BuilderForm";
|
|
3
3
|
import type { BuilderPayload } from "./schemas";
|
|
4
|
-
import type { FileUploadResult } from "./fields";
|
|
4
|
+
import type { FileUploadResult, EntitySearch, EntityCreate } from "./fields";
|
|
5
5
|
export interface ResolveBuilderCallbacks {
|
|
6
6
|
onSubmit: (submission: BuilderSubmission) => void;
|
|
7
7
|
onCancel?: () => void;
|
|
8
8
|
disabled?: boolean;
|
|
9
9
|
/** Upload handler for `file_upload` fields. */
|
|
10
10
|
onFileUpload?: (file: File) => Promise<FileUploadResult>;
|
|
11
|
+
/** Search/create handlers for `entity_picker` fields. */
|
|
12
|
+
onEntitySearch?: EntitySearch;
|
|
13
|
+
onEntityCreate?: EntityCreate;
|
|
11
14
|
/** Live (unvalidated) draft on every edit — for host chrome (e.g. progress). */
|
|
12
15
|
onChange?: (draft: BuilderSubmission) => void;
|
|
13
16
|
/** Receives the submit trigger so an external footer can drive submit. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolver.d.ts","sourceRoot":"","sources":["../../src/builders/resolver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"resolver.d.ts","sourceRoot":"","sources":["../../src/builders/resolver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7E,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,CAAC,UAAU,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAClD,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,+CAA+C;IAC/C,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,gBAAgB,CAAC,CAAC;IACzD,yDAAyD;IACzD,cAAc,CAAC,EAAE,YAAY,CAAC;IAC9B,cAAc,CAAC,EAAE,YAAY,CAAC;IAC9B,gFAAgF;IAChF,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC9C,0EAA0E;IAC1E,SAAS,CAAC,EAAE,KAAK,CAAC,gBAAgB,CAAC,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC;IACxD,iEAAiE;IACjE,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,4DAA4D;IAC5D,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,wBAAgB,cAAc,CAC5B,OAAO,EAAE,cAAc,EACvB,SAAS,EAAE,uBAAuB,GACjC,KAAK,CAAC,YAAY,CAKpB"}
|
|
@@ -1,10 +1,72 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
export declare const BUILDER_FIELD_TYPES: readonly ["text", "textarea", "number", "select", "multi_select", "date", "checkbox", "file_upload"];
|
|
2
|
+
export declare const BUILDER_FIELD_TYPES: readonly ["text", "textarea", "number", "select", "multi_select", "date", "checkbox", "file_upload", "entity_picker", "file_map"];
|
|
3
3
|
export type BuilderFieldType = (typeof BUILDER_FIELD_TYPES)[number];
|
|
4
4
|
export declare const builderFieldOptionSchema: z.ZodObject<{
|
|
5
5
|
value: z.ZodString;
|
|
6
6
|
label: z.ZodString;
|
|
7
7
|
}, z.core.$strip>;
|
|
8
|
+
/** One result row from an `entity_picker` search. The host's `onEntitySearch`
|
|
9
|
+
* maps backend records to this shape; `description`/`meta` render a secondary
|
|
10
|
+
* line under `label`. */
|
|
11
|
+
export declare const entityOptionSchema: z.ZodObject<{
|
|
12
|
+
value: z.ZodString;
|
|
13
|
+
label: z.ZodString;
|
|
14
|
+
description: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
15
|
+
meta: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
16
|
+
}, z.core.$strip>;
|
|
17
|
+
/** A field on the inline "create new" sub-form of an `entity_picker`. A flat,
|
|
18
|
+
* non-recursive subset of BuilderField (no nested entity_picker / file_upload)
|
|
19
|
+
* so the create form stays simple + declaration-emit safe. */
|
|
20
|
+
export declare const entityCreateFieldSchema: z.ZodObject<{
|
|
21
|
+
name: z.ZodString;
|
|
22
|
+
label: z.ZodString;
|
|
23
|
+
field_type: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
24
|
+
number: "number";
|
|
25
|
+
date: "date";
|
|
26
|
+
text: "text";
|
|
27
|
+
checkbox: "checkbox";
|
|
28
|
+
select: "select";
|
|
29
|
+
textarea: "textarea";
|
|
30
|
+
}>>>;
|
|
31
|
+
required: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
32
|
+
placeholder: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
33
|
+
options: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
34
|
+
value: z.ZodString;
|
|
35
|
+
label: z.ZodString;
|
|
36
|
+
}, z.core.$strip>>>>;
|
|
37
|
+
}, z.core.$strip>;
|
|
38
|
+
/** `file_map` config (rides the field in the payload — self-contained). */
|
|
39
|
+
export declare const fileMapCategorySchema: z.ZodObject<{
|
|
40
|
+
id: z.ZodString;
|
|
41
|
+
label: z.ZodString;
|
|
42
|
+
hint: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
43
|
+
}, z.core.$strip>;
|
|
44
|
+
export declare const fileMapFileSchema: z.ZodObject<{
|
|
45
|
+
path: z.ZodString;
|
|
46
|
+
name: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
47
|
+
type: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
48
|
+
size: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
49
|
+
}, z.core.$strip>;
|
|
50
|
+
export declare const fileMapConfigSchema: z.ZodObject<{
|
|
51
|
+
categories: z.ZodArray<z.ZodObject<{
|
|
52
|
+
id: z.ZodString;
|
|
53
|
+
label: z.ZodString;
|
|
54
|
+
hint: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
55
|
+
}, z.core.$strip>>;
|
|
56
|
+
files: z.ZodArray<z.ZodObject<{
|
|
57
|
+
path: z.ZodString;
|
|
58
|
+
name: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
59
|
+
type: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
60
|
+
size: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
61
|
+
}, z.core.$strip>>;
|
|
62
|
+
suggestions: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>>;
|
|
63
|
+
confidence: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
64
|
+
HIGH: "HIGH";
|
|
65
|
+
MEDIUM: "MEDIUM";
|
|
66
|
+
LOW: "LOW";
|
|
67
|
+
}>>>>;
|
|
68
|
+
allow_unassigned: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
69
|
+
}, z.core.$strip>;
|
|
8
70
|
export declare const builderFieldValidationSchema: z.ZodOptional<z.ZodObject<{
|
|
9
71
|
min: z.ZodOptional<z.ZodNumber>;
|
|
10
72
|
max: z.ZodOptional<z.ZodNumber>;
|
|
@@ -24,6 +86,8 @@ export declare const builderFieldSchema: z.ZodObject<{
|
|
|
24
86
|
textarea: "textarea";
|
|
25
87
|
multi_select: "multi_select";
|
|
26
88
|
file_upload: "file_upload";
|
|
89
|
+
entity_picker: "entity_picker";
|
|
90
|
+
file_map: "file_map";
|
|
27
91
|
}>;
|
|
28
92
|
required: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
29
93
|
placeholder: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
@@ -40,6 +104,46 @@ export declare const builderFieldSchema: z.ZodObject<{
|
|
|
40
104
|
max_length: z.ZodOptional<z.ZodNumber>;
|
|
41
105
|
pattern: z.ZodOptional<z.ZodString>;
|
|
42
106
|
}, z.core.$strip>>>;
|
|
107
|
+
source: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
108
|
+
allow_create: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
109
|
+
create_fields: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
110
|
+
name: z.ZodString;
|
|
111
|
+
label: z.ZodString;
|
|
112
|
+
field_type: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
113
|
+
number: "number";
|
|
114
|
+
date: "date";
|
|
115
|
+
text: "text";
|
|
116
|
+
checkbox: "checkbox";
|
|
117
|
+
select: "select";
|
|
118
|
+
textarea: "textarea";
|
|
119
|
+
}>>>;
|
|
120
|
+
required: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
121
|
+
placeholder: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
122
|
+
options: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
123
|
+
value: z.ZodString;
|
|
124
|
+
label: z.ZodString;
|
|
125
|
+
}, z.core.$strip>>>>;
|
|
126
|
+
}, z.core.$strip>>>>;
|
|
127
|
+
file_map: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
128
|
+
categories: z.ZodArray<z.ZodObject<{
|
|
129
|
+
id: z.ZodString;
|
|
130
|
+
label: z.ZodString;
|
|
131
|
+
hint: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
132
|
+
}, z.core.$strip>>;
|
|
133
|
+
files: z.ZodArray<z.ZodObject<{
|
|
134
|
+
path: z.ZodString;
|
|
135
|
+
name: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
136
|
+
type: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
137
|
+
size: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
138
|
+
}, z.core.$strip>>;
|
|
139
|
+
suggestions: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>>;
|
|
140
|
+
confidence: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
141
|
+
HIGH: "HIGH";
|
|
142
|
+
MEDIUM: "MEDIUM";
|
|
143
|
+
LOW: "LOW";
|
|
144
|
+
}>>>>;
|
|
145
|
+
allow_unassigned: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
146
|
+
}, z.core.$strip>>>;
|
|
43
147
|
}, z.core.$strip>;
|
|
44
148
|
export declare const builderBlockSchema: z.ZodObject<{
|
|
45
149
|
id: z.ZodString;
|
|
@@ -57,6 +161,8 @@ export declare const builderBlockSchema: z.ZodObject<{
|
|
|
57
161
|
textarea: "textarea";
|
|
58
162
|
multi_select: "multi_select";
|
|
59
163
|
file_upload: "file_upload";
|
|
164
|
+
entity_picker: "entity_picker";
|
|
165
|
+
file_map: "file_map";
|
|
60
166
|
}>;
|
|
61
167
|
required: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
62
168
|
placeholder: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
@@ -73,6 +179,46 @@ export declare const builderBlockSchema: z.ZodObject<{
|
|
|
73
179
|
max_length: z.ZodOptional<z.ZodNumber>;
|
|
74
180
|
pattern: z.ZodOptional<z.ZodString>;
|
|
75
181
|
}, z.core.$strip>>>;
|
|
182
|
+
source: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
183
|
+
allow_create: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
184
|
+
create_fields: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
185
|
+
name: z.ZodString;
|
|
186
|
+
label: z.ZodString;
|
|
187
|
+
field_type: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
188
|
+
number: "number";
|
|
189
|
+
date: "date";
|
|
190
|
+
text: "text";
|
|
191
|
+
checkbox: "checkbox";
|
|
192
|
+
select: "select";
|
|
193
|
+
textarea: "textarea";
|
|
194
|
+
}>>>;
|
|
195
|
+
required: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
196
|
+
placeholder: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
197
|
+
options: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
198
|
+
value: z.ZodString;
|
|
199
|
+
label: z.ZodString;
|
|
200
|
+
}, z.core.$strip>>>>;
|
|
201
|
+
}, z.core.$strip>>>>;
|
|
202
|
+
file_map: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
203
|
+
categories: z.ZodArray<z.ZodObject<{
|
|
204
|
+
id: z.ZodString;
|
|
205
|
+
label: z.ZodString;
|
|
206
|
+
hint: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
207
|
+
}, z.core.$strip>>;
|
|
208
|
+
files: z.ZodArray<z.ZodObject<{
|
|
209
|
+
path: z.ZodString;
|
|
210
|
+
name: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
211
|
+
type: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
212
|
+
size: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
213
|
+
}, z.core.$strip>>;
|
|
214
|
+
suggestions: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>>;
|
|
215
|
+
confidence: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
216
|
+
HIGH: "HIGH";
|
|
217
|
+
MEDIUM: "MEDIUM";
|
|
218
|
+
LOW: "LOW";
|
|
219
|
+
}>>>>;
|
|
220
|
+
allow_unassigned: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
221
|
+
}, z.core.$strip>>>;
|
|
76
222
|
}, z.core.$strip>>;
|
|
77
223
|
context: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
78
224
|
}, z.core.$strip>;
|
|
@@ -101,6 +247,8 @@ export declare const builderSchema: z.ZodObject<{
|
|
|
101
247
|
textarea: "textarea";
|
|
102
248
|
multi_select: "multi_select";
|
|
103
249
|
file_upload: "file_upload";
|
|
250
|
+
entity_picker: "entity_picker";
|
|
251
|
+
file_map: "file_map";
|
|
104
252
|
}>;
|
|
105
253
|
required: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
106
254
|
placeholder: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
@@ -117,6 +265,46 @@ export declare const builderSchema: z.ZodObject<{
|
|
|
117
265
|
max_length: z.ZodOptional<z.ZodNumber>;
|
|
118
266
|
pattern: z.ZodOptional<z.ZodString>;
|
|
119
267
|
}, z.core.$strip>>>;
|
|
268
|
+
source: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
269
|
+
allow_create: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
270
|
+
create_fields: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
271
|
+
name: z.ZodString;
|
|
272
|
+
label: z.ZodString;
|
|
273
|
+
field_type: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
274
|
+
number: "number";
|
|
275
|
+
date: "date";
|
|
276
|
+
text: "text";
|
|
277
|
+
checkbox: "checkbox";
|
|
278
|
+
select: "select";
|
|
279
|
+
textarea: "textarea";
|
|
280
|
+
}>>>;
|
|
281
|
+
required: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
282
|
+
placeholder: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
283
|
+
options: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
284
|
+
value: z.ZodString;
|
|
285
|
+
label: z.ZodString;
|
|
286
|
+
}, z.core.$strip>>>>;
|
|
287
|
+
}, z.core.$strip>>>>;
|
|
288
|
+
file_map: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
289
|
+
categories: z.ZodArray<z.ZodObject<{
|
|
290
|
+
id: z.ZodString;
|
|
291
|
+
label: z.ZodString;
|
|
292
|
+
hint: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
293
|
+
}, z.core.$strip>>;
|
|
294
|
+
files: z.ZodArray<z.ZodObject<{
|
|
295
|
+
path: z.ZodString;
|
|
296
|
+
name: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
297
|
+
type: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
298
|
+
size: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
299
|
+
}, z.core.$strip>>;
|
|
300
|
+
suggestions: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>>;
|
|
301
|
+
confidence: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
302
|
+
HIGH: "HIGH";
|
|
303
|
+
MEDIUM: "MEDIUM";
|
|
304
|
+
LOW: "LOW";
|
|
305
|
+
}>>>>;
|
|
306
|
+
allow_unassigned: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
307
|
+
}, z.core.$strip>>>;
|
|
120
308
|
}, z.core.$strip>>;
|
|
121
309
|
context: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
122
310
|
}, z.core.$strip>>;
|
|
@@ -127,4 +315,11 @@ export type BuilderField = z.infer<typeof builderFieldSchema>;
|
|
|
127
315
|
export type BuilderBlock = z.infer<typeof builderBlockSchema>;
|
|
128
316
|
export type BuilderPayload = z.infer<typeof builderSchema>;
|
|
129
317
|
export type BuilderFieldOption = z.infer<typeof builderFieldOptionSchema>;
|
|
318
|
+
export type EntityOption = z.infer<typeof entityOptionSchema>;
|
|
319
|
+
export type EntityCreateField = z.infer<typeof entityCreateFieldSchema>;
|
|
320
|
+
export type FileMapConfig = z.infer<typeof fileMapConfigSchema>;
|
|
321
|
+
export type FileMapCategory = z.infer<typeof fileMapCategorySchema>;
|
|
322
|
+
export type FileMapFile = z.infer<typeof fileMapFileSchema>;
|
|
323
|
+
/** Submitted value: category id (or "unassigned") → file paths. */
|
|
324
|
+
export type FileMapValue = Record<string, string[]>;
|
|
130
325
|
//# sourceMappingURL=schemas.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/builders/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,mBAAmB,
|
|
1
|
+
{"version":3,"file":"schemas.d.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AAC,OAAO,aAAa,CAAC,CAAC;AAC3D,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAC1E,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAC9D,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AACxE,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAChE,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACpE,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC5D,mEAAmE;AACnE,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC"}
|
|
@@ -272,7 +272,7 @@ function JournalEntryResolver(p) {
|
|
|
272
272
|
}, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { width: "100%", display: "flex", flexDirection: "column", gap: "14px" }, children: [
|
|
273
273
|
p.title && /* @__PURE__ */ jsxRuntime.jsx("p", { style: { fontFamily: "var(--font-serif)", fontSize: "15px", fontWeight: 600, color: "var(--foreground)", letterSpacing: "-0.005em" }, children: p.title }),
|
|
274
274
|
((_c = p.entries) != null ? _c : []).map((entry) => {
|
|
275
|
-
var _a2, _b2;
|
|
275
|
+
var _a2, _b2, _c2;
|
|
276
276
|
let totalDebit = 0, totalCredit = 0;
|
|
277
277
|
((_a2 = entry.lines) != null ? _a2 : []).forEach((l) => {
|
|
278
278
|
totalDebit += l.debit;
|
|
@@ -298,7 +298,7 @@ function JournalEntryResolver(p) {
|
|
|
298
298
|
letterSpacing: "0.02em"
|
|
299
299
|
}, children: h }, h)) }) }),
|
|
300
300
|
/* @__PURE__ */ jsxRuntime.jsxs("tbody", { children: [
|
|
301
|
-
entry.lines.map((line, li) => {
|
|
301
|
+
((_c2 = entry.lines) != null ? _c2 : []).map((line, li) => {
|
|
302
302
|
var _a3;
|
|
303
303
|
return /* @__PURE__ */ jsxRuntime.jsxs("tr", { style: { background: li % 2 === 0 ? "white" : "#fafafa" }, children: [
|
|
304
304
|
/* @__PURE__ */ jsxRuntime.jsx("td", { style: { padding: "6px 12px", fontSize: "13px" }, children: line.account }),
|