@notmrabhi/flowforge 0.1.19 → 0.1.21
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/package.json +1 -1
- package/dist/GatewayBranchEdge-4XMPBHne.js +0 -1255
- package/dist/GatewayBranchEdge-mRo5aZ3f.js +0 -1
- package/dist/SchemaBuilderDrawer-157p-2Vj.js +0 -1136
- package/dist/SchemaBuilderDrawer-Wje7pVrn.js +0 -1
- package/dist/bpmn-CcuE2X_Q.js +0 -2
- package/dist/bpmn-CtfWDaOY.js +0 -33
- package/dist/canvas.cjs +0 -1
- package/dist/canvas.d.ts +0 -809
- package/dist/canvas.js +0 -28
- package/dist/canvasTokens-CAD6G24b.js +0 -32
- package/dist/canvasTokens-gKNYrPl4.js +0 -1
- package/dist/core.cjs +0 -1
- package/dist/core.d.ts +0 -374
- package/dist/core.js +0 -24
- package/dist/defaultUi.cjs +0 -1
- package/dist/defaultUi.d.ts +0 -83
- package/dist/defaultUi.js +0 -18
- package/dist/form.cjs +0 -1
- package/dist/form.d.ts +0 -857
- package/dist/form.js +0 -44
- package/dist/index-B31-Y5uO.js +0 -11
- package/dist/index-B3aHpb84.js +0 -13
- package/dist/index-BU09HbVh.js +0 -10176
- package/dist/index-BnzttJ4w.js +0 -13758
- package/dist/index-BysKSEtZ.js +0 -1
- package/dist/index-CQ0cVcHp.js +0 -2
- package/dist/index-CkjEllpd.js +0 -1
- package/dist/index-Codx5QwP.js +0 -41
- package/dist/index-Cw9DC-tf.js +0 -76
- package/dist/index-CzPi8KQC.js +0 -1310
- package/dist/index-D14V8rKX.js +0 -1
- package/dist/index-Da5NHCS2.js +0 -8132
- package/dist/index-a1IOaYsW.js +0 -9
- package/dist/index-a3QMaedZ.js +0 -2553
- package/dist/index-gtgq_241.js +0 -3
- package/dist/index-l6kvDx-m.js +0 -1360
- package/dist/index-lcviy90e.js +0 -613
- package/dist/index-wOnYb3DO.js +0 -567
- package/dist/index.cjs +0 -1
- package/dist/index.d.ts +0 -1409
- package/dist/index.js +0 -107
- package/dist/messages-CO299wPN.js +0 -22
- package/dist/messages-O9Tw_XXR.js +0 -1
- package/dist/nodeRegistry.cjs +0 -1
- package/dist/nodeRegistry.d.ts +0 -334
- package/dist/nodeRegistry.js +0 -555
- package/dist/style.css +0 -6
- package/dist/templateRegistry.cjs +0 -1
- package/dist/templateRegistry.d.ts +0 -83
- package/dist/templateRegistry.js +0 -43
- package/dist/templateSkeletons-CQec51xm.js +0 -2953
- package/dist/templateSkeletons-D8-v6BFH.js +0 -1
package/dist/index.d.ts
DELETED
|
@@ -1,1409 +0,0 @@
|
|
|
1
|
-
import { AnySchema } from 'yup';
|
|
2
|
-
import { ComponentType } from 'react';
|
|
3
|
-
import { default as default_2 } from 'react';
|
|
4
|
-
import { EdgeProps } from 'reactflow';
|
|
5
|
-
import { EdgeTypes } from 'reactflow';
|
|
6
|
-
import { FormikProps } from 'formik';
|
|
7
|
-
import { GroupBase } from 'react-select';
|
|
8
|
-
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
9
|
-
import { NodeProps } from 'reactflow';
|
|
10
|
-
import { NodeTypes } from 'reactflow';
|
|
11
|
-
import { ObjectSchema } from 'yup';
|
|
12
|
-
import { ReactNode } from 'react';
|
|
13
|
-
import { StylesConfig } from 'react-select';
|
|
14
|
-
import { useFormik } from 'formik';
|
|
15
|
-
import * as Yup from 'yup';
|
|
16
|
-
|
|
17
|
-
export declare const accessRequestSkeleton: WorkflowState;
|
|
18
|
-
|
|
19
|
-
export declare const ActionNode: ({ id, data }: NodeProps) => JSX_2.Element;
|
|
20
|
-
|
|
21
|
-
declare interface ActiveField {
|
|
22
|
-
/** The contenteditable div inside FormulaInput */
|
|
23
|
-
editorRef: default_2.RefObject<HTMLDivElement | null>;
|
|
24
|
-
/** Saved Range from the last selection — restored before inserting */
|
|
25
|
-
savedRange: Range | null;
|
|
26
|
-
fieldId: string;
|
|
27
|
-
/** Optionally, the field can provide a direct way to insert a variable into its state */
|
|
28
|
-
onInsert?: (path: string, label: string) => void;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export declare interface AddStepContext {
|
|
32
|
-
edgeId: string;
|
|
33
|
-
nodeId: string;
|
|
34
|
-
sourceNodeId: string;
|
|
35
|
-
targetNodeId: string;
|
|
36
|
-
position: 'between';
|
|
37
|
-
referenceNodeId: string;
|
|
38
|
-
referenceNodeType?: string;
|
|
39
|
-
stepVisibility?: unknown;
|
|
40
|
-
filterId?: string;
|
|
41
|
-
branch?: string;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export declare const ApprovalNode: ({ id, data }: NodeProps) => JSX_2.Element;
|
|
45
|
-
|
|
46
|
-
/** True if the AST contains at least one non-text node. */
|
|
47
|
-
export declare function astHasRefs(nodes: FormulaASTNode[]): boolean;
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Convert AST nodes to the flat FormulaToken[] the DOM layer uses.
|
|
51
|
-
* This keeps FormulaInput decoupled from the AST type directly.
|
|
52
|
-
*/
|
|
53
|
-
export declare function astToTokens(nodes: FormulaASTNode[], configEnabled?: boolean): FormulaToken[];
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* Base defaults shared by every node descriptor. A new node only has to specify
|
|
57
|
-
* what makes it different — these fill in the rest.
|
|
58
|
-
*
|
|
59
|
-
* - `formSchema: []` → no config form unless the node defines one
|
|
60
|
-
* - `bpmnEntry` / `bpmnExit` → incoming/outgoing flow connects to the node id itself
|
|
61
|
-
* - `emitBpmnElements` → a single generic bpmn:Task; override for real output
|
|
62
|
-
*/
|
|
63
|
-
export declare const baseNodeDefaults: Pick<NodeDescriptor, 'formSchema' | 'bpmnEntry' | 'bpmnExit' | 'emitBpmnElements'>;
|
|
64
|
-
|
|
65
|
-
export declare interface BpmnElement {
|
|
66
|
-
id: string;
|
|
67
|
-
$type: string;
|
|
68
|
-
[key: string]: unknown;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
export declare interface BpmnSaveOptions {
|
|
72
|
-
processId?: string;
|
|
73
|
-
processName?: string;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
declare type BranchChain = CanvasSlot[];
|
|
77
|
-
|
|
78
|
-
export declare interface BranchMap {
|
|
79
|
-
[filterId: string]: {
|
|
80
|
-
[branchKey: string]: BranchChain;
|
|
81
|
-
};
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
export declare function buildEvaluationPayload({ values, conditionConfig, }: {
|
|
85
|
-
values: Record<string, unknown>;
|
|
86
|
-
conditionConfig?: ConditionConfig;
|
|
87
|
-
}): EvaluationPayload;
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* Returns an empty presence-marker object {}.
|
|
91
|
-
* The backend uses the key's existence in FormulaConfig to know
|
|
92
|
-
* the field value was serialized as _P('...') rather than _DE_{_P('...')}.
|
|
93
|
-
*/
|
|
94
|
-
export declare function buildFieldConfig(): FieldFormulaConfig;
|
|
95
|
-
|
|
96
|
-
/**
|
|
97
|
-
* Build a bracket-notation path from a root and optional extra segments.
|
|
98
|
-
* Each segment is wrapped in [\"...\"] so the path evaluator can handle
|
|
99
|
-
* any key (camelCase, spaces, hyphens, etc.) uniformly.
|
|
100
|
-
*
|
|
101
|
-
* Examples:
|
|
102
|
-
* buildFormulaPath('data.user', 'email')
|
|
103
|
-
* → 'data.user.[\"email\"]'
|
|
104
|
-
* buildFormulaPath('data.input', 'groupAssignPolicy', 'dmnKey')
|
|
105
|
-
* → 'data.input.[\"groupAssignPolicy\"].[\"dmnKey\"]'
|
|
106
|
-
* buildFormulaPath('data.trigger', 'assignee', 'email')
|
|
107
|
-
* → 'data.trigger.[\"assignee\"].[\"email\"]'
|
|
108
|
-
*/
|
|
109
|
-
export declare function buildFormulaPath(root: string, ...segments: string[]): string;
|
|
110
|
-
|
|
111
|
-
export declare function buildSelectStyles(hasError: boolean, isMulti?: boolean): StylesConfig<any, boolean, GroupBase<any>>;
|
|
112
|
-
|
|
113
|
-
/**
|
|
114
|
-
* Builds a Yup ObjectSchema from a flat FieldDescriptor[].
|
|
115
|
-
* Validates required fields and applies type-appropriate rules.
|
|
116
|
-
* Recurses into object/schema children.
|
|
117
|
-
*/
|
|
118
|
-
export declare function buildValidationSchema(fields: FieldDescriptor[]): Yup.ObjectSchema<any>;
|
|
119
|
-
|
|
120
|
-
export declare const builtInNodeTypes: NodeTypes;
|
|
121
|
-
|
|
122
|
-
export declare interface CanvasSlot {
|
|
123
|
-
id: string;
|
|
124
|
-
kind: SlotKind;
|
|
125
|
-
reactFlowType: string;
|
|
126
|
-
descriptorType?: string;
|
|
127
|
-
formData?: Record<string, unknown>;
|
|
128
|
-
nodeData?: Record<string, unknown>;
|
|
129
|
-
deletable?: boolean;
|
|
130
|
-
label?: string;
|
|
131
|
-
/** Maps branch key → display label. e.g. { pass: 'Pass', fail: 'Fail' } */
|
|
132
|
-
branchLabels?: Record<string, string>;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
export declare interface ChildRouterProps {
|
|
136
|
-
field: FieldDescriptor;
|
|
137
|
-
pathPrefix: string;
|
|
138
|
-
depth: number;
|
|
139
|
-
values: Record<string, unknown>;
|
|
140
|
-
errors: Record<string, unknown>;
|
|
141
|
-
touched: Record<string, unknown>;
|
|
142
|
-
setFieldValue: (name: string, value: unknown) => void;
|
|
143
|
-
setFieldTouched: (name: string, touched: boolean) => void;
|
|
144
|
-
compact?: boolean;
|
|
145
|
-
inlineLabel?: boolean;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
export declare interface ChipToken {
|
|
149
|
-
type: 'chip';
|
|
150
|
-
expr: string;
|
|
151
|
-
label: string;
|
|
152
|
-
path: string;
|
|
153
|
-
kind: 'de-expr' | 'path-ref';
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
/**
|
|
157
|
-
* Concatenation of multiple nodes (future).
|
|
158
|
-
* Serializes by joining all child serializations.
|
|
159
|
-
*/
|
|
160
|
-
export declare interface ConcatNode {
|
|
161
|
-
type: 'concat';
|
|
162
|
-
values: FormulaASTNode[];
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
export declare const conditionBranchDescriptor: NodeDescriptor;
|
|
166
|
-
|
|
167
|
-
/**
|
|
168
|
-
* Top-level condition config map: pathPrefix → ConditionNode[].
|
|
169
|
-
*
|
|
170
|
-
* Example:
|
|
171
|
-
* { "email": [
|
|
172
|
-
* { field: "email", operator: "isNull", value: "" },
|
|
173
|
-
* { type: "group", connector: "and", entries: [
|
|
174
|
-
* { field: "role", operator: "equals", value: "FE" },
|
|
175
|
-
* { field: "role", operator: "equals", value: "UX", connector: "or" },
|
|
176
|
-
* ]},
|
|
177
|
-
* { field: "salary", operator: "equals", value: "5000000", connector: "and" },
|
|
178
|
-
* ]
|
|
179
|
-
* }
|
|
180
|
-
*/
|
|
181
|
-
export declare type ConditionConfig = Record<string, ConditionNode[]>;
|
|
182
|
-
|
|
183
|
-
/**
|
|
184
|
-
* A single condition row (leaf node).
|
|
185
|
-
* connector: how this node joins the previous sibling ('and' | 'or'). Ignored on index 0.
|
|
186
|
-
*/
|
|
187
|
-
export declare interface ConditionEntry {
|
|
188
|
-
/** Discriminator — omit or set to 'leaf' for a plain condition row */
|
|
189
|
-
type?: 'leaf';
|
|
190
|
-
field: string;
|
|
191
|
-
fieldLabel: string;
|
|
192
|
-
operator: string;
|
|
193
|
-
value: string;
|
|
194
|
-
connector?: 'and' | 'or';
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
/**
|
|
198
|
-
* Conditional expression (future).
|
|
199
|
-
* e.g. if status == "active" then name else "unknown"
|
|
200
|
-
*/
|
|
201
|
-
export declare interface ConditionExprNode {
|
|
202
|
-
type: 'condition';
|
|
203
|
-
if: FormulaASTNode;
|
|
204
|
-
then: FormulaASTNode;
|
|
205
|
-
else: FormulaASTNode;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
/** One column in a per-field condition row */
|
|
209
|
-
export declare interface ConditionFieldDef {
|
|
210
|
-
/** Key used to store this column's value in ConditionEntry */
|
|
211
|
-
id: string;
|
|
212
|
-
/**
|
|
213
|
-
* 'select' — native <select> with user-supplied options
|
|
214
|
-
* 'operator' — native <select> pre-filled with the standard operator list (no options needed)
|
|
215
|
-
* 'text' — plain <input>
|
|
216
|
-
* any other string — falls back to <input>
|
|
217
|
-
*/
|
|
218
|
-
type: 'select' | 'operator' | 'text' | string;
|
|
219
|
-
colSpan?: number;
|
|
220
|
-
label?: string;
|
|
221
|
-
placeholder?: string;
|
|
222
|
-
/** Options for select columns — user defines these, renderer just renders them */
|
|
223
|
-
options?: Array<{
|
|
224
|
-
value: string;
|
|
225
|
-
label: string;
|
|
226
|
-
}>;
|
|
227
|
-
/** When true, renders a FormulaInput chip editor instead of a plain <input> */
|
|
228
|
-
formula?: boolean;
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
/**
|
|
232
|
-
* A parenthesised group of condition nodes.
|
|
233
|
-
* Renders as an indented, bordered block — e.g. (Role = "FE" OR Role = "UX").
|
|
234
|
-
*/
|
|
235
|
-
export declare interface ConditionGroup {
|
|
236
|
-
type: 'group';
|
|
237
|
-
entries: ConditionNode[];
|
|
238
|
-
connector?: 'and' | 'or';
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
/** Either a leaf row or a nested group */
|
|
242
|
-
export declare type ConditionNode = ConditionEntry | ConditionGroup;
|
|
243
|
-
|
|
244
|
-
declare interface ControlledProps extends FormulaProps {
|
|
245
|
-
schema: FormSchema;
|
|
246
|
-
formik: FormikProps<Record<string, unknown>>;
|
|
247
|
-
initialValues?: never;
|
|
248
|
-
onSubmit?: never;
|
|
249
|
-
children?: never;
|
|
250
|
-
form?: never;
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
export declare interface DataSourceDefinition {
|
|
254
|
-
fetch: (query: string, page: number) => Promise<DataSourceFetchResult>;
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
export declare interface DataSourceFetchResult {
|
|
258
|
-
options: TablePickerOption[];
|
|
259
|
-
hasNextPage: boolean;
|
|
260
|
-
nextPage?: number;
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
declare class DataSourceRegistry {
|
|
264
|
-
private sources;
|
|
265
|
-
register(key: string, definition: DataSourceDefinition): void;
|
|
266
|
-
get(key: string): DataSourceDefinition | undefined;
|
|
267
|
-
has(key: string): boolean;
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
export declare const dataSourceRegistry: DataSourceRegistry;
|
|
271
|
-
|
|
272
|
-
export declare const defaultFlowForgeMessages: FlowForgeMessages;
|
|
273
|
-
|
|
274
|
-
/**
|
|
275
|
-
* Build a node descriptor on top of {@link baseNodeDefaults}.
|
|
276
|
-
*
|
|
277
|
-
* Supply the four required identity fields plus only the behaviour you want to
|
|
278
|
-
* override. Everything else inherits the base.
|
|
279
|
-
*
|
|
280
|
-
* export const startEventDescriptor = defineNode({
|
|
281
|
-
* type: 'startEvent',
|
|
282
|
-
* label: 'Start',
|
|
283
|
-
* matches: (id) => id === 'start',
|
|
284
|
-
* reactFlowType: 'startNode',
|
|
285
|
-
* emitBpmnElements: (id) => [{ id, $type: 'bpmn:StartEvent' }], // override
|
|
286
|
-
* });
|
|
287
|
-
*/
|
|
288
|
-
export declare function defineNode(overrides: RequiredNodeFields & Partial<NodeDescriptor>): NodeDescriptor;
|
|
289
|
-
|
|
290
|
-
export declare interface DmnDefinition {
|
|
291
|
-
id: string;
|
|
292
|
-
[key: string]: unknown;
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
/** @deprecated Use FlowForm */
|
|
296
|
-
export declare const DynamicFormRenderer: typeof FlowForm;
|
|
297
|
-
|
|
298
|
-
/** @deprecated Use FlowFormProps */
|
|
299
|
-
export declare type DynamicFormRendererProps = FlowFormProps;
|
|
300
|
-
|
|
301
|
-
export declare const EdgeWithPlusLabel: ({ id: edgeId, sourceX, sourceY, targetX, targetY, sourcePosition, targetPosition, source, target, data, }: EdgeProps<EdgeWithPlusLabelData>) => JSX_2.Element;
|
|
302
|
-
|
|
303
|
-
export declare interface EdgeWithPlusLabelData {
|
|
304
|
-
label?: string;
|
|
305
|
-
onAddStepClick?: (sourceNodeId: string, context: AddStepContext) => void;
|
|
306
|
-
referenceNodeType?: string;
|
|
307
|
-
stepVisibility?: unknown;
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
/**
|
|
311
|
-
* End event — a fixed skeleton node with no user-editable form.
|
|
312
|
-
* The canvas seeds the main-spine end as the literal slot id `'end'`, and one
|
|
313
|
-
* end per branch as `'end-${filterId}-${branch}'` (see WorkflowCanvas.tsx).
|
|
314
|
-
* `matches` must cover both shapes so every terminal node resolves via `forId`
|
|
315
|
-
* during descriptor-driven BPMN load — otherwise branch ends get skipped.
|
|
316
|
-
*
|
|
317
|
-
* Inherits formSchema (none) and bpmnEntry/bpmnExit from the base node.
|
|
318
|
-
*/
|
|
319
|
-
export declare const endEventDescriptor: NodeDescriptor;
|
|
320
|
-
|
|
321
|
-
export declare const EndNode: () => JSX_2.Element;
|
|
322
|
-
|
|
323
|
-
export declare const errorTextStyle: React.CSSProperties;
|
|
324
|
-
|
|
325
|
-
export declare interface EvaluationConditionEntry {
|
|
326
|
-
field: string;
|
|
327
|
-
operator: string;
|
|
328
|
-
value?: string;
|
|
329
|
-
connector?: 'and' | 'or';
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
export declare interface EvaluationConditionGroup {
|
|
333
|
-
type: 'group';
|
|
334
|
-
entries: EvaluationConditionNode[];
|
|
335
|
-
connector?: 'and' | 'or';
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
export declare type EvaluationConditionNode = EvaluationConditionEntry | EvaluationConditionGroup;
|
|
339
|
-
|
|
340
|
-
export declare interface EvaluationPayload {
|
|
341
|
-
values: Record<string, unknown>;
|
|
342
|
-
conditions?: Record<string, EvaluationConditionNode[]>;
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
export declare interface ExecutionRecord {
|
|
346
|
-
id: string;
|
|
347
|
-
workflowId?: string;
|
|
348
|
-
triggeredBy?: string;
|
|
349
|
-
triggeredAt: string;
|
|
350
|
-
status: ExecutionStatus;
|
|
351
|
-
inputs?: Record<string, unknown>;
|
|
352
|
-
steps: ExecutionStep[];
|
|
353
|
-
completedAt?: string;
|
|
354
|
-
error?: string;
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
export declare type ExecutionStatus = 'running' | 'success' | 'failed' | 'cancelled';
|
|
358
|
-
|
|
359
|
-
export declare interface ExecutionStep {
|
|
360
|
-
nodeId: string;
|
|
361
|
-
nodeType?: string;
|
|
362
|
-
label?: string;
|
|
363
|
-
startedAt: string;
|
|
364
|
-
completedAt?: string;
|
|
365
|
-
status: StepStatus;
|
|
366
|
-
inputs?: Record<string, unknown>;
|
|
367
|
-
outputs?: Record<string, unknown>;
|
|
368
|
-
branchTaken?: string;
|
|
369
|
-
error?: string;
|
|
370
|
-
}
|
|
371
|
-
|
|
372
|
-
/**
|
|
373
|
-
* Extract the display label from a path expression.
|
|
374
|
-
* Prefers the last [\"key\"] bracket segment; falls back to the last dot-segment.
|
|
375
|
-
*
|
|
376
|
-
* 'data.user.[\"email\"]' → "email"
|
|
377
|
-
* 'data.input.[\"groupAssignPolicy\"].[\"dmnKey\"]' → "dmnKey"
|
|
378
|
-
* 'data.trigger.[\"assignee\"].[\"email\"]' → "email"
|
|
379
|
-
*/
|
|
380
|
-
export declare function extractLabel(path: string): string;
|
|
381
|
-
|
|
382
|
-
declare interface FetchResult {
|
|
383
|
-
options: TablePickerOption[];
|
|
384
|
-
hasNextPage: boolean;
|
|
385
|
-
nextPage?: number;
|
|
386
|
-
}
|
|
387
|
-
|
|
388
|
-
export declare const FF: {
|
|
389
|
-
readonly INPUT_HEIGHT: 38;
|
|
390
|
-
readonly INPUT_PADDING: "0 12px";
|
|
391
|
-
readonly INPUT_FONT_SIZE: 14;
|
|
392
|
-
readonly BORDER_RADIUS: 6;
|
|
393
|
-
readonly BORDER_COLOR: "#ced4da";
|
|
394
|
-
readonly BORDER_COLOR_HOVER: "#adb5bd";
|
|
395
|
-
readonly BORDER_COLOR_FOCUS: "#86b7fe";
|
|
396
|
-
readonly BORDER_COLOR_ERROR: "#dc3545";
|
|
397
|
-
readonly BORDER: "1px solid #ced4da";
|
|
398
|
-
readonly BORDER_ERROR: "1px solid #dc3545";
|
|
399
|
-
readonly FOCUS_SHADOW: "0 0 0 3px rgba(13,110,253,0.18)";
|
|
400
|
-
readonly FOCUS_SHADOW_ERROR: "0 0 0 3px rgba(220,53,69,0.18)";
|
|
401
|
-
readonly COLOR_LABEL: "#212529";
|
|
402
|
-
readonly COLOR_PLACEHOLDER: "rgba(0,0,0,0.38)";
|
|
403
|
-
readonly COLOR_HELPER: "#6c757d";
|
|
404
|
-
readonly COLOR_ERROR: "#dc3545";
|
|
405
|
-
readonly COLOR_DISABLED_BG: "#f8f9fa";
|
|
406
|
-
readonly COLOR_DISABLED_TEXT: "rgba(0,0,0,0.38)";
|
|
407
|
-
readonly FONT_SIZE_LABEL: 13;
|
|
408
|
-
readonly FONT_SIZE_INPUT: 14;
|
|
409
|
-
readonly FONT_SIZE_HELPER: 12;
|
|
410
|
-
readonly FONT_WEIGHT_LABEL: 500;
|
|
411
|
-
readonly LABEL_MB: 5;
|
|
412
|
-
readonly HELPER_MT: 4;
|
|
413
|
-
readonly FIELD_MB: 20;
|
|
414
|
-
};
|
|
415
|
-
|
|
416
|
-
export declare const FIELD_TYPE_OPTIONS: Array<{
|
|
417
|
-
value: string;
|
|
418
|
-
label: string;
|
|
419
|
-
}>;
|
|
420
|
-
|
|
421
|
-
declare type FieldComponent = ComponentType<FieldComponentProps>;
|
|
422
|
-
|
|
423
|
-
export declare interface FieldComponentProps {
|
|
424
|
-
field: FieldDescriptor;
|
|
425
|
-
value: unknown;
|
|
426
|
-
values: Record<string, unknown>;
|
|
427
|
-
onChange: (value: unknown) => void;
|
|
428
|
-
onBlur: () => void;
|
|
429
|
-
error?: string;
|
|
430
|
-
touched?: boolean;
|
|
431
|
-
/** Current formula config map (host-owned). Passed down to formula-enabled fields. */
|
|
432
|
-
formulaConfig?: FormulaConfig;
|
|
433
|
-
/** Called by a field when its formula AST changes. Host app updates its state. */
|
|
434
|
-
onFormulaConfigChange?: (config: FormulaConfig) => void;
|
|
435
|
-
/**
|
|
436
|
-
* When true: field renders label + input in a single horizontal row.
|
|
437
|
-
* Used inside ObjectField groups for compact two-column mapping layout.
|
|
438
|
-
*/
|
|
439
|
-
inlineLabel?: boolean;
|
|
440
|
-
}
|
|
441
|
-
|
|
442
|
-
/** Condition definition attached to a FieldDescriptor */
|
|
443
|
-
export declare interface FieldConditionDef {
|
|
444
|
-
fields: ConditionFieldDef[];
|
|
445
|
-
/** Enables nested condition groups. Defaults to false. */
|
|
446
|
-
allowGroups?: boolean;
|
|
447
|
-
/** Optional depth limit for nested groups when allowGroups is true. */
|
|
448
|
-
maxGroupDepth?: number;
|
|
449
|
-
}
|
|
450
|
-
|
|
451
|
-
export declare interface FieldContext {
|
|
452
|
-
values: Record<string, unknown>;
|
|
453
|
-
}
|
|
454
|
-
|
|
455
|
-
export declare interface FieldDescriptor {
|
|
456
|
-
/**
|
|
457
|
-
* The formik key for this field.
|
|
458
|
-
* Use `id` (preferred) or `name` — both are accepted.
|
|
459
|
-
* `id` takes precedence if both are provided.
|
|
460
|
-
*/
|
|
461
|
-
id?: string;
|
|
462
|
-
name?: string;
|
|
463
|
-
type: FieldType | string;
|
|
464
|
-
/** Child field descriptors — used by type: 'object' to render a nested group. */
|
|
465
|
-
children?: FieldDescriptor[];
|
|
466
|
-
/** Optional per-field condition guard — renders a condition row below this field. */
|
|
467
|
-
condition?: FieldConditionDef;
|
|
468
|
-
label?: string;
|
|
469
|
-
placeholder?: string;
|
|
470
|
-
required?: boolean;
|
|
471
|
-
showOptional?: boolean;
|
|
472
|
-
disabled?: boolean | ((ctx: FieldContext) => boolean);
|
|
473
|
-
hidden?: boolean;
|
|
474
|
-
colSpan?: number;
|
|
475
|
-
dividerAfter?: boolean;
|
|
476
|
-
info?: string;
|
|
477
|
-
helperText?: string;
|
|
478
|
-
dataTestId?: string;
|
|
479
|
-
validation?: AnySchema;
|
|
480
|
-
shouldHide?: (ctx: FieldContext) => boolean;
|
|
481
|
-
shouldDisable?: (ctx: FieldContext) => boolean;
|
|
482
|
-
shouldRequire?: (ctx: FieldContext) => boolean;
|
|
483
|
-
compute?: (ctx: FieldContext) => unknown;
|
|
484
|
-
transform?: FieldTransform;
|
|
485
|
-
onChange?: (value: unknown, ctx: FieldContext & {
|
|
486
|
-
setFieldValue: (name: string, value: unknown) => void;
|
|
487
|
-
}) => void;
|
|
488
|
-
[key: string]: unknown;
|
|
489
|
-
}
|
|
490
|
-
|
|
491
|
-
/**
|
|
492
|
-
* Presence marker for a field that has formula config enabled.
|
|
493
|
-
* When a field's formula config toggle is ON, its key appears in FormulaConfig
|
|
494
|
-
* with an empty object value. The backend uses this to detect that the value
|
|
495
|
-
* stored in Formik was serialized as _P('...') rather than _DE_{_P('...')}.
|
|
496
|
-
*
|
|
497
|
-
* Example: { "dmnKey": {} }
|
|
498
|
-
*/
|
|
499
|
-
export declare type FieldFormulaConfig = Record<string, never>;
|
|
500
|
-
|
|
501
|
-
export declare const fieldRegistry: {
|
|
502
|
-
register(type: string, component: FieldComponent): void;
|
|
503
|
-
get(type: string): FieldComponent | undefined;
|
|
504
|
-
has(type: string): boolean;
|
|
505
|
-
};
|
|
506
|
-
|
|
507
|
-
/** Optional pre-defined field suggestions (e.g. common fields for this node type) */
|
|
508
|
-
export declare interface FieldSuggestion {
|
|
509
|
-
label: string;
|
|
510
|
-
field: FieldDescriptor;
|
|
511
|
-
}
|
|
512
|
-
|
|
513
|
-
export declare interface FieldTransform {
|
|
514
|
-
in?: (value: unknown) => unknown;
|
|
515
|
-
out?: (value: unknown) => unknown;
|
|
516
|
-
}
|
|
517
|
-
|
|
518
|
-
export declare type FieldType = 'text' | 'textarea' | 'number' | 'toggle' | 'radio-group' | 'select' | 'descriptive-select' | 'key-value' | 'array' | 'object' | 'reference' | 'cron' | 'schema';
|
|
519
|
-
|
|
520
|
-
export declare const FilterNode: ({ id, data }: NodeProps) => JSX_2.Element;
|
|
521
|
-
|
|
522
|
-
declare interface FixedEdge {
|
|
523
|
-
id: string;
|
|
524
|
-
source: string;
|
|
525
|
-
target: string;
|
|
526
|
-
}
|
|
527
|
-
|
|
528
|
-
declare interface FixedNode {
|
|
529
|
-
id: string;
|
|
530
|
-
type: string;
|
|
531
|
-
data?: Record<string, unknown>;
|
|
532
|
-
deletable?: false;
|
|
533
|
-
}
|
|
534
|
-
|
|
535
|
-
declare const FlowForgeCanvas: ({ nodeRegistry, templateRegistry, initialValue, nodeTypes: consumerNodeTypes, edgeTypes: consumerEdgeTypes, onSave, readOnly, theme, messages: messageOverrides, canvasOptions, renderTriggerSelector, loadTriggerSources, renderNodePicker, renderNodeConfig, onNodeClick: onNodeClickProp, maxNodes, layoutDirection, executionRecord, onFetchWorkflow, }: FlowForgeCanvasProps) => JSX_2.Element;
|
|
536
|
-
export { FlowForgeCanvas }
|
|
537
|
-
export { FlowForgeCanvas as WorkflowCanvas }
|
|
538
|
-
|
|
539
|
-
/** All ReactFlow behaviour settings — serialisable as JSON config */
|
|
540
|
-
export declare interface FlowForgeCanvasOptions {
|
|
541
|
-
/** Fit the whole graph into view on mount. Default: true */
|
|
542
|
-
fitView?: boolean;
|
|
543
|
-
fitViewPadding?: number;
|
|
544
|
-
/** Show the zoom-in / zoom-out / fit controls. Default: true */
|
|
545
|
-
showControls?: boolean;
|
|
546
|
-
/** Show the mini-map overview. Default: false */
|
|
547
|
-
showMiniMap?: boolean;
|
|
548
|
-
/** Pan the canvas by scrolling (no Ctrl needed). Default: true */
|
|
549
|
-
panOnScroll?: boolean;
|
|
550
|
-
/** Zoom with the scroll wheel. Default: false */
|
|
551
|
-
zoomOnScroll?: boolean;
|
|
552
|
-
minZoom?: number;
|
|
553
|
-
maxZoom?: number;
|
|
554
|
-
/** Snap nodes to a grid while dragging. Default: false */
|
|
555
|
-
snapToGrid?: boolean;
|
|
556
|
-
snapGrid?: [number, number];
|
|
557
|
-
/**
|
|
558
|
-
* How branches under a conditional/gateway node are arranged.
|
|
559
|
-
* 'horizontal' (default): branches spread side-by-side (Dagre).
|
|
560
|
-
* 'vertical': branches stack top-to-bottom, indented right under their parent (Workato style).
|
|
561
|
-
*/
|
|
562
|
-
branchLayout?: 'horizontal' | 'vertical';
|
|
563
|
-
/**
|
|
564
|
-
* How much of a node's data to show on its card.
|
|
565
|
-
* 'full' (default): show configured value badges / the descriptor's custom body.
|
|
566
|
-
* 'title-only': show just the node title — for teams that want minimal cards.
|
|
567
|
-
*/
|
|
568
|
-
nodeBody?: 'full' | 'title-only';
|
|
569
|
-
}
|
|
570
|
-
|
|
571
|
-
export declare interface FlowForgeCanvasProps {
|
|
572
|
-
nodeRegistry: NodeTypeRegistry;
|
|
573
|
-
templateRegistry: TemplateRegistry;
|
|
574
|
-
/** Pre-populate the canvas from a previously saved WorkflowState. */
|
|
575
|
-
initialValue?: WorkflowState;
|
|
576
|
-
nodeTypes?: NodeTypes;
|
|
577
|
-
edgeTypes?: EdgeTypes;
|
|
578
|
-
onSave?: (workflow: WorkflowState) => void;
|
|
579
|
-
/** Disables all editing — no add/delete/config, edges have no "+" button */
|
|
580
|
-
readOnly?: boolean;
|
|
581
|
-
/** Brand colors applied across edges, plus button, and node accents */
|
|
582
|
-
theme?: FlowForgeTheme;
|
|
583
|
-
/** Built-in UI labels for i18n/white-label copy. */
|
|
584
|
-
messages?: Partial<FlowForgeMessages>;
|
|
585
|
-
/** ReactFlow behaviour settings — all serialisable as plain JSON */
|
|
586
|
-
canvasOptions?: FlowForgeCanvasOptions;
|
|
587
|
-
/** Replace the trigger selector UI entirely */
|
|
588
|
-
renderTriggerSelector?: (templates: WorkflowTemplate[], onSelect: (t: WorkflowTemplate) => void, onClose: () => void) => default_2.ReactNode;
|
|
589
|
-
/**
|
|
590
|
-
* Optional async loader for trigger sources. When provided, the default
|
|
591
|
-
* trigger selector goes to a second stage after the user picks a trigger:
|
|
592
|
-
* the loader is called with the trigger's key, and if it returns a non-empty
|
|
593
|
-
* list, the user picks one or more sources before the canvas is seeded.
|
|
594
|
-
* Picked sources are merged into the trigger node's `nodeData.sources` so
|
|
595
|
-
* TriggerNode can render the "via [chip] [chip]" line.
|
|
596
|
-
*
|
|
597
|
-
* Return `[]` for triggers that have no sources — stage 2 is skipped.
|
|
598
|
-
*/
|
|
599
|
-
loadTriggerSources?: (triggerKey: string) => Promise<Array<{
|
|
600
|
-
label: string;
|
|
601
|
-
value: string;
|
|
602
|
-
}>>;
|
|
603
|
-
/** Replace the node picker UI entirely */
|
|
604
|
-
renderNodePicker?: (descriptors: NodeDescriptor[], onSelect: (d: NodeDescriptor) => void, onClose: () => void) => default_2.ReactNode;
|
|
605
|
-
/** Replace the node config drawer entirely */
|
|
606
|
-
renderNodeConfig?: (descriptor: NodeDescriptor | undefined, slot: CanvasSlot | null, onSave: (id: string, values: Record<string, unknown>) => void, onClose: () => void) => default_2.ReactNode;
|
|
607
|
-
/** Intercept node click — return true to suppress default behaviour */
|
|
608
|
-
onNodeClick?: (slot: CanvasSlot) => boolean | void;
|
|
609
|
-
/** Global cap on total user task nodes */
|
|
610
|
-
maxNodes?: number;
|
|
611
|
-
/** Flow layout direction. 'TB' = top-to-bottom (default), 'LR' = left-to-right */
|
|
612
|
-
layoutDirection?: 'TB' | 'LR';
|
|
613
|
-
/**
|
|
614
|
-
* When provided, renders an execution overlay on the canvas nodes:
|
|
615
|
-
* green = success, red = failed, grey = skipped/pending.
|
|
616
|
-
* Combine with readOnly=true to show a past run without editing.
|
|
617
|
-
*/
|
|
618
|
-
executionRecord?: ExecutionRecord;
|
|
619
|
-
/**
|
|
620
|
-
* Called when a SubWorkflowNode's "Preview" button is clicked.
|
|
621
|
-
* Return the WorkflowState for the given workflowId to render it in a drawer.
|
|
622
|
-
*/
|
|
623
|
-
onFetchWorkflow?: (workflowId: string) => Promise<WorkflowState>;
|
|
624
|
-
}
|
|
625
|
-
|
|
626
|
-
export declare interface FlowForgeFieldDefinition {
|
|
627
|
-
/** The unique type identifier (e.g. 'text', 'image-upload') */
|
|
628
|
-
type: string;
|
|
629
|
-
/** The display name for the field picker dropdown */
|
|
630
|
-
label: string;
|
|
631
|
-
/**
|
|
632
|
-
* The component used to render the field in the live form.
|
|
633
|
-
* If omitted, relies on a previously registered component in DynamicFormRenderer.
|
|
634
|
-
*/
|
|
635
|
-
component?: ComponentType<FieldComponentProps>;
|
|
636
|
-
/**
|
|
637
|
-
* Instead of a React component, you provide a FlowForm schema!
|
|
638
|
-
* The Schema Builder Modal will automatically render this schema
|
|
639
|
-
* to ask the user for configuration settings.
|
|
640
|
-
*/
|
|
641
|
-
configSchema?: {
|
|
642
|
-
fields: FieldDescriptor[];
|
|
643
|
-
};
|
|
644
|
-
/**
|
|
645
|
-
* Validation builder for this field type.
|
|
646
|
-
*/
|
|
647
|
-
buildValidation?: (field: FieldDescriptor) => Yup.Schema;
|
|
648
|
-
}
|
|
649
|
-
|
|
650
|
-
export declare interface FlowForgeMessages {
|
|
651
|
-
addTriggerTitle: string;
|
|
652
|
-
addTriggerTooltip: string;
|
|
653
|
-
addTriggerButton: string;
|
|
654
|
-
chooseTrigger: string;
|
|
655
|
-
noTriggers: string;
|
|
656
|
-
addStepTitle: string;
|
|
657
|
-
chooseAction: string;
|
|
658
|
-
noActions: string;
|
|
659
|
-
configureStep: string;
|
|
660
|
-
loadingConfiguration: string;
|
|
661
|
-
noConfigurationNeeded: string;
|
|
662
|
-
save: string;
|
|
663
|
-
cancel: string;
|
|
664
|
-
}
|
|
665
|
-
|
|
666
|
-
export declare const FlowForgeRegistry: Registry;
|
|
667
|
-
|
|
668
|
-
export declare interface FlowForgeTheme {
|
|
669
|
-
primaryColor?: string;
|
|
670
|
-
edgeColor?: string;
|
|
671
|
-
textColor?: string;
|
|
672
|
-
mutedTextColor?: string;
|
|
673
|
-
surfaceColor?: string;
|
|
674
|
-
borderColor?: string;
|
|
675
|
-
dangerColor?: string;
|
|
676
|
-
borderRadius?: number;
|
|
677
|
-
fontFamily?: string;
|
|
678
|
-
/** ReactFlow canvas background style. 'none' hides the background entirely. Default: 'dots' */
|
|
679
|
-
background?: 'dots' | 'lines' | 'cross' | 'none';
|
|
680
|
-
/** Background dot/line color. Default: '#e0e0e0' */
|
|
681
|
-
backgroundColor?: string;
|
|
682
|
-
}
|
|
683
|
-
|
|
684
|
-
export declare function FlowForm(props: FlowFormProps): JSX_2.Element;
|
|
685
|
-
|
|
686
|
-
export declare interface FlowFormInstance {
|
|
687
|
-
values: Record<string, unknown>;
|
|
688
|
-
errors: Record<string, unknown>;
|
|
689
|
-
isValid: boolean;
|
|
690
|
-
isDirty: boolean;
|
|
691
|
-
isSubmitting: boolean;
|
|
692
|
-
formulaConfig: FormulaConfig;
|
|
693
|
-
conditionConfig: ConditionConfig;
|
|
694
|
-
/** Validate and submit — safe to call from any button outside the form. */
|
|
695
|
-
submit: () => void;
|
|
696
|
-
reset: (nextValues?: Record<string, unknown>) => void;
|
|
697
|
-
setFieldValue: (field: string, value: unknown) => void;
|
|
698
|
-
_schema: FormSchema;
|
|
699
|
-
_formik: ReturnType<typeof useFormik<Record<string, unknown>>>;
|
|
700
|
-
_formulaConfig: FormulaConfig;
|
|
701
|
-
_onFormulaConfigChange: (config: FormulaConfig) => void;
|
|
702
|
-
_conditionConfig: ConditionConfig;
|
|
703
|
-
_onConditionConfigChange: (config: ConditionConfig) => void;
|
|
704
|
-
}
|
|
705
|
-
|
|
706
|
-
export declare type FlowFormProps = UncontrolledProps | ControlledProps | HookProps;
|
|
707
|
-
|
|
708
|
-
declare type FormLayout = 'flat' | 'stepper' | 'tabs' | 'sections';
|
|
709
|
-
|
|
710
|
-
export declare interface FormSchema {
|
|
711
|
-
layout?: FormLayout;
|
|
712
|
-
/**
|
|
713
|
-
* Removes the bottom margin on every field.
|
|
714
|
-
* Use for filter bars and inline forms where fields sit in a tight horizontal row.
|
|
715
|
-
*/
|
|
716
|
-
compact?: boolean;
|
|
717
|
-
fields?: FieldDescriptor[];
|
|
718
|
-
steps?: FormStep[];
|
|
719
|
-
}
|
|
720
|
-
|
|
721
|
-
declare interface FormStep {
|
|
722
|
-
label: string;
|
|
723
|
-
hint?: string;
|
|
724
|
-
fields: FieldDescriptor[];
|
|
725
|
-
}
|
|
726
|
-
|
|
727
|
-
/** Union of all AST node types */
|
|
728
|
-
export declare type FormulaASTNode = TextNode | PathRefNode | ConcatNode | FunctionNode | ConditionExprNode;
|
|
729
|
-
|
|
730
|
-
/**
|
|
731
|
-
* Top-level formula config map: fieldId → FieldFormulaConfig (empty marker {}).
|
|
732
|
-
* A key is present only when that field's formula config toggle is ON.
|
|
733
|
-
*
|
|
734
|
-
* When toggle is OFF: field key absent, Formik value = _DE_{_P('...')}
|
|
735
|
-
* When toggle is ON: field key present as {}, Formik value = _P('...')
|
|
736
|
-
*
|
|
737
|
-
* Example: { "dmnKey": {} }
|
|
738
|
-
*/
|
|
739
|
-
export declare type FormulaConfig = Record<string, FieldFormulaConfig>;
|
|
740
|
-
|
|
741
|
-
export declare function FormulaInput({ expression, onExpressionChange, onBlur, placeholder, disabled, error, id, formulaConfigEnabled, onFormulaConfigToggle, onPickerOpen, compact, }: FormulaInputProps): JSX_2.Element;
|
|
742
|
-
|
|
743
|
-
export declare interface FormulaInputProps {
|
|
744
|
-
/** AST — source of truth. Host app owns this. */
|
|
745
|
-
expression: FormulaASTNode[];
|
|
746
|
-
/** Called with the new AST on every edit. */
|
|
747
|
-
onExpressionChange: (nodes: FormulaASTNode[]) => void;
|
|
748
|
-
onBlur?: () => void;
|
|
749
|
-
placeholder?: string;
|
|
750
|
-
disabled?: boolean;
|
|
751
|
-
error?: boolean;
|
|
752
|
-
id?: string;
|
|
753
|
-
/** Whether formulaConfig emission is active (controls the { } toggle highlight). */
|
|
754
|
-
formulaConfigEnabled?: boolean;
|
|
755
|
-
/** Called when user clicks the { } toggle button. */
|
|
756
|
-
onFormulaConfigToggle?: () => void;
|
|
757
|
-
/** Future: open variable picker drawer. */
|
|
758
|
-
onPickerOpen?: () => void;
|
|
759
|
-
/** Compact mode — reduces height/padding to match native form controls in tight rows. */
|
|
760
|
-
compact?: boolean;
|
|
761
|
-
}
|
|
762
|
-
|
|
763
|
-
declare interface FormulaProps {
|
|
764
|
-
formulaConfig?: FormulaConfig;
|
|
765
|
-
onFormulaConfigChange?: (config: FormulaConfig) => void;
|
|
766
|
-
/**
|
|
767
|
-
* Optional variable groups for the built-in Smart Values picker.
|
|
768
|
-
* When provided, DynamicFormRenderer automatically wraps itself in
|
|
769
|
-
* VariablePickerProvider — every FormulaInput gets a picker button and
|
|
770
|
-
* drag-and-drop support with no extra setup from the host.
|
|
771
|
-
*
|
|
772
|
-
* For advanced layout control (picker rendered elsewhere on the page),
|
|
773
|
-
* wrap with <VariablePickerProvider> manually instead.
|
|
774
|
-
*/
|
|
775
|
-
variableGroups?: VariableGroup[];
|
|
776
|
-
/** Active per-field condition guards. Key = field pathPrefix. */
|
|
777
|
-
conditionConfig?: ConditionConfig;
|
|
778
|
-
onConditionConfigChange?: (config: ConditionConfig) => void;
|
|
779
|
-
}
|
|
780
|
-
|
|
781
|
-
export declare type FormulaToken = TextToken | ChipToken;
|
|
782
|
-
|
|
783
|
-
/**
|
|
784
|
-
* A built-in function call (future).
|
|
785
|
-
* e.g. upcase, format_date, number_to_text
|
|
786
|
-
*/
|
|
787
|
-
export declare interface FunctionNode {
|
|
788
|
-
type: 'function';
|
|
789
|
-
name: string;
|
|
790
|
-
args: FormulaASTNode[];
|
|
791
|
-
}
|
|
792
|
-
|
|
793
|
-
/** True if the string contains at least one formula token. */
|
|
794
|
-
export declare function hasFormulaTokens(value: unknown): boolean;
|
|
795
|
-
|
|
796
|
-
export declare const helperTextStyle: React.CSSProperties;
|
|
797
|
-
|
|
798
|
-
/** Props when using the useFlowForm() hook — simplest API. */
|
|
799
|
-
declare interface HookProps {
|
|
800
|
-
form: FlowFormInstance;
|
|
801
|
-
schema?: never;
|
|
802
|
-
formik?: never;
|
|
803
|
-
initialValues?: never;
|
|
804
|
-
onSubmit?: never;
|
|
805
|
-
formulaConfig?: never;
|
|
806
|
-
onFormulaConfigChange?: never;
|
|
807
|
-
conditionConfig?: never;
|
|
808
|
-
onConditionConfigChange?: never;
|
|
809
|
-
variableGroups?: never;
|
|
810
|
-
children?: never;
|
|
811
|
-
}
|
|
812
|
-
|
|
813
|
-
export declare interface InfiniteOption {
|
|
814
|
-
value: string;
|
|
815
|
-
label: string;
|
|
816
|
-
[key: string]: unknown;
|
|
817
|
-
}
|
|
818
|
-
|
|
819
|
-
export declare function InfiniteSelectField({ field: rawField, value, onChange, onBlur, error, touched, }: FieldComponentProps): JSX_2.Element;
|
|
820
|
-
|
|
821
|
-
export declare function inputStyle(opts: {
|
|
822
|
-
hasError?: boolean;
|
|
823
|
-
isDisabled?: boolean;
|
|
824
|
-
extraStyle?: React.CSSProperties;
|
|
825
|
-
}): React.CSSProperties;
|
|
826
|
-
|
|
827
|
-
/**
|
|
828
|
-
* Context passed to `NodeDescriptor.canInsert(ctx)` describing where on the
|
|
829
|
-
* canvas the user clicked "+ Add step". Used by position-aware insertion rules.
|
|
830
|
-
*/
|
|
831
|
-
declare interface InsertContext {
|
|
832
|
-
/** The slot the user clicked under (the one whose "+" edge was clicked). */
|
|
833
|
-
insertAfterSlot: CanvasSlot | null;
|
|
834
|
-
/** Every slot before the insertion point, including the click slot.
|
|
835
|
-
* When inside a branch: spine up to + including the branching parent, then
|
|
836
|
-
* the branch's own slots up to the insertion point. */
|
|
837
|
-
upstreamSlots: CanvasSlot[];
|
|
838
|
-
/** Every slot after the insertion point in the same chain. */
|
|
839
|
-
downstreamSlots: CanvasSlot[];
|
|
840
|
-
/** Branch context, if the insertion is happening inside a branch. */
|
|
841
|
-
branch: {
|
|
842
|
-
filterId: string;
|
|
843
|
-
branch: string;
|
|
844
|
-
} | null;
|
|
845
|
-
/** The currently active template (the one whose trigger is in use). */
|
|
846
|
-
template: WorkflowTemplate | null;
|
|
847
|
-
}
|
|
848
|
-
|
|
849
|
-
export declare function isFormula(value: unknown): value is string;
|
|
850
|
-
|
|
851
|
-
export declare interface LoadPageParams {
|
|
852
|
-
page: number;
|
|
853
|
-
search: string;
|
|
854
|
-
signal: AbortSignal;
|
|
855
|
-
}
|
|
856
|
-
|
|
857
|
-
export declare interface LoadPageResult {
|
|
858
|
-
options: InfiniteOption[];
|
|
859
|
-
hasMore: boolean;
|
|
860
|
-
}
|
|
861
|
-
|
|
862
|
-
export declare function loadWorkflowFromBpmn(xml: string): WorkflowState;
|
|
863
|
-
|
|
864
|
-
export declare function makeSubWorkflowDescriptor(opts?: SubWorkflowDescriptorOptions): NodeDescriptor;
|
|
865
|
-
|
|
866
|
-
export declare interface NodeDescriptor {
|
|
867
|
-
type: string;
|
|
868
|
-
label: string;
|
|
869
|
-
icon?: ReactNode;
|
|
870
|
-
/**
|
|
871
|
-
* Optional "app" this action belongs to (Slack, Salesforce, …). When present,
|
|
872
|
-
* the node picker drills down: stage 1 lists unique apps, stage 2 lists this
|
|
873
|
-
* app's actions, stage 3 is the action's config form. Descriptors without an
|
|
874
|
-
* `app` field appear ungrouped at stage 1, alongside the app cards.
|
|
875
|
-
*/
|
|
876
|
-
app?: {
|
|
877
|
-
key: string;
|
|
878
|
-
label: string;
|
|
879
|
-
icon?: ReactNode;
|
|
880
|
-
description?: string;
|
|
881
|
-
};
|
|
882
|
-
matches: (id: string) => boolean;
|
|
883
|
-
bpmnEntry: (nodeId: string) => string;
|
|
884
|
-
bpmnExit: (nodeId: string) => string;
|
|
885
|
-
emitBpmnElements: (nodeId: string, nodeData: unknown) => BpmnElement[];
|
|
886
|
-
emitDmnDefinition?: (nodeId: string, nodeData: unknown) => DmnDefinition;
|
|
887
|
-
outgoingCondition?: (nodeId: string, targetId: string, nodeData: unknown) => string;
|
|
888
|
-
reactFlowType: string;
|
|
889
|
-
previewNodeType?: string;
|
|
890
|
-
/**
|
|
891
|
-
* Optional custom node-card body. When provided, the node renderer shows this
|
|
892
|
-
* instead of the default value badges — lets a node author fully design the
|
|
893
|
-
* card body while keeping the shared frame (title, edit/delete, handles).
|
|
894
|
-
* Receives the node's saved formData.
|
|
895
|
-
*/
|
|
896
|
-
renderNode?: (nodeData: Record<string, unknown>) => ReactNode;
|
|
897
|
-
/**
|
|
898
|
-
* Position constraint — this descriptor can be inserted only if at least ONE
|
|
899
|
-
* of the listed tokens appears in the upstream chain of the click site.
|
|
900
|
-
* Tokens can be a descriptorType (e.g. 'createUserTask'), a slot id
|
|
901
|
-
* (e.g. 'event-userCreated'), or a slot kind (e.g. 'triggerFixed').
|
|
902
|
-
* Ignored when `canInsert` is set.
|
|
903
|
-
*/
|
|
904
|
-
insertAfter?: string[];
|
|
905
|
-
/**
|
|
906
|
-
* Symmetric — must appear DOWNSTREAM of the click site. Same token rules
|
|
907
|
-
* as `insertAfter`. Ignored when `canInsert` is set.
|
|
908
|
-
*/
|
|
909
|
-
insertBefore?: string[];
|
|
910
|
-
/**
|
|
911
|
-
* Full custom rule. Overrides `insertAfter` / `insertBefore`. Receives the
|
|
912
|
-
* click context (upstream/downstream slots, branch info, active template);
|
|
913
|
-
* returns `true` to allow the descriptor at this insertion point.
|
|
914
|
-
*/
|
|
915
|
-
canInsert?: (ctx: InsertContext) => boolean;
|
|
916
|
-
/** Maps branch key → display label. e.g. { pass: 'Pass', fail: 'Fail' }. Only applies to branching nodes (filterNode, approvalNode). */
|
|
917
|
-
branchLabels?: Record<string, string>;
|
|
918
|
-
formSchema: FieldDescriptor[] | ((nodeId: string) => Promise<FieldDescriptor[]>);
|
|
919
|
-
maxPerWorkflow?: number;
|
|
920
|
-
relatedNodePrefixes?: string[];
|
|
921
|
-
}
|
|
922
|
-
|
|
923
|
-
export declare class NodeTypeRegistry {
|
|
924
|
-
private descriptors;
|
|
925
|
-
register(descriptor: NodeDescriptor): this;
|
|
926
|
-
forType(type: string): NodeDescriptor | undefined;
|
|
927
|
-
forId(id: string): NodeDescriptor | undefined;
|
|
928
|
-
list(): NodeDescriptor[];
|
|
929
|
-
}
|
|
930
|
-
|
|
931
|
-
export declare const nodeTypeRegistry: NodeTypeRegistry;
|
|
932
|
-
|
|
933
|
-
export declare interface NotificationChannelConfig {
|
|
934
|
-
label: string;
|
|
935
|
-
/** Fetch recipients/channels for this notification channel at runtime */
|
|
936
|
-
fetchRecipients?: () => Promise<NotificationChannelOption[]>;
|
|
937
|
-
}
|
|
938
|
-
|
|
939
|
-
export declare interface NotificationChannelOption {
|
|
940
|
-
value: string;
|
|
941
|
-
label: string;
|
|
942
|
-
}
|
|
943
|
-
|
|
944
|
-
declare class NotificationChannelRegistry {
|
|
945
|
-
private channels;
|
|
946
|
-
register(key: string, config: NotificationChannelConfig): void;
|
|
947
|
-
get(key: string): NotificationChannelConfig | undefined;
|
|
948
|
-
list(): Array<{
|
|
949
|
-
key: string;
|
|
950
|
-
} & NotificationChannelConfig>;
|
|
951
|
-
has(key: string): boolean;
|
|
952
|
-
}
|
|
953
|
-
|
|
954
|
-
export declare const notificationChannelRegistry: NotificationChannelRegistry;
|
|
955
|
-
|
|
956
|
-
export declare const notificationDescriptor: NodeDescriptor;
|
|
957
|
-
|
|
958
|
-
export declare interface ObjectFieldRendererProps {
|
|
959
|
-
field: FieldDescriptor;
|
|
960
|
-
pathPrefix: string;
|
|
961
|
-
depth: number;
|
|
962
|
-
values: Record<string, unknown>;
|
|
963
|
-
errors: Record<string, unknown>;
|
|
964
|
-
touched: Record<string, unknown>;
|
|
965
|
-
setFieldValue: (name: string, value: unknown) => void;
|
|
966
|
-
setFieldTouched: (name: string, touched: boolean) => void;
|
|
967
|
-
compact?: boolean;
|
|
968
|
-
renderFieldRouter: (props: ChildRouterProps) => default_2.ReactNode;
|
|
969
|
-
}
|
|
970
|
-
|
|
971
|
-
export declare const offboardingSkeleton: WorkflowState;
|
|
972
|
-
|
|
973
|
-
/**
|
|
974
|
-
* Parse a raw backend string into an AST node array.
|
|
975
|
-
*
|
|
976
|
-
* "Hello _DE_{_P('data.input.[\"dmnKey\"]')} world"
|
|
977
|
-
* →
|
|
978
|
-
* [
|
|
979
|
-
* { type: 'text', value: 'Hello ' },
|
|
980
|
-
* { type: 'path-ref', path: 'data.input.["dmnKey"]', label: 'dmnKey' },
|
|
981
|
-
* { type: 'text', value: ' world' },
|
|
982
|
-
* ]
|
|
983
|
-
*/
|
|
984
|
-
/**
|
|
985
|
-
* Parse a raw backend string into an AST node array.
|
|
986
|
-
*
|
|
987
|
-
* configEnabled = false (default): only _DE_{_P(...)} tokens become chips.
|
|
988
|
-
* _P('...') without the DE wrapper stays as plain text.
|
|
989
|
-
* configEnabled = true: both _DE_{_P(...)} and _P('...') become chips.
|
|
990
|
-
*/
|
|
991
|
-
export declare function parseToAST(raw: string, configEnabled?: boolean): FormulaASTNode[];
|
|
992
|
-
|
|
993
|
-
/**
|
|
994
|
-
* A reference to a value from a previous node's output.
|
|
995
|
-
* Serializes to: _DE_{_P('path')}
|
|
996
|
-
*
|
|
997
|
-
* Example:
|
|
998
|
-
* path: "data.input.[\"groupAssignPolicy\"].[\"dmnKey\"]"
|
|
999
|
-
* label: "dmnKey" ← last ["key"] segment, for display
|
|
1000
|
-
*/
|
|
1001
|
-
export declare interface PathRefNode {
|
|
1002
|
-
type: 'path-ref';
|
|
1003
|
-
path: string;
|
|
1004
|
-
label: string;
|
|
1005
|
-
}
|
|
1006
|
-
|
|
1007
|
-
declare class Registry {
|
|
1008
|
-
private fields;
|
|
1009
|
-
constructor();
|
|
1010
|
-
register(def: FlowForgeFieldDefinition): void;
|
|
1011
|
-
get(type: string): FlowForgeFieldDefinition | undefined;
|
|
1012
|
-
getAll(): FlowForgeFieldDefinition[];
|
|
1013
|
-
/** Gets all allowed options for the Type Picker in SchemaBuilder */
|
|
1014
|
-
getTypeOptions(): Array<{
|
|
1015
|
-
value: string;
|
|
1016
|
-
label: string;
|
|
1017
|
-
}>;
|
|
1018
|
-
}
|
|
1019
|
-
|
|
1020
|
-
/** The fields every node MUST provide — there is no sensible default for these. */
|
|
1021
|
-
declare type RequiredNodeFields = Pick<NodeDescriptor, 'type' | 'label' | 'matches' | 'reactFlowType'>;
|
|
1022
|
-
|
|
1023
|
-
export declare const restApiDescriptor: NodeDescriptor;
|
|
1024
|
-
|
|
1025
|
-
export declare const RestApiNode: ({ id, data }: NodeProps) => JSX_2.Element;
|
|
1026
|
-
|
|
1027
|
-
export declare function saveWorkflowToBpmn(workflow: WorkflowState, options?: BpmnSaveOptions): string;
|
|
1028
|
-
|
|
1029
|
-
export declare function SchemaBuilder({ value, onChange, suggestions, label, onPayload, validate, onValidityChange, variableGroups, initialValues: initialValuesProp, initialFormulaConfig, initialConditionConfig, }: SchemaBuilderProps): JSX_2.Element;
|
|
1030
|
-
|
|
1031
|
-
export declare function SchemaBuilderDrawer({ value, onChange, suggestions, onPayload, onDone, validate, onValidityChange, label, drawerTitle, drawerWidth, }: SchemaBuilderDrawerProps): JSX_2.Element;
|
|
1032
|
-
|
|
1033
|
-
export declare interface SchemaBuilderDrawerProps extends SchemaBuilderProps {
|
|
1034
|
-
label?: string;
|
|
1035
|
-
drawerTitle?: string;
|
|
1036
|
-
drawerWidth?: number;
|
|
1037
|
-
/**
|
|
1038
|
-
* Fired when the user clicks Done.
|
|
1039
|
-
* @param schema Save this to DB — pass it back to FlowForm/SchemaBuilder to restore the form
|
|
1040
|
-
* @param payload Send this to backend — contains conditionExpressions, formulaConfig, values, evaluationPayload
|
|
1041
|
-
*/
|
|
1042
|
-
onDone?: (schema: FieldDescriptor[], payload: SchemaBuilderPayload | null) => void;
|
|
1043
|
-
}
|
|
1044
|
-
|
|
1045
|
-
export declare interface SchemaBuilderPayload {
|
|
1046
|
-
/** The FieldDescriptor[] schema — save this to DB to restore the editor */
|
|
1047
|
-
schema: FieldDescriptor[];
|
|
1048
|
-
/** Formula AST per field — part of editor state */
|
|
1049
|
-
formulaConfig: FormulaConfig;
|
|
1050
|
-
/** Condition rows per field — part of editor state */
|
|
1051
|
-
conditionConfig: ConditionConfig;
|
|
1052
|
-
/** Serialized condition expression string per field — ready for backend rule engine */
|
|
1053
|
-
conditionExpressions: Record<string, string>;
|
|
1054
|
-
/** Live form values entered by the user */
|
|
1055
|
-
values: Record<string, unknown>;
|
|
1056
|
-
/** Backend-ready evaluation payload (formulas resolved against values) */
|
|
1057
|
-
evaluationPayload: ReturnType<typeof buildEvaluationPayload>;
|
|
1058
|
-
}
|
|
1059
|
-
|
|
1060
|
-
export declare interface SchemaBuilderProps {
|
|
1061
|
-
value: FieldDescriptor[];
|
|
1062
|
-
onChange: (fields: FieldDescriptor[]) => void;
|
|
1063
|
-
suggestions?: FieldSuggestion[];
|
|
1064
|
-
label?: string;
|
|
1065
|
-
/** Fires on every change: schema edit, value input, formula/condition update */
|
|
1066
|
-
onPayload?: (payload: SchemaBuilderPayload) => void;
|
|
1067
|
-
/** Whether to auto-validate required fields (shows inline error messages) */
|
|
1068
|
-
validate?: boolean;
|
|
1069
|
-
/** Called whenever form validity changes — wire to enable/disable your Save button */
|
|
1070
|
-
onValidityChange?: (isValid: boolean) => void;
|
|
1071
|
-
/** Optional variable groups to seamlessly enable the Variable Picker for formula fields */
|
|
1072
|
-
variableGroups?: VariableGroup[];
|
|
1073
|
-
/** Saved form values to restore when reopening — keys match field ids */
|
|
1074
|
-
initialValues?: Record<string, unknown>;
|
|
1075
|
-
/** Saved formula config to restore when reopening */
|
|
1076
|
-
initialFormulaConfig?: FormulaConfig;
|
|
1077
|
-
/** Saved condition config to restore when reopening */
|
|
1078
|
-
initialConditionConfig?: ConditionConfig;
|
|
1079
|
-
}
|
|
1080
|
-
|
|
1081
|
-
/**
|
|
1082
|
-
* Serialize an AST back to the backend expression string.
|
|
1083
|
-
* path-ref nodes always serialize as _DE_{_P('...')} (the evaluated form).
|
|
1084
|
-
*
|
|
1085
|
-
* [
|
|
1086
|
-
* { type: 'text', value: 'Hello ' },
|
|
1087
|
-
* { type: 'path-ref', path: 'data.input.["dmnKey"]', label: 'dmnKey' },
|
|
1088
|
-
* ]
|
|
1089
|
-
* → "Hello _DE_{_P('data.input.[\"dmnKey\"]')}"
|
|
1090
|
-
*/
|
|
1091
|
-
export declare function serializeAST(nodes: FormulaASTNode[]): string;
|
|
1092
|
-
|
|
1093
|
-
/**
|
|
1094
|
-
* Serialize AST to the formula-config-enabled format.
|
|
1095
|
-
* path-ref nodes → _P('...') (no _DE_ wrapper).
|
|
1096
|
-
* Used when formulaConfig toggle is ON.
|
|
1097
|
-
*/
|
|
1098
|
-
export declare function serializeASTAsConfig(nodes: FormulaASTNode[]): string;
|
|
1099
|
-
|
|
1100
|
-
/**
|
|
1101
|
-
* Serialize a ConditionConfig into a map of field → expression string.
|
|
1102
|
-
*
|
|
1103
|
-
* Example output:
|
|
1104
|
-
* {
|
|
1105
|
-
* email: "isNotPresent(_P('data.input.[\"email\"]'))",
|
|
1106
|
-
* firstName: "_P('data.input.[\"firstName\"]') == 'abhi'"
|
|
1107
|
-
* }
|
|
1108
|
-
*/
|
|
1109
|
-
export declare function serializeConditionExpressions(conditionConfig: ConditionConfig): Record<string, string>;
|
|
1110
|
-
|
|
1111
|
-
declare type SlotKind = 'start' | 'end' | 'addTrigger' | 'triggerFixed' | 'userTask' | 'addStep' | 'filter' | 'approval';
|
|
1112
|
-
|
|
1113
|
-
/**
|
|
1114
|
-
* Start event — a fixed skeleton node with no user-editable form.
|
|
1115
|
-
* The canvas seeds it as the literal slot id `'start'` (see buildInitialSlots
|
|
1116
|
-
* in WorkflowCanvas.tsx). This descriptor exists so the registry can resolve
|
|
1117
|
-
* that id via `forId('start')` and emit it during descriptor-driven BPMN save.
|
|
1118
|
-
*
|
|
1119
|
-
* Inherits formSchema (none) and bpmnEntry/bpmnExit from the base node.
|
|
1120
|
-
*/
|
|
1121
|
-
export declare const startEventDescriptor: NodeDescriptor;
|
|
1122
|
-
|
|
1123
|
-
export declare const StartNode: () => JSX_2.Element;
|
|
1124
|
-
|
|
1125
|
-
export declare type StepStatus = 'pending' | 'running' | 'success' | 'failed' | 'skipped';
|
|
1126
|
-
|
|
1127
|
-
export declare function stripFormulaTokens(value: string): string;
|
|
1128
|
-
|
|
1129
|
-
/** Pre-built static descriptor (no dynamic workflow list). Swap for makeSubWorkflowDescriptor when you have an API. */
|
|
1130
|
-
export declare const subWorkflowDescriptor: NodeDescriptor;
|
|
1131
|
-
|
|
1132
|
-
/**
|
|
1133
|
-
* Sub-Workflow node — calls another saved workflow by ID.
|
|
1134
|
-
*
|
|
1135
|
-
* The host app must provide `fetchWorkflowOptions` at registration time so the
|
|
1136
|
-
* `workflowId` select field can populate. Inject it via the descriptor factory:
|
|
1137
|
-
*
|
|
1138
|
-
* import { makeSubWorkflowDescriptor } from '@miniorange/flowforge';
|
|
1139
|
-
* nodeTypeRegistry.register(makeSubWorkflowDescriptor({
|
|
1140
|
-
* fetchWorkflowOptions: async () => myApi.listWorkflows(),
|
|
1141
|
-
* }));
|
|
1142
|
-
*/
|
|
1143
|
-
export declare interface SubWorkflowDescriptorOptions {
|
|
1144
|
-
/** Return a list of available workflows for the workflowId select field */
|
|
1145
|
-
fetchWorkflowOptions?: () => Promise<Array<{
|
|
1146
|
-
label: string;
|
|
1147
|
-
value: string;
|
|
1148
|
-
}>>;
|
|
1149
|
-
}
|
|
1150
|
-
|
|
1151
|
-
export declare const SubWorkflowPreviewDrawer: default_2.FC<SubWorkflowPreviewDrawerProps>;
|
|
1152
|
-
|
|
1153
|
-
declare interface SubWorkflowPreviewDrawerProps {
|
|
1154
|
-
isOpen: boolean;
|
|
1155
|
-
onClose: () => void;
|
|
1156
|
-
workflowId: string | null;
|
|
1157
|
-
workflowLabel?: string;
|
|
1158
|
-
/** Host-provided async loader — returns the WorkflowState for the given ID */
|
|
1159
|
-
onFetchWorkflow: (workflowId: string) => Promise<WorkflowState>;
|
|
1160
|
-
}
|
|
1161
|
-
|
|
1162
|
-
export declare interface TabDefinition {
|
|
1163
|
-
id: string;
|
|
1164
|
-
label: string;
|
|
1165
|
-
fields: FieldDescriptor[];
|
|
1166
|
-
}
|
|
1167
|
-
|
|
1168
|
-
export declare function TablePickerField({ field: rawField, value, onChange, onBlur, error, touched }: FieldComponentProps): JSX_2.Element;
|
|
1169
|
-
|
|
1170
|
-
export declare interface TablePickerFieldDescriptor extends FieldDescriptor {
|
|
1171
|
-
columns: Array<{
|
|
1172
|
-
key: string;
|
|
1173
|
-
label: string;
|
|
1174
|
-
width?: number;
|
|
1175
|
-
}>;
|
|
1176
|
-
fetchOptions?: (query: string, page: number) => Promise<FetchResult>;
|
|
1177
|
-
dataSource?: string;
|
|
1178
|
-
isMulti?: boolean;
|
|
1179
|
-
pageSize?: number;
|
|
1180
|
-
}
|
|
1181
|
-
|
|
1182
|
-
export declare interface TablePickerOption {
|
|
1183
|
-
value: string;
|
|
1184
|
-
label: string;
|
|
1185
|
-
[key: string]: unknown;
|
|
1186
|
-
}
|
|
1187
|
-
|
|
1188
|
-
export declare interface TabsFieldDescriptor extends FieldDescriptor {
|
|
1189
|
-
tabs?: TabDefinition[];
|
|
1190
|
-
variant?: 'pill' | 'line';
|
|
1191
|
-
alignment?: 'left' | 'center' | 'right' | 'center-left' | 'center-right';
|
|
1192
|
-
height?: 'auto' | 'fixed';
|
|
1193
|
-
margin?: 'normal' | 'none';
|
|
1194
|
-
activeColor?: string;
|
|
1195
|
-
activeTextColor?: string;
|
|
1196
|
-
inactiveTextColor?: string;
|
|
1197
|
-
}
|
|
1198
|
-
|
|
1199
|
-
export declare class TemplateRegistry {
|
|
1200
|
-
private templates;
|
|
1201
|
-
register(template: WorkflowTemplate): this;
|
|
1202
|
-
lookup(triggerKey: string): WorkflowTemplate | undefined;
|
|
1203
|
-
list(): WorkflowTemplate[];
|
|
1204
|
-
listByCategory(category: string): WorkflowTemplate[];
|
|
1205
|
-
listByTag(tag: string): WorkflowTemplate[];
|
|
1206
|
-
search(query: string): WorkflowTemplate[];
|
|
1207
|
-
categories(): string[];
|
|
1208
|
-
}
|
|
1209
|
-
|
|
1210
|
-
export declare const templateRegistry: TemplateRegistry;
|
|
1211
|
-
|
|
1212
|
-
/**
|
|
1213
|
-
* FlowForge Formula AST
|
|
1214
|
-
*
|
|
1215
|
-
* The AST is the source of truth for formula fields.
|
|
1216
|
-
* The _DE_{_P(...)} string is a derived serialization produced at submit
|
|
1217
|
-
* time for the backend engine — it is never the primary storage format.
|
|
1218
|
-
*
|
|
1219
|
-
* Extensibility: add new node types here as the engine grows.
|
|
1220
|
-
* Current: text + path-ref (covers all real usage today)
|
|
1221
|
-
* Future: concat, function, condition
|
|
1222
|
-
*/
|
|
1223
|
-
/** Plain text segment — rendered as-is */
|
|
1224
|
-
export declare interface TextNode {
|
|
1225
|
-
type: 'text';
|
|
1226
|
-
value: string;
|
|
1227
|
-
}
|
|
1228
|
-
|
|
1229
|
-
export declare interface TextToken {
|
|
1230
|
-
type: 'text';
|
|
1231
|
-
value: string;
|
|
1232
|
-
}
|
|
1233
|
-
|
|
1234
|
-
/** Parse a raw string to the flat token list (used for paste/input).
|
|
1235
|
-
* configEnabled mirrors the formula config toggle state. */
|
|
1236
|
-
export declare function tokenize(raw: string, configEnabled?: boolean): FormulaToken[];
|
|
1237
|
-
|
|
1238
|
-
export declare const TriggerNode: ({ data }: NodeProps) => JSX_2.Element;
|
|
1239
|
-
|
|
1240
|
-
declare interface UncontrolledProps extends FormulaProps {
|
|
1241
|
-
schema: FormSchema;
|
|
1242
|
-
initialValues: Record<string, unknown>;
|
|
1243
|
-
onSubmit: (values: Record<string, unknown>) => void | Promise<void>;
|
|
1244
|
-
formik?: never;
|
|
1245
|
-
form?: never;
|
|
1246
|
-
validationSchema?: ObjectSchema<any>;
|
|
1247
|
-
/** Pre-mark fields as touched so validation errors show immediately */
|
|
1248
|
-
initialTouched?: Record<string, boolean>;
|
|
1249
|
-
/** Called on every values change — use to observe live form values */
|
|
1250
|
-
onValuesChange?: (values: Record<string, unknown>) => void;
|
|
1251
|
-
/** Called whenever form validity changes — use to enable/disable a parent Save button */
|
|
1252
|
-
onValidityChange?: (isValid: boolean) => void;
|
|
1253
|
-
children?: (props: {
|
|
1254
|
-
isSubmitting: boolean;
|
|
1255
|
-
}) => default_2.ReactNode;
|
|
1256
|
-
/**
|
|
1257
|
-
* Optional HTML `id` for the underlying <form> element. Use this when the
|
|
1258
|
-
* submit button lives outside the form (e.g. in a drawer footer) — a
|
|
1259
|
-
* `<button type="submit" form={formId}>` will still trigger this form's
|
|
1260
|
-
* submit via the HTML5 form attribute.
|
|
1261
|
-
*/
|
|
1262
|
-
formId?: string;
|
|
1263
|
-
}
|
|
1264
|
-
|
|
1265
|
-
export declare function unwrapFormula(value: string): string;
|
|
1266
|
-
|
|
1267
|
-
export declare function useFlowForm({ schema, initialValues, onSubmit, showErrorsImmediately, }: UseFlowFormOptions): FlowFormInstance;
|
|
1268
|
-
|
|
1269
|
-
export declare interface UseFlowFormOptions {
|
|
1270
|
-
schema: FormSchema;
|
|
1271
|
-
initialValues: Record<string, unknown>;
|
|
1272
|
-
/**
|
|
1273
|
-
* Called only when form is valid and submitted.
|
|
1274
|
-
* Receives raw formik values AND the fully-resolved evaluation payload
|
|
1275
|
-
* (formula chips resolved, condition expressions serialized).
|
|
1276
|
-
*/
|
|
1277
|
-
onSubmit: (values: Record<string, unknown>, evaluation: EvaluationPayload) => void | Promise<void>;
|
|
1278
|
-
/** Pre-mark all fields as touched so errors show immediately (e.g. edit mode). */
|
|
1279
|
-
showErrorsImmediately?: boolean;
|
|
1280
|
-
}
|
|
1281
|
-
|
|
1282
|
-
export declare const userOnboardingSkeleton: WorkflowState;
|
|
1283
|
-
|
|
1284
|
-
export declare function useVariablePickerContext(): VariablePickerContextValue | null;
|
|
1285
|
-
|
|
1286
|
-
export declare interface VariableGroup {
|
|
1287
|
-
label: string;
|
|
1288
|
-
icon?: default_2.ReactNode;
|
|
1289
|
-
items: VariableItem[];
|
|
1290
|
-
}
|
|
1291
|
-
|
|
1292
|
-
export declare interface VariableItem {
|
|
1293
|
-
/** Display label shown in the picker */
|
|
1294
|
-
label: string;
|
|
1295
|
-
/** Formula path used to build _DE_{_P('...')} / _P('...') */
|
|
1296
|
-
path: string;
|
|
1297
|
-
/** Optional description shown below the label */
|
|
1298
|
-
description?: string;
|
|
1299
|
-
/** Nested sub-items — renders as an expandable group in the picker */
|
|
1300
|
-
children?: VariableItem[];
|
|
1301
|
-
}
|
|
1302
|
-
|
|
1303
|
-
export declare function VariablePicker({ width, title, mode, }: VariablePickerProps): JSX_2.Element | null;
|
|
1304
|
-
|
|
1305
|
-
declare interface VariablePickerContextValue {
|
|
1306
|
-
groups: VariableGroup[];
|
|
1307
|
-
isOpen: boolean;
|
|
1308
|
-
openPicker: () => void;
|
|
1309
|
-
closePicker: () => void;
|
|
1310
|
-
/**
|
|
1311
|
-
* Called by FormulaOverlay when formula mode is toggled ON or OFF.
|
|
1312
|
-
* Pass the anchor HTMLElement (the toggle button) when turning ON so the
|
|
1313
|
-
* picker can position itself next to it.
|
|
1314
|
-
*/
|
|
1315
|
-
notifyFormulaToggle: (on: boolean, anchor?: HTMLElement | null) => void;
|
|
1316
|
-
/** FormulaInput calls this on focus to register as the active target */
|
|
1317
|
-
registerField: (field: ActiveField) => void;
|
|
1318
|
-
/** FormulaInput calls this on selection change to save cursor position */
|
|
1319
|
-
saveRange: (range: Range | null) => void;
|
|
1320
|
-
/** Picker calls this on item click or drop — inserts chip into active field */
|
|
1321
|
-
insertVariable: (path: string, label: string) => void;
|
|
1322
|
-
/** Currently active field id — used by FormulaInput to show drop-valid state */
|
|
1323
|
-
activeFieldId: string | null;
|
|
1324
|
-
/** Signal that a field has been focused/clicked — used to auto-open picker panel */
|
|
1325
|
-
notifyFieldFocus: (fieldId: string, anchor?: HTMLElement | null) => void;
|
|
1326
|
-
/** DOM element the popover should anchor to */
|
|
1327
|
-
anchorEl: HTMLElement | null;
|
|
1328
|
-
}
|
|
1329
|
-
|
|
1330
|
-
export declare interface VariablePickerProps {
|
|
1331
|
-
/** Panel width in px. Default: 300 */
|
|
1332
|
-
width?: number;
|
|
1333
|
-
/** Title shown in panel header. Default: 'Smart Values' */
|
|
1334
|
-
title?: string;
|
|
1335
|
-
/**
|
|
1336
|
-
* 'drawer' — always visible as a sidebar panel (default).
|
|
1337
|
-
* 'popover' — absolutely positioned, shown/hidden via isOpen.
|
|
1338
|
-
*/
|
|
1339
|
-
mode?: 'drawer' | 'popover';
|
|
1340
|
-
}
|
|
1341
|
-
|
|
1342
|
-
export declare function VariablePickerProvider({ groups, children }: VariablePickerProviderProps): JSX_2.Element;
|
|
1343
|
-
|
|
1344
|
-
declare interface VariablePickerProviderProps {
|
|
1345
|
-
groups: VariableGroup[];
|
|
1346
|
-
children: default_2.ReactNode;
|
|
1347
|
-
}
|
|
1348
|
-
|
|
1349
|
-
export declare const webhookIntegrationSkeleton: WorkflowState;
|
|
1350
|
-
|
|
1351
|
-
export declare const webhookTriggerDescriptor: NodeDescriptor;
|
|
1352
|
-
|
|
1353
|
-
export declare const WebhookTriggerNode: ({ data }: NodeProps) => JSX_2.Element;
|
|
1354
|
-
|
|
1355
|
-
export declare const webhookTriggerTemplate: WorkflowTemplate;
|
|
1356
|
-
|
|
1357
|
-
/** @deprecated Use FlowForgeCanvasProps */
|
|
1358
|
-
export declare type WorkflowCanvasProps = FlowForgeCanvasProps;
|
|
1359
|
-
|
|
1360
|
-
export declare const WorkflowExecutionHistory: default_2.FC<WorkflowExecutionHistoryProps>;
|
|
1361
|
-
|
|
1362
|
-
declare interface WorkflowExecutionHistoryProps {
|
|
1363
|
-
records: ExecutionRecord[];
|
|
1364
|
-
/** Called when the "view on canvas" button is clicked for a record */
|
|
1365
|
-
onViewOnCanvas?: (record: ExecutionRecord) => void;
|
|
1366
|
-
}
|
|
1367
|
-
|
|
1368
|
-
export declare interface WorkflowState {
|
|
1369
|
-
slots: CanvasSlot[];
|
|
1370
|
-
branches: BranchMap;
|
|
1371
|
-
}
|
|
1372
|
-
|
|
1373
|
-
export declare interface WorkflowTemplate {
|
|
1374
|
-
triggerKey: string;
|
|
1375
|
-
label: string;
|
|
1376
|
-
description?: string;
|
|
1377
|
-
icon?: ReactNode;
|
|
1378
|
-
triggerCategory?: 'event' | 'scheduler' | 'webhook' | string;
|
|
1379
|
-
availableTasks?: string[];
|
|
1380
|
-
maxTasks?: number;
|
|
1381
|
-
taskLabels?: Record<string, string>;
|
|
1382
|
-
fixedNodes?: FixedNode[];
|
|
1383
|
-
fixedEdges?: FixedEdge[];
|
|
1384
|
-
insertionPoints?: string[];
|
|
1385
|
-
source?: string;
|
|
1386
|
-
product?: string;
|
|
1387
|
-
/** Pre-built workflow state to clone when user selects this template */
|
|
1388
|
-
skeletonState?: WorkflowState;
|
|
1389
|
-
/** Tags for filtering in the template library */
|
|
1390
|
-
tags?: string[];
|
|
1391
|
-
/** Category grouping in the library */
|
|
1392
|
-
category?: string;
|
|
1393
|
-
/** Team or author that owns this template */
|
|
1394
|
-
author?: string;
|
|
1395
|
-
/** Relative popularity score (higher = shown first in library) */
|
|
1396
|
-
popularity?: number;
|
|
1397
|
-
}
|
|
1398
|
-
|
|
1399
|
-
export declare const WorkflowTemplateLibrary: default_2.FC<WorkflowTemplateLibraryProps>;
|
|
1400
|
-
|
|
1401
|
-
declare interface WorkflowTemplateLibraryProps {
|
|
1402
|
-
templates: WorkflowTemplate[];
|
|
1403
|
-
onSelectTemplate: (template: WorkflowTemplate) => void;
|
|
1404
|
-
onStartFromScratch?: () => void;
|
|
1405
|
-
}
|
|
1406
|
-
|
|
1407
|
-
export declare function wrapFormula(expression: string): string;
|
|
1408
|
-
|
|
1409
|
-
export { }
|