@esheet/builder 0.0.4-1 → 0.0.4-2
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/index.d.ts +434 -16
- package/dist/index.js +21976 -7780
- package/package.json +6 -5
- package/dist/index.d.ts.map +0 -1
- package/dist/lib/EsheetBuilder.d.ts +0 -46
- package/dist/lib/EsheetBuilder.d.ts.map +0 -1
- package/dist/lib/builder-tools.d.ts +0 -107
- package/dist/lib/builder-tools.d.ts.map +0 -1
- package/dist/lib/components/BuilderHeader.d.ts +0 -7
- package/dist/lib/components/BuilderHeader.d.ts.map +0 -1
- package/dist/lib/components/Canvas.d.ts +0 -12
- package/dist/lib/components/Canvas.d.ts.map +0 -1
- package/dist/lib/components/CodeView.d.ts +0 -12
- package/dist/lib/components/CodeView.d.ts.map +0 -1
- package/dist/lib/components/FeedbackModal.d.ts +0 -23
- package/dist/lib/components/FeedbackModal.d.ts.map +0 -1
- package/dist/lib/components/FieldWrapper.d.ts +0 -53
- package/dist/lib/components/FieldWrapper.d.ts.map +0 -1
- package/dist/lib/components/MobileBottomDrawer.d.ts +0 -9
- package/dist/lib/components/MobileBottomDrawer.d.ts.map +0 -1
- package/dist/lib/components/ToolPanel.d.ts +0 -11
- package/dist/lib/components/ToolPanel.d.ts.map +0 -1
- package/dist/lib/components/edit-panel/CommonEditor.d.ts +0 -16
- package/dist/lib/components/edit-panel/CommonEditor.d.ts.map +0 -1
- package/dist/lib/components/edit-panel/DraftIdEditor.d.ts +0 -16
- package/dist/lib/components/edit-panel/DraftIdEditor.d.ts.map +0 -1
- package/dist/lib/components/edit-panel/EditPanel.d.ts +0 -10
- package/dist/lib/components/edit-panel/EditPanel.d.ts.map +0 -1
- package/dist/lib/components/edit-panel/InputTypeEditor.d.ts +0 -16
- package/dist/lib/components/edit-panel/InputTypeEditor.d.ts.map +0 -1
- package/dist/lib/components/edit-panel/LogicEditor.d.ts +0 -15
- package/dist/lib/components/edit-panel/LogicEditor.d.ts.map +0 -1
- package/dist/lib/components/edit-panel/MatrixEditor.d.ts +0 -12
- package/dist/lib/components/edit-panel/MatrixEditor.d.ts.map +0 -1
- package/dist/lib/components/edit-panel/OptionListEditor.d.ts +0 -14
- package/dist/lib/components/edit-panel/OptionListEditor.d.ts.map +0 -1
- package/dist/lib/hooks/useFormApi.d.ts +0 -55
- package/dist/lib/hooks/useFormApi.d.ts.map +0 -1
- package/dist/lib/hooks/useUiApi.d.ts +0 -22
- package/dist/lib/hooks/useUiApi.d.ts.map +0 -1
- package/dist/lib/hooks/useVisibleRootIds.d.ts +0 -11
- package/dist/lib/hooks/useVisibleRootIds.d.ts.map +0 -1
- package/dist/lib/icons.d.ts +0 -31
- package/dist/lib/icons.d.ts.map +0 -1
- package/dist/lib/mcp/index.d.ts +0 -7
- package/dist/lib/mcp/index.d.ts.map +0 -1
- package/dist/lib/mcp/system-prompt.d.ts +0 -2
- package/dist/lib/mcp/system-prompt.d.ts.map +0 -1
- package/dist/lib/mcp/tool-definitions.d.ts +0 -10
- package/dist/lib/mcp/tool-definitions.d.ts.map +0 -1
- package/dist/lib/mcp/tool-executor.d.ts +0 -5
- package/dist/lib/mcp/tool-executor.d.ts.map +0 -1
- package/dist/lib/mcp/useBuilderToolBridge.d.ts +0 -31
- package/dist/lib/mcp/useBuilderToolBridge.d.ts.map +0 -1
- package/dist/lib/register-defaults.d.ts +0 -2
- package/dist/lib/register-defaults.d.ts.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@esheet/builder",
|
|
3
|
-
"version": "0.0.4-
|
|
3
|
+
"version": "0.0.4-2",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/mieweb/eSheet"
|
|
@@ -38,16 +38,17 @@
|
|
|
38
38
|
]
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@esheet/adapters": "0.0.4-
|
|
42
|
-
"@esheet/core": "0.0.4-
|
|
43
|
-
"@esheet/fields": "0.0.4-
|
|
41
|
+
"@esheet/adapters": "0.0.4-2",
|
|
42
|
+
"@esheet/core": "0.0.4-2",
|
|
43
|
+
"@esheet/fields": "0.0.4-2",
|
|
44
44
|
"@mieweb/ui": "^0.6.1",
|
|
45
45
|
"@monaco-editor/react": "^4.7.0",
|
|
46
46
|
"js-yaml": "^4.1.1",
|
|
47
47
|
"react": "^19.2.4",
|
|
48
48
|
"sortablejs": "^1.15.7",
|
|
49
49
|
"tslib": "^2.3.0",
|
|
50
|
-
"zustand": "^5.0.11"
|
|
50
|
+
"zustand": "^5.0.11",
|
|
51
|
+
"@esheet/renderer": "0.0.4-2"
|
|
51
52
|
},
|
|
52
53
|
"devDependencies": {
|
|
53
54
|
"@tailwindcss/cli": "^4.2.1",
|
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,oBAAoB,CAAC;AAG5B,OAAO,EACL,aAAa,EACb,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,KAAK,WAAW,EAChB,KAAK,OAAO,EACZ,KAAK,mBAAmB,GACzB,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,SAAS,EACT,iBAAiB,EACjB,YAAY,EACZ,KAAK,EACL,aAAa,EACb,KAAK,kBAAkB,EACvB,KAAK,YAAY,EACjB,KAAK,YAAY,GAClB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACL,YAAY,EACZ,KAAK,iBAAiB,EACtB,KAAK,uBAAuB,GAC7B,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EACL,wBAAwB,EACxB,iBAAiB,EACjB,0BAA0B,GAC3B,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,aAAa,EACb,KAAK,kBAAkB,GACxB,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAE5E,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,YAAY,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC3E,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,YAAY,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAErE,OAAO,EACL,eAAe,EACf,wBAAwB,EACxB,qBAAqB,EACrB,wBAAwB,GACzB,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EACV,cAAc,EACd,+BAA+B,GAChC,MAAM,oBAAoB,CAAC;AAG5B,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { type FormDefinition } from '@esheet/core';
|
|
3
|
-
import { type BuilderTools, type FieldSummary } from './builder-tools.js';
|
|
4
|
-
export { FormStoreContext, UIContext, useFormStore, useUI, } from '@esheet/fields';
|
|
5
|
-
export declare const InstanceIdContext: React.Context<string>;
|
|
6
|
-
/** Hook to access the per-instance ID for unique DOM element IDs. */
|
|
7
|
-
export declare function useInstanceId(): string;
|
|
8
|
-
export type { BuilderTools, FieldSummary };
|
|
9
|
-
export interface EsheetBuilderProps {
|
|
10
|
-
/** Initial form definition to load. Also accepts SurveyJS, MCP elicitation, or FHIR Questionnaire schemas, which are auto-converted. */
|
|
11
|
-
definition?: FormDefinition | Record<string, unknown>;
|
|
12
|
-
/** Callback fired when the form definition changes. */
|
|
13
|
-
onChange?: (definition: FormDefinition) => void;
|
|
14
|
-
/**
|
|
15
|
-
* Called once after the builder mounts, providing a narrow `BuilderTools`
|
|
16
|
-
* facade for MCP / AI tool integrations. Not intended for general developer use —
|
|
17
|
-
* everything a developer needs is available through the builder's own UI and props.
|
|
18
|
-
*/
|
|
19
|
-
onBuilderToolsReady?: (tools: BuilderTools) => void;
|
|
20
|
-
/** Whether drag-and-drop reordering is enabled (default: true). When false, field reordering is disabled entirely — no fallback UI (e.g. arrow buttons) is shown. */
|
|
21
|
-
dragEnabled?: boolean;
|
|
22
|
-
/** Additional CSS class name. */
|
|
23
|
-
className?: string;
|
|
24
|
-
/** Optional content rendered below the header (e.g. custom status/debug panels). */
|
|
25
|
-
children?: React.ReactNode;
|
|
26
|
-
/**
|
|
27
|
-
* Enable touch-optimized mode with larger touch targets in preview mode.
|
|
28
|
-
* - `true`: Always enable touch mode
|
|
29
|
-
* - `false`: Never enable touch mode (CSS media query still applies)
|
|
30
|
-
* - `'auto'`: Enable based on viewport width (<980px) via JavaScript
|
|
31
|
-
* - `undefined`: Rely on CSS media query only (default)
|
|
32
|
-
*/
|
|
33
|
-
touchMode?: boolean | 'auto';
|
|
34
|
-
/** Called when touch mode changes (via auto-detection or programmatic toggle). */
|
|
35
|
-
onTouchModeChange?: (enabled: boolean) => void;
|
|
36
|
-
}
|
|
37
|
-
export interface EsheetBuilderHandle {
|
|
38
|
-
/** Returns true if touch mode is currently enabled */
|
|
39
|
-
isTouchModeEnabled: () => boolean;
|
|
40
|
-
/** Toggle touch mode on/off. Only works when touchMode prop is 'auto' or undefined. */
|
|
41
|
-
setTouchMode: (enabled: boolean) => void;
|
|
42
|
-
/** Reset to auto-detection mode (clears manual override). Only works when touchMode='auto'. */
|
|
43
|
-
resetTouchMode: () => void;
|
|
44
|
-
}
|
|
45
|
-
export declare const EsheetBuilder: React.ForwardRefExoticComponent<EsheetBuilderProps & React.RefAttributes<EsheetBuilderHandle>>;
|
|
46
|
-
//# sourceMappingURL=EsheetBuilder.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EsheetBuilder.d.ts","sourceRoot":"","sources":["../../src/lib/EsheetBuilder.tsx"],"names":[],"mappings":"AAAA,OAAO,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AuMxB,CAAC"}
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import type { AddFieldOptions, FieldType, FieldTypeMeta, FormStore } from '@esheet/core';
|
|
2
|
-
/** Summary of a single field, suitable for AI context. */
|
|
3
|
-
export interface FieldSummary {
|
|
4
|
-
id: string;
|
|
5
|
-
fieldType: string;
|
|
6
|
-
question: string | undefined;
|
|
7
|
-
required: boolean;
|
|
8
|
-
options: {
|
|
9
|
-
id: string;
|
|
10
|
-
value: string;
|
|
11
|
-
}[];
|
|
12
|
-
rows: {
|
|
13
|
-
id: string;
|
|
14
|
-
value: string;
|
|
15
|
-
}[];
|
|
16
|
-
columns: {
|
|
17
|
-
id: string;
|
|
18
|
-
value: string;
|
|
19
|
-
}[];
|
|
20
|
-
/** Which tool family to use: 'add_option' for option-based fields, 'add_row / add_column' for matrix fields. */
|
|
21
|
-
editWith: string;
|
|
22
|
-
/** True if this field has conditional logic rules attached. Use get_field to inspect them. */
|
|
23
|
-
hasRules: boolean;
|
|
24
|
-
/** Required value format for structured input types (date, datetime-local, month, time). Use this exact format when calling fill_field. */
|
|
25
|
-
valueFormat?: string;
|
|
26
|
-
/** True if this field already has a response value. False means it is still empty and needs to be filled. */
|
|
27
|
-
hasValue: boolean;
|
|
28
|
-
/** Section child fields (only present when fieldType === 'section'). */
|
|
29
|
-
children?: FieldSummary[];
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Narrow interface exposed to MCP / AI tools via `onBuilderToolsReady`.
|
|
33
|
-
* Only the operations an external AI agent needs — no raw store internals.
|
|
34
|
-
*/
|
|
35
|
-
export interface BuilderTools {
|
|
36
|
-
/** Add a new field. Returns the generated ID, or null for unknown type. */
|
|
37
|
-
addField: (fieldType: FieldType, opts?: AddFieldOptions) => string | null;
|
|
38
|
-
/** Patch a field's properties. Returns false if the field was not found. */
|
|
39
|
-
updateField: (fieldId: string, patch: Record<string, unknown>) => boolean;
|
|
40
|
-
/** Remove a field. Returns false if not found. */
|
|
41
|
-
removeField: (fieldId: string) => boolean;
|
|
42
|
-
/** Find a field ID by exact ID or partial question match. */
|
|
43
|
-
resolveFieldId: (fieldId?: string, fieldQuestion?: string) => string | undefined;
|
|
44
|
-
/** Replace the entire form with a new definition. */
|
|
45
|
-
resetForm: (definition: {
|
|
46
|
-
id?: string;
|
|
47
|
-
fields: Record<string, unknown>[];
|
|
48
|
-
}) => void;
|
|
49
|
-
/** Generate a form from a list of plain question descriptors. */
|
|
50
|
-
generateForm: (questions: {
|
|
51
|
-
question: string;
|
|
52
|
-
fieldType?: string;
|
|
53
|
-
required?: boolean;
|
|
54
|
-
inputType?: string;
|
|
55
|
-
options?: string[];
|
|
56
|
-
}[]) => string;
|
|
57
|
-
/** Snapshot of the current form suitable for AI context. */
|
|
58
|
-
getFormSummary: () => {
|
|
59
|
-
formId: string;
|
|
60
|
-
fieldCount: number;
|
|
61
|
-
fields: FieldSummary[];
|
|
62
|
-
};
|
|
63
|
-
/** Set a response value for a field (for testing in preview mode). Returns true on success, false if field not found, or an error string if the value format is invalid. */
|
|
64
|
-
fillField: (fieldId: string, value: unknown) => boolean | string;
|
|
65
|
-
/** Clear all responses. */
|
|
66
|
-
clearResponses: () => void;
|
|
67
|
-
/** Get current responses keyed by field ID. */
|
|
68
|
-
getResponses: () => Record<string, unknown>;
|
|
69
|
-
/** Granular option mutations (radio, check, dropdown, etc.). */
|
|
70
|
-
option: {
|
|
71
|
-
add: (fieldId: string, value?: string) => string | null;
|
|
72
|
-
update: (fieldId: string, optionId: string, value: string) => boolean;
|
|
73
|
-
remove: (fieldId: string, optionId: string) => boolean;
|
|
74
|
-
};
|
|
75
|
-
/** Granular row mutations (matrix fields). */
|
|
76
|
-
row: {
|
|
77
|
-
add: (fieldId: string, value?: string) => string | null;
|
|
78
|
-
update: (fieldId: string, rowId: string, value: string) => boolean;
|
|
79
|
-
remove: (fieldId: string, rowId: string) => boolean;
|
|
80
|
-
};
|
|
81
|
-
/** Granular column mutations (matrix fields). */
|
|
82
|
-
column: {
|
|
83
|
-
add: (fieldId: string, value?: string) => string | null;
|
|
84
|
-
update: (fieldId: string, columnId: string, value: string) => boolean;
|
|
85
|
-
remove: (fieldId: string, columnId: string) => boolean;
|
|
86
|
-
};
|
|
87
|
-
/** Move a field to a new index. */
|
|
88
|
-
moveField: (fieldId: string, toIndex: number, toParentId?: string | null) => boolean;
|
|
89
|
-
/** Get a single field node by ID. */
|
|
90
|
-
getField: (fieldId: string) => import('@esheet/core').FieldNode | undefined;
|
|
91
|
-
/** List all registered field type keys and their labels. */
|
|
92
|
-
getFieldTypes: () => {
|
|
93
|
-
key: string;
|
|
94
|
-
label: string;
|
|
95
|
-
category: string;
|
|
96
|
-
hasOptions: boolean;
|
|
97
|
-
hasMatrix: boolean;
|
|
98
|
-
}[];
|
|
99
|
-
/** Get full spec for a single field type (properties, capabilities, defaults). */
|
|
100
|
-
getFieldSpec: (fieldType: string) => FieldTypeMeta | undefined;
|
|
101
|
-
/** Export the full form definition tree (inverse of loadDefinition). */
|
|
102
|
-
getDefinition: () => import('@esheet/core').FormDefinition;
|
|
103
|
-
/** Update the form's top-level ID without replacing fields. */
|
|
104
|
-
setFormId: (id: string) => void;
|
|
105
|
-
}
|
|
106
|
-
export declare function createBuilderTools(form: FormStore): BuilderTools;
|
|
107
|
-
//# sourceMappingURL=builder-tools.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"builder-tools.d.ts","sourceRoot":"","sources":["../../src/lib/builder-tools.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,eAAe,EAEf,SAAS,EACT,aAAa,EAEb,SAAS,EACV,MAAM,cAAc,CAAC;AAOtB,0DAA0D;AAC1D,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,QAAQ,EAAE,OAAO,CAAC;IAElB,OAAO,EAAE;QAAE,EAAE,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
|
4
|
-
* BuilderHeader — top bar with Build/Code/Preview mode toggle and Import/Export actions.
|
|
5
|
-
*/
|
|
6
|
-
export declare function BuilderHeader(_props: BuilderHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
//# sourceMappingURL=BuilderHeader.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BuilderHeader.d.ts","sourceRoot":"","sources":["../../../src/lib/components/BuilderHeader.tsx"],"names":[],"mappings":"AAuCA,MAAM,WAAW,kBAAkB;CAAG;AAmLtC;;GAEG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,kBAAkB,2CAgnBvD"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { FormStore, UIStore } from '@esheet/core';
|
|
3
|
-
export interface CanvasProps {
|
|
4
|
-
/** The form store */
|
|
5
|
-
form: FormStore;
|
|
6
|
-
/** The UI store */
|
|
7
|
-
ui: UIStore;
|
|
8
|
-
/** Whether drag-and-drop reordering is enabled (default: true) */
|
|
9
|
-
dragEnabled?: boolean;
|
|
10
|
-
}
|
|
11
|
-
export declare const Canvas: React.NamedExoticComponent<CanvasProps>;
|
|
12
|
-
//# sourceMappingURL=Canvas.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Canvas.d.ts","sourceRoot":"","sources":["../../../src/lib/components/Canvas.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAuB,SAAS,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAS5E,MAAM,WAAW,WAAW;IAC1B,qBAAqB;IACrB,IAAI,EAAE,SAAS,CAAC;IAChB,mBAAmB;IACnB,EAAE,EAAE,OAAO,CAAC;IACZ,kEAAkE;IAClE,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAqFD,eAAO,MAAM,MAAM,yCAkZjB,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { type FormStore, type UIStore } from '@esheet/core';
|
|
2
|
-
export interface CodeViewProps {
|
|
3
|
-
form: FormStore;
|
|
4
|
-
ui: UIStore;
|
|
5
|
-
}
|
|
6
|
-
/**
|
|
7
|
-
* CodeView — Monaco-based JSON/YAML editor for the form definition.
|
|
8
|
-
*
|
|
9
|
-
* Serialize on mount, live-validate on edit, auto-save on unmount.
|
|
10
|
-
*/
|
|
11
|
-
export declare function CodeView({ form, ui }: CodeViewProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
-
//# sourceMappingURL=CodeView.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CodeView.d.ts","sourceRoot":"","sources":["../../../src/lib/components/CodeView.tsx"],"names":[],"mappings":"AAGA,OAAO,EAIL,KAAK,SAAS,EACd,KAAK,OAAO,EACb,MAAM,cAAc,CAAC;AAWtB,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,SAAS,CAAC;IAChB,EAAE,EAAE,OAAO,CAAC;CACb;AAgDD;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,aAAa,2CA6OnD"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
2
|
-
export type FeedbackModalVariant = 'info' | 'success' | 'warning' | 'error';
|
|
3
|
-
export interface FeedbackModalProps {
|
|
4
|
-
open: boolean;
|
|
5
|
-
title: string;
|
|
6
|
-
message: string;
|
|
7
|
-
details?: string;
|
|
8
|
-
issues?: string[];
|
|
9
|
-
issuesTitle?: string;
|
|
10
|
-
issuesHint?: string;
|
|
11
|
-
content?: ReactNode;
|
|
12
|
-
variant?: FeedbackModalVariant;
|
|
13
|
-
confirmLabel?: string;
|
|
14
|
-
cancelLabel?: string;
|
|
15
|
-
showCancel?: boolean;
|
|
16
|
-
onConfirm?: () => void;
|
|
17
|
-
onClose: () => void;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Reusable modal used for import and validation feedback.
|
|
21
|
-
*/
|
|
22
|
-
export declare function FeedbackModal({ open, title, message, details, issues, issuesTitle, issuesHint, content, variant, confirmLabel, cancelLabel, showCancel, onConfirm, onClose, }: FeedbackModalProps): import("react/jsx-runtime").JSX.Element | null;
|
|
23
|
-
//# sourceMappingURL=FeedbackModal.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FeedbackModal.d.ts","sourceRoot":"","sources":["../../../src/lib/components/FeedbackModal.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,MAAM,oBAAoB,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;AAE5E,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,OAAO,CAAC,EAAE,oBAAoB,CAAC;IAC/B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AASD;;GAEG;AACH,wBAAgB,aAAa,CAAC,EAC5B,IAAI,EACJ,KAAK,EACL,OAAO,EACP,OAAO,EACP,MAAM,EACN,WAAW,EACX,UAAU,EACV,OAAO,EACP,OAAgB,EAChB,YAAmB,EACnB,WAAsB,EACtB,UAAkB,EAClB,SAAS,EACT,OAAO,GACR,EAAE,kBAAkB,kDA8EpB"}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { FieldComponentProps, FormStore, UIStore } from '@esheet/core';
|
|
3
|
-
/**
|
|
4
|
-
* Props exposed to the render function for custom field components.
|
|
5
|
-
* Identical to `FieldComponentProps` from core — kept as a named alias for
|
|
6
|
-
* backward-compatibility with existing builder consumers.
|
|
7
|
-
*/
|
|
8
|
-
export type FieldWrapperRenderProps = FieldComponentProps;
|
|
9
|
-
export interface FieldWrapperProps {
|
|
10
|
-
/** The field ID */
|
|
11
|
-
fieldId: string;
|
|
12
|
-
/** The form store */
|
|
13
|
-
form: FormStore;
|
|
14
|
-
/** The UI store */
|
|
15
|
-
ui: UIStore;
|
|
16
|
-
/** Ref attached to the drag-handle element. */
|
|
17
|
-
dragHandleRef?: React.RefObject<HTMLDivElement | null>;
|
|
18
|
-
/** Optional override for selection state (used by nested section child interaction). */
|
|
19
|
-
isSelectedOverride?: boolean;
|
|
20
|
-
/** Optional override for click selection behavior. */
|
|
21
|
-
onSelectOverride?: (e: React.MouseEvent) => void;
|
|
22
|
-
/** Optional selected styling variant. */
|
|
23
|
-
selectedVariant?: 'default' | 'nested';
|
|
24
|
-
/** Optional signal used to force expand a field wrapper (used for section drop UX). */
|
|
25
|
-
forceExpandVersion?: number;
|
|
26
|
-
/** Optional signal used to force collapse a field wrapper. */
|
|
27
|
-
forceCollapseVersion?: number;
|
|
28
|
-
/** Render function that receives field data and tools */
|
|
29
|
-
children: (props: FieldWrapperRenderProps) => React.ReactNode;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* FieldWrapper - Extensibility API for custom field components.
|
|
33
|
-
*
|
|
34
|
-
* Wraps a field with collapsible header, selection highlighting, edit/delete buttons, and drag handles.
|
|
35
|
-
* Exposes field data and tools to the render function, allowing users to create
|
|
36
|
-
* custom field types while getting all the built-in editor functionality.
|
|
37
|
-
*
|
|
38
|
-
* @example
|
|
39
|
-
* ```tsx
|
|
40
|
-
* <FieldWrapper fieldId={id} form={form} ui={ui}>
|
|
41
|
-
* {({ field, onUpdate, onRemove }) => (
|
|
42
|
-
* <div>
|
|
43
|
-
* <input
|
|
44
|
-
* value={field.question}
|
|
45
|
-
* onChange={(e) => onUpdate({ question: e.target.value })}
|
|
46
|
-
* />
|
|
47
|
-
* </div>
|
|
48
|
-
* )}
|
|
49
|
-
* </FieldWrapper>
|
|
50
|
-
* ```
|
|
51
|
-
*/
|
|
52
|
-
export declare function FieldWrapper({ fieldId, form, ui, dragHandleRef, isSelectedOverride, onSelectOverride, selectedVariant, forceExpandVersion, forceCollapseVersion, children, }: FieldWrapperProps): import("react/jsx-runtime").JSX.Element | null;
|
|
53
|
-
//# sourceMappingURL=FieldWrapper.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FieldWrapper.d.ts","sourceRoot":"","sources":["../../../src/lib/components/FieldWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,mBAAmB,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAW5E;;;;GAIG;AACH,MAAM,MAAM,uBAAuB,GAAG,mBAAmB,CAAC;AAE1D,MAAM,WAAW,iBAAiB;IAChC,mBAAmB;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,qBAAqB;IACrB,IAAI,EAAE,SAAS,CAAC;IAChB,mBAAmB;IACnB,EAAE,EAAE,OAAO,CAAC;IACZ,+CAA+C;IAC/C,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IACvD,wFAAwF;IACxF,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,sDAAsD;IACtD,gBAAgB,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IACjD,yCAAyC;IACzC,eAAe,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;IACvC,uFAAuF;IACvF,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,8DAA8D;IAC9D,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,yDAAyD;IACzD,QAAQ,EAAE,CAAC,KAAK,EAAE,uBAAuB,KAAK,KAAK,CAAC,SAAS,CAAC;CAC/D;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,YAAY,CAAC,EAC3B,OAAO,EACP,IAAI,EACJ,EAAE,EACF,aAAa,EACb,kBAAkB,EAClB,gBAAgB,EAChB,eAA2B,EAC3B,kBAAkB,EAClB,oBAAoB,EACpB,QAAQ,GACT,EAAE,iBAAiB,kDAsQnB"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export interface MobileBottomDrawerProps {
|
|
3
|
-
title: string;
|
|
4
|
-
open: boolean;
|
|
5
|
-
onClose: () => void;
|
|
6
|
-
children: React.ReactNode;
|
|
7
|
-
}
|
|
8
|
-
export declare function MobileBottomDrawer({ title, open, onClose, children, }: MobileBottomDrawerProps): import("react/jsx-runtime").JSX.Element | null;
|
|
9
|
-
//# sourceMappingURL=MobileBottomDrawer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MobileBottomDrawer.d.ts","sourceRoot":"","sources":["../../../src/lib/components/MobileBottomDrawer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,WAAW,uBAAuB;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,wBAAgB,kBAAkB,CAAC,EACjC,KAAK,EACL,IAAI,EACJ,OAAO,EACP,QAAQ,GACT,EAAE,uBAAuB,kDA+BzB"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export interface ToolPanelProps {
|
|
3
|
-
}
|
|
4
|
-
/**
|
|
5
|
-
* ToolPanel - Left panel listing available field types.
|
|
6
|
-
*
|
|
7
|
-
* Clicking a button calls `form.addField(type)` and auto-selects
|
|
8
|
-
* the new field. Groups field types by category from the registry.
|
|
9
|
-
*/
|
|
10
|
-
export declare const ToolPanel: React.NamedExoticComponent<ToolPanelProps>;
|
|
11
|
-
//# sourceMappingURL=ToolPanel.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ToolPanel.d.ts","sourceRoot":"","sources":["../../../src/lib/components/ToolPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAmB1B,MAAM,WAAW,cAAc;CAAG;AA2ClC;;;;;GAKG;AACH,eAAO,MAAM,SAAS,4CAuLpB,CAAC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { FieldDefinition } from '@esheet/core';
|
|
2
|
-
export interface CommonEditorProps {
|
|
3
|
-
fieldId: string;
|
|
4
|
-
def: Omit<FieldDefinition, 'fields'>;
|
|
5
|
-
onUpdate: (patch: Partial<Omit<FieldDefinition, 'fields'>>) => void;
|
|
6
|
-
/** Called to rename the field ID. Returns false if the name collides. */
|
|
7
|
-
onRenameId: (newId: string) => boolean;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* CommonEditor — shared property editors for all non-section fields.
|
|
11
|
-
*
|
|
12
|
-
* Renders: ID, Question, Sublabel (description), Required toggle,
|
|
13
|
-
* and InputTypeEditor for text/longtext fields.
|
|
14
|
-
*/
|
|
15
|
-
export declare function CommonEditor({ fieldId, def, onUpdate, onRenameId, }: CommonEditorProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
-
//# sourceMappingURL=CommonEditor.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CommonEditor.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/edit-panel/CommonEditor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAiB,MAAM,cAAc,CAAC;AAMnE,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,IAAI,CAAC,eAAe,EAAE,QAAQ,CAAC,CAAC;IACrC,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,eAAe,EAAE,QAAQ,CAAC,CAAC,KAAK,IAAI,CAAC;IACpE,yEAAyE;IACzE,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC;CACxC;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,EAC3B,OAAO,EACP,GAAG,EACH,QAAQ,EACR,UAAU,GACX,EAAE,iBAAiB,2CAmEnB"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export interface DraftIdEditorProps {
|
|
2
|
-
/** Current persisted ID. */
|
|
3
|
-
id: string;
|
|
4
|
-
/** Parent field ID for prefixing the DOM id attribute. */
|
|
5
|
-
fieldId: string;
|
|
6
|
-
/** Called with the new ID when the user commits (blur / Enter). Returns false if invalid. */
|
|
7
|
-
onCommit: (newId: string) => boolean;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* DraftIdEditor — edits a field ID with commit-on-blur/Enter.
|
|
11
|
-
*
|
|
12
|
-
* Keeps a local draft so keystrokes don't immediately rename the field.
|
|
13
|
-
* Reverts to the persisted `id` if the commit callback rejects.
|
|
14
|
-
*/
|
|
15
|
-
export declare function DraftIdEditor({ id, fieldId, onCommit }: DraftIdEditorProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
-
//# sourceMappingURL=DraftIdEditor.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DraftIdEditor.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/edit-panel/DraftIdEditor.tsx"],"names":[],"mappings":"AAGA,MAAM,WAAW,kBAAkB;IACjC,4BAA4B;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,0DAA0D;IAC1D,OAAO,EAAE,MAAM,CAAC;IAChB,6FAA6F;IAC7F,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC;CACtC;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,kBAAkB,2CAmC1E"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export interface EditPanelProps {
|
|
2
|
-
}
|
|
3
|
-
/**
|
|
4
|
-
* EditPanel — right panel for editing the selected field's properties.
|
|
5
|
-
*
|
|
6
|
-
* Shows Edit tab (common + per-type editors) and Logic tab.
|
|
7
|
-
* Renders nothing meaningful when no field is selected.
|
|
8
|
-
*/
|
|
9
|
-
export declare function EditPanel(_props: EditPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
//# sourceMappingURL=EditPanel.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EditPanel.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/edit-panel/EditPanel.tsx"],"names":[],"mappings":"AAoBA,MAAM,WAAW,cAAc;CAAG;AAElC;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,cAAc,2CAmI/C"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { TextInputType } from '@esheet/core';
|
|
2
|
-
export interface InputTypeEditorProps {
|
|
3
|
-
fieldId: string;
|
|
4
|
-
inputType: TextInputType;
|
|
5
|
-
unit?: string;
|
|
6
|
-
onChange: (patch: {
|
|
7
|
-
inputType?: TextInputType;
|
|
8
|
-
unit?: string;
|
|
9
|
-
}) => void;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* InputTypeEditor — dropdown for input type + optional unit selector.
|
|
13
|
-
* Only relevant for `text` and `longtext` fields.
|
|
14
|
-
*/
|
|
15
|
-
export declare function InputTypeEditor({ fieldId, inputType, unit, onChange, }: InputTypeEditorProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
-
//# sourceMappingURL=InputTypeEditor.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"InputTypeEditor.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/edit-panel/InputTypeEditor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AA+BlD,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,aAAa,CAAC;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE;QAAE,SAAS,CAAC,EAAE,aAAa,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;CACzE;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,EAC9B,OAAO,EACP,SAAS,EACT,IAAI,EACJ,QAAQ,GACT,EAAE,oBAAoB,2CA8DtB"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { type ConditionalRule } from '@esheet/core';
|
|
2
|
-
export interface LogicEditorProps {
|
|
3
|
-
fieldId: string;
|
|
4
|
-
rules: readonly ConditionalRule[];
|
|
5
|
-
}
|
|
6
|
-
/**
|
|
7
|
-
* LogicEditor — manage conditional rules (visible / enable / required)
|
|
8
|
-
* for the selected field.
|
|
9
|
-
*
|
|
10
|
-
* Rules are grouped by effect. Multiple rules with the same effect
|
|
11
|
-
* use OR semantics (any rule can trigger the effect). Within a rule,
|
|
12
|
-
* conditions combine with the rule's logic mode (AND / OR).
|
|
13
|
-
*/
|
|
14
|
-
export declare function LogicEditor({ fieldId, rules }: LogicEditorProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
-
//# sourceMappingURL=LogicEditor.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LogicEditor.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/edit-panel/LogicEditor.tsx"],"names":[],"mappings":"AACA,OAAO,EASL,KAAK,eAAe,EAGrB,MAAM,cAAc,CAAC;AAStB,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,SAAS,eAAe,EAAE,CAAC;CACnC;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,gBAAgB,2CAwH/D"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { MatrixRow, MatrixColumn } from '@esheet/core';
|
|
2
|
-
export interface MatrixEditorProps {
|
|
3
|
-
fieldId: string;
|
|
4
|
-
rows: readonly MatrixRow[];
|
|
5
|
-
columns: readonly MatrixColumn[];
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* MatrixEditor — add / edit / remove rows and columns for matrix fields.
|
|
9
|
-
* Max 10 rows, max 10 columns.
|
|
10
|
-
*/
|
|
11
|
-
export declare function MatrixEditor({ fieldId, rows, columns }: MatrixEditorProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
-
//# sourceMappingURL=MatrixEditor.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MatrixEditor.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/edit-panel/MatrixEditor.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAQ5D,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,SAAS,SAAS,EAAE,CAAC;IAC3B,OAAO,EAAE,SAAS,YAAY,EAAE,CAAC;CAClC;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,iBAAiB,2CA+HzE"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { FieldOption } from '@esheet/core';
|
|
2
|
-
export interface OptionListEditorProps {
|
|
3
|
-
fieldId: string;
|
|
4
|
-
fieldType: string;
|
|
5
|
-
options: readonly FieldOption[];
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* OptionListEditor — add / edit / remove options for choice fields.
|
|
9
|
-
*
|
|
10
|
-
* Disables delete for boolean (fixed Yes/No).
|
|
11
|
-
* Uses form.addOption / updateOption / removeOption directly.
|
|
12
|
-
*/
|
|
13
|
-
export declare function OptionListEditor({ fieldId, fieldType, options, }: OptionListEditorProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
-
//# sourceMappingURL=OptionListEditor.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OptionListEditor.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/edit-panel/OptionListEditor.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAKhD,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,SAAS,WAAW,EAAE,CAAC;CACjC;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,OAAO,EACP,SAAS,EACT,OAAO,GACR,EAAE,qBAAqB,2CA8DvB"}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import type { AddFieldOptions, FieldDefinition, FieldNode, FieldResponse, FieldType, FormStore, NormalizedDefinition } from '@esheet/core';
|
|
2
|
-
export type FieldResponseMap = Record<string, FieldResponse>;
|
|
3
|
-
export interface FormApi {
|
|
4
|
-
field: FieldNode | undefined;
|
|
5
|
-
response: FieldResponse | undefined;
|
|
6
|
-
isVisible: boolean;
|
|
7
|
-
isEnabled: boolean;
|
|
8
|
-
isRequired: boolean;
|
|
9
|
-
normalized: NormalizedDefinition;
|
|
10
|
-
responses: FieldResponseMap;
|
|
11
|
-
instanceId: string;
|
|
12
|
-
form: {
|
|
13
|
-
addField: (type: FieldType, opts?: AddFieldOptions) => string | null;
|
|
14
|
-
loadDefinition: FormStore['getState'] extends () => infer S ? S extends {
|
|
15
|
-
loadDefinition: infer F;
|
|
16
|
-
} ? F : never : never;
|
|
17
|
-
setFormId: (id: string) => void;
|
|
18
|
-
hydrateDefinition: () => ReturnType<ReturnType<FormStore['getState']>['hydrateDefinition']>;
|
|
19
|
-
hydrateResponse: () => ReturnType<ReturnType<FormStore['getState']>['hydrateResponse']>;
|
|
20
|
-
resetResponses: () => void;
|
|
21
|
-
};
|
|
22
|
-
field_: {
|
|
23
|
-
update: (patch: Partial<Omit<FieldDefinition, 'fields'>>) => boolean;
|
|
24
|
-
remove: () => boolean;
|
|
25
|
-
move: (toIndex: number, toParentId?: string | null) => boolean;
|
|
26
|
-
setResponse: (resp: FieldResponse) => void;
|
|
27
|
-
clearResponse: () => void;
|
|
28
|
-
};
|
|
29
|
-
option: {
|
|
30
|
-
add: (value?: string) => string | null;
|
|
31
|
-
update: (optId: string, value: string) => boolean;
|
|
32
|
-
remove: (optId: string) => boolean;
|
|
33
|
-
};
|
|
34
|
-
row: {
|
|
35
|
-
add: (value?: string) => string | null;
|
|
36
|
-
update: (rowId: string, value: string) => boolean;
|
|
37
|
-
remove: (rowId: string) => boolean;
|
|
38
|
-
};
|
|
39
|
-
column: {
|
|
40
|
-
add: (value?: string) => string | null;
|
|
41
|
-
update: (colId: string, value: string) => boolean;
|
|
42
|
-
remove: (colId: string) => boolean;
|
|
43
|
-
};
|
|
44
|
-
_form: FormStore;
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* useFormApi — reactive field state + form store actions.
|
|
48
|
-
*
|
|
49
|
-
* Touches only the FormStore. For UI state (mode, selection, tabs) use
|
|
50
|
-
* useUiApi(). For the computed visible root IDs use useVisibleRootIds().
|
|
51
|
-
*
|
|
52
|
-
* @param fieldId - The field to bind to. Pass undefined for form-level ops only.
|
|
53
|
-
*/
|
|
54
|
-
export declare function useFormApi(fieldId?: string): FormApi;
|
|
55
|
-
//# sourceMappingURL=useFormApi.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useFormApi.d.ts","sourceRoot":"","sources":["../../../src/lib/hooks/useFormApi.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,eAAe,EACf,eAAe,EACf,SAAS,EACT,aAAa,EACb,SAAS,EACT,SAAS,EACT,oBAAoB,EACrB,MAAM,cAAc,CAAC;AAGtB,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;AAE7D,MAAM,WAAW,OAAO;IACtB,KAAK,EAAE,SAAS,GAAG,SAAS,CAAC;IAC7B,QAAQ,EAAE,aAAa,GAAG,SAAS,CAAC;IACpC,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,oBAAoB,CAAC;IACjC,SAAS,EAAE,gBAAgB,CAAC;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE;QACJ,QAAQ,EAAE,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,CAAC,EAAE,eAAe,KAAK,MAAM,GAAG,IAAI,CAAC;QACrE,cAAc,EAAE,SAAS,CAAC,UAAU,CAAC,SAAS,MAAM,MAAM,CAAC,GACvD,CAAC,SAAS;YAAE,cAAc,EAAE,MAAM,CAAC,CAAA;SAAE,GACnC,CAAC,GACD,KAAK,GACP,KAAK,CAAC;QACV,SAAS,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;QAChC,iBAAiB,EAAE,MAAM,UAAU,CACjC,UAAU,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC,mBAAmB,CAAC,CACvD,CAAC;QACF,e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AAK,EAAE,MAAM,KAAK,OAAO,CAAC;KACpC,CAAC;IACF,KAAK,EAAE,SAAS,CAAC;CAClB;AAED;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAuGpD"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { BuilderMode, EditTab, UIStore } from '@esheet/core';
|
|
2
|
-
export interface UiApi {
|
|
3
|
-
mode: BuilderMode;
|
|
4
|
-
selectedFieldId: string | null;
|
|
5
|
-
selectedFieldChildId: string | null;
|
|
6
|
-
editTab: EditTab;
|
|
7
|
-
codeEditorHasError: boolean;
|
|
8
|
-
selectField: (id: string | null) => void;
|
|
9
|
-
selectFieldChild: (parentId: string, childId: string | null) => void;
|
|
10
|
-
setMode: (m: BuilderMode) => void;
|
|
11
|
-
setEditTab: (tab: EditTab) => void;
|
|
12
|
-
setEditModalOpen: (open: boolean) => void;
|
|
13
|
-
clearDragState: () => void;
|
|
14
|
-
_ui: UIStore;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* useUiApi — lightweight hook for components that only need UI state/actions.
|
|
18
|
-
*
|
|
19
|
-
* Useful when you don't need field-scoped state. Requires UIContext provider.
|
|
20
|
-
*/
|
|
21
|
-
export declare function useUiApi(): UiApi;
|
|
22
|
-
//# sourceMappingURL=useUiApi.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useUiApi.d.ts","sourceRoot":"","sources":["../../../src/lib/hooks/useUiApi.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAGlE,MAAM,WAAW,KAAK;IACpB,IAAI,EAAE,WAAW,CAAC;IAClB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,OAAO,EAAE,OAAO,CAAC;IACjB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,WAAW,EAAE,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACzC,gBAAgB,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACrE,OAAO,EAAE,CAAC,CAAC,EAAE,WAAW,KAAK,IAAI,CAAC;IAClC,UAAU,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI,CAAC;IACnC,gBAAgB,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC1C,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,GAAG,EAAE,OAAO,CAAC;CACd;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,IAAI,KAAK,CAkChC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* useVisibleRootIds — returns the root field IDs to render.
|
|
3
|
-
*
|
|
4
|
-
* In build/code mode: all root IDs.
|
|
5
|
-
* In preview mode: only IDs whose visibility rules evaluate to true.
|
|
6
|
-
*
|
|
7
|
-
* Requires both FormStoreContext and UIContext providers.
|
|
8
|
-
* Uses a stable-ref cache so the array reference only changes when content does.
|
|
9
|
-
*/
|
|
10
|
-
export declare function useVisibleRootIds(): readonly string[];
|
|
11
|
-
//# sourceMappingURL=useVisibleRootIds.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useVisibleRootIds.d.ts","sourceRoot":"","sources":["../../../src/lib/hooks/useVisibleRootIds.ts"],"names":[],"mappings":"AAIA;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,IAAI,SAAS,MAAM,EAAE,CA0BrD"}
|