@notmrabhi/flowforge 0.1.42 → 0.1.45

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.
Files changed (59) hide show
  1. package/dist/{SchemaBuilderDrawer-CiSdfXzJ.js → SchemaBuilderDrawer-CwnowdK9.js} +2 -2
  2. package/dist/{SchemaBuilderDrawer-CiSdfXzJ.js.map → SchemaBuilderDrawer-CwnowdK9.js.map} +1 -1
  3. package/dist/{SchemaBuilderDrawer-CUzYWGCN.js → SchemaBuilderDrawer-Dx6Nd6uF.js} +33 -33
  4. package/dist/{SchemaBuilderDrawer-CUzYWGCN.js.map → SchemaBuilderDrawer-Dx6Nd6uF.js.map} +1 -1
  5. package/dist/canvas.cjs +1 -1
  6. package/dist/canvas.d.ts +131 -1
  7. package/dist/canvas.js +1 -1
  8. package/dist/core.cjs +1 -1
  9. package/dist/core.d.ts +39 -0
  10. package/dist/core.js +22 -23
  11. package/dist/core.js.map +1 -1
  12. package/dist/form.cjs +1 -1
  13. package/dist/form.d.ts +121 -0
  14. package/dist/form.js +36 -33
  15. package/dist/{index-B8-KKaH_.js → index-C9s5LB8m.js} +2 -2
  16. package/dist/{index-B8-KKaH_.js.map → index-C9s5LB8m.js.map} +1 -1
  17. package/dist/{index-Buv1ylwP.js → index-CRQSsrv7.js} +2 -2
  18. package/dist/{index-Buv1ylwP.js.map → index-CRQSsrv7.js.map} +1 -1
  19. package/dist/index-CY05DpP5.js +10 -0
  20. package/dist/index-CY05DpP5.js.map +1 -0
  21. package/dist/{index-DjKhaaWf.js → index-DX3uS4JK.js} +2 -2
  22. package/dist/{index-DjKhaaWf.js.map → index-DX3uS4JK.js.map} +1 -1
  23. package/dist/{index-B74jTc2b.js → index-VUTKHpvC.js} +3134 -3006
  24. package/dist/index-VUTKHpvC.js.map +1 -0
  25. package/dist/{index-CiU9_8f1.js → index-ZD8Iiv9S.js} +2 -2
  26. package/dist/{index-CiU9_8f1.js.map → index-ZD8Iiv9S.js.map} +1 -1
  27. package/dist/index.cjs +1 -1
  28. package/dist/index.cjs.map +1 -1
  29. package/dist/index.d.ts +143 -1
  30. package/dist/index.js +81 -79
  31. package/dist/index.js.map +1 -1
  32. package/dist/nodeRegistry.cjs +1 -1
  33. package/dist/nodeRegistry.cjs.map +1 -1
  34. package/dist/nodeRegistry.d.ts +39 -0
  35. package/dist/nodeRegistry.js +543 -23
  36. package/dist/nodeRegistry.js.map +1 -1
  37. package/dist/templateSkeletons-Cm_MIeT0.js +2 -0
  38. package/dist/templateSkeletons-Cm_MIeT0.js.map +1 -0
  39. package/dist/{templateSkeletons-CFMb6KIK.js → templateSkeletons-_F-r1-ef.js} +375 -373
  40. package/dist/templateSkeletons-_F-r1-ef.js.map +1 -0
  41. package/package.json +1 -1
  42. package/dist/index-B6xrei80.js +0 -87
  43. package/dist/index-B6xrei80.js.map +0 -1
  44. package/dist/index-B74jTc2b.js.map +0 -1
  45. package/dist/index-BrJBVztu.js +0 -2
  46. package/dist/index-BrJBVztu.js.map +0 -1
  47. package/dist/index-CXmgrKoe.js +0 -2
  48. package/dist/index-CXmgrKoe.js.map +0 -1
  49. package/dist/index-CqMPyOkL.js +0 -10
  50. package/dist/index-CqMPyOkL.js.map +0 -1
  51. package/dist/index-Dcur-XJ9.js +0 -36
  52. package/dist/index-Dcur-XJ9.js.map +0 -1
  53. package/dist/subWorkflowDescriptor-DYOYgBzX.js +0 -535
  54. package/dist/subWorkflowDescriptor-DYOYgBzX.js.map +0 -1
  55. package/dist/subWorkflowDescriptor-JDKi2INh.js +0 -2
  56. package/dist/subWorkflowDescriptor-JDKi2INh.js.map +0 -1
  57. package/dist/templateSkeletons-CFMb6KIK.js.map +0 -1
  58. package/dist/templateSkeletons-DKBMuT6K.js +0 -2
  59. package/dist/templateSkeletons-DKBMuT6K.js.map +0 -1
package/dist/canvas.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./templateSkeletons-DKBMuT6K.js"),t=require("./messages-O9Tw_XXR.js"),r=require("./bpmn-CcuE2X_Q.js"),o=require("./GatewayBranchEdge-CMY30xhz.js");exports.FlowForgeCanvas=e.FlowForgeCanvas;exports.FlowForgeHeader=e.FlowForgeHeader;exports.SubWorkflowPreviewDrawer=e.SubWorkflowPreviewDrawer;exports.WorkflowCanvas=e.FlowForgeCanvas;exports.WorkflowExecutionHistory=e.WorkflowExecutionHistory;exports.WorkflowTemplateLibrary=e.WorkflowTemplateLibrary;exports.accessRequestSkeleton=e.accessRequestSkeleton;exports.offboardingSkeleton=e.offboardingSkeleton;exports.userOnboardingSkeleton=e.userOnboardingSkeleton;exports.webhookIntegrationSkeleton=e.webhookIntegrationSkeleton;exports.defaultFlowForgeMessages=t.defaultFlowForgeMessages;exports.loadWorkflowFromBpmn=r.loadWorkflowFromBpmn;exports.saveWorkflowToBpmn=r.saveWorkflowToBpmn;exports.ActionNode=o.ActionNode;exports.ApprovalNode=o.ApprovalNode;exports.EdgeWithPlusLabel=o.EdgeWithPlusLabel;exports.EndNode=o.EndNode;exports.FilterNode=o.FilterNode;exports.RestApiNode=o.RestApiNode;exports.StartNode=o.StartNode;exports.TriggerNode=o.TriggerNode;exports.WebhookTriggerNode=o.WebhookTriggerNode;exports.builtInNodeTypes=o.builtInNodeTypes;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./templateSkeletons-Cm_MIeT0.js"),t=require("./messages-O9Tw_XXR.js"),r=require("./bpmn-CcuE2X_Q.js"),o=require("./GatewayBranchEdge-CMY30xhz.js");exports.FlowForgeCanvas=e.FlowForgeCanvas;exports.FlowForgeHeader=e.FlowForgeHeader;exports.SubWorkflowPreviewDrawer=e.SubWorkflowPreviewDrawer;exports.WorkflowCanvas=e.FlowForgeCanvas;exports.WorkflowExecutionHistory=e.WorkflowExecutionHistory;exports.WorkflowTemplateLibrary=e.WorkflowTemplateLibrary;exports.accessRequestSkeleton=e.accessRequestSkeleton;exports.offboardingSkeleton=e.offboardingSkeleton;exports.userOnboardingSkeleton=e.userOnboardingSkeleton;exports.webhookIntegrationSkeleton=e.webhookIntegrationSkeleton;exports.defaultFlowForgeMessages=t.defaultFlowForgeMessages;exports.loadWorkflowFromBpmn=r.loadWorkflowFromBpmn;exports.saveWorkflowToBpmn=r.saveWorkflowToBpmn;exports.ActionNode=o.ActionNode;exports.ApprovalNode=o.ApprovalNode;exports.EdgeWithPlusLabel=o.EdgeWithPlusLabel;exports.EndNode=o.EndNode;exports.FilterNode=o.FilterNode;exports.RestApiNode=o.RestApiNode;exports.StartNode=o.StartNode;exports.TriggerNode=o.TriggerNode;exports.WebhookTriggerNode=o.WebhookTriggerNode;exports.builtInNodeTypes=o.builtInNodeTypes;
2
2
  //# sourceMappingURL=canvas.cjs.map
package/dist/canvas.d.ts CHANGED
@@ -159,6 +159,13 @@ declare interface ConditionFieldDef {
159
159
  value: string;
160
160
  label: string;
161
161
  }>;
162
+ /**
163
+ * Declarative dynamic options — same shape as `FieldDescriptor.optionsSource`.
164
+ * `dependsOn` resolves against the OUTER form values (not the condition entry),
165
+ * so a condition column can depend on another top-level field (e.g. attributes
166
+ * scoped by `applicationUuid`).
167
+ */
168
+ optionsSource?: OptionsSource;
162
169
  /** When true, renders a FormulaInput chip editor instead of a plain <input> */
163
170
  formula?: boolean;
164
171
  }
@@ -182,6 +189,13 @@ declare interface ConditionFieldDef_2 {
182
189
  value: string;
183
190
  label: string;
184
191
  }>;
192
+ /**
193
+ * Declarative dynamic options — same shape as `FieldDescriptor.optionsSource`.
194
+ * `dependsOn` resolves against the OUTER form values (not the condition entry),
195
+ * so a condition column can depend on another top-level field (e.g. attributes
196
+ * scoped by `applicationUuid`).
197
+ */
198
+ optionsSource?: OptionsSource_2;
185
199
  /** When true, renders a FormulaInput chip editor instead of a plain <input> */
186
200
  formula?: boolean;
187
201
  }
@@ -333,6 +347,12 @@ declare interface FieldDescriptor {
333
347
  onChange?: (value: unknown, ctx: FieldContext & {
334
348
  setFieldValue: (name: string, value: unknown) => void;
335
349
  }) => void;
350
+ /**
351
+ * Declarative dynamic options. The renderer translates this into a paged,
352
+ * cached, abortable async loader via the host's resolver registry.
353
+ * Mutually compatible with static `options`: static wins if both set.
354
+ */
355
+ optionsSource?: OptionsSource;
336
356
  [key: string]: unknown;
337
357
  }
338
358
 
@@ -381,6 +401,12 @@ declare interface FieldDescriptor_2 {
381
401
  onChange?: (value: unknown, ctx: FieldContext_2 & {
382
402
  setFieldValue: (name: string, value: unknown) => void;
383
403
  }) => void;
404
+ /**
405
+ * Declarative dynamic options. The renderer translates this into a paged,
406
+ * cached, abortable async loader via the host's resolver registry.
407
+ * Mutually compatible with static `options`: static wins if both set.
408
+ */
409
+ optionsSource?: OptionsSource_2;
384
410
  [key: string]: unknown;
385
411
  }
386
412
 
@@ -439,7 +465,7 @@ declare interface FixedNode_3 {
439
465
  deletable?: false;
440
466
  }
441
467
 
442
- 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, hideHeader, workflowName, onWorkflowNameChange, onCancel, workflowStatus, workflowStatusColor, saveLabel, }: FlowForgeCanvasProps) => JSX_2.Element;
468
+ 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, hideHeader, workflowName, onWorkflowNameChange, onCancel, workflowStatus, workflowStatusColor, saveLabel, optionsResolvers, }: FlowForgeCanvasProps) => JSX_2.Element;
443
469
  export { FlowForgeCanvas }
444
470
  export { FlowForgeCanvas as WorkflowCanvas }
445
471
 
@@ -541,6 +567,27 @@ export declare interface FlowForgeCanvasProps {
541
567
  workflowStatusColor?: 'gray' | 'green' | 'amber' | 'red' | string;
542
568
  /** Override the Save button label. */
543
569
  saveLabel?: string;
570
+ /**
571
+ * Host-registered map of named option resolvers. Fields in any node's
572
+ * `formSchema` may declare `optionsSource: { id, dependsOn, params }` to
573
+ * populate a select asynchronously. Transport-agnostic — the host's
574
+ * resolver can use axios, fetch, GraphQL, etc.
575
+ *
576
+ * Example:
577
+ * optionsResolvers={{
578
+ * 'app:groups': async ({ appId }, { cursor=0 }) => {
579
+ * const res = await api.get(`/groups?startIndex=${cursor}&count=50`);
580
+ * return {
581
+ * options: res.data.map(g => ({ value: g.uuid, label: g.name })),
582
+ * nextCursor: res.data.length === 50 ? cursor + 50 : undefined,
583
+ * };
584
+ * }
585
+ * }}
586
+ *
587
+ * Resolvers are cached for the session keyed by (resolverId, deps). Use
588
+ * `useOptionsResolvers().invalidate(id)` to bust a cache entry manually.
589
+ */
590
+ optionsResolvers?: OptionsResolvers;
544
591
  }
545
592
 
546
593
  export declare function FlowForgeHeader({ workflowName, onWorkflowNameChange, status, statusColor, onSave, onCancel, saveLabel, saveDisabled, }: FlowForgeHeaderProps): JSX_2.Element;
@@ -777,6 +824,89 @@ declare class NodeTypeRegistry {
777
824
 
778
825
  export declare const offboardingSkeleton: WorkflowState;
779
826
 
827
+ /** A resolver function — transport-agnostic. */
828
+ declare type OptionsResolver = (deps: Record<string, unknown>, ctx: OptionsResolverContext) => Promise<OptionsResolverResult>;
829
+
830
+ /** Args passed to a resolver per call — cursor for pagination, input for typeahead. */
831
+ declare interface OptionsResolverContext {
832
+ cursor?: unknown;
833
+ input?: string;
834
+ /** Full top-level form values, in case a resolver needs read-only access. */
835
+ values?: Record<string, unknown>;
836
+ /** AbortSignal — resolvers SHOULD honor this when their transport supports it. */
837
+ signal?: AbortSignal;
838
+ }
839
+
840
+ /** Resolver return shape — matches Pipedream's `options` contract. */
841
+ declare interface OptionsResolverResult {
842
+ options: Array<{
843
+ value: unknown;
844
+ label: string;
845
+ isDisabled?: boolean;
846
+ [key: string]: unknown;
847
+ }>;
848
+ /** Opaque cursor returned to the next call. Omit to signal "no more pages". */
849
+ nextCursor?: unknown;
850
+ }
851
+
852
+ /**
853
+ * Map of named resolvers — the host registers these once on the canvas / form.
854
+ * Keys are the `optionsSource.id` strings referenced by field descriptors.
855
+ */
856
+ declare type OptionsResolvers = Record<string, OptionsResolver>;
857
+
858
+ declare interface OptionsSource {
859
+ /** Resolver id — must match a key in the host's `optionsResolvers` map. */
860
+ id: string;
861
+ /**
862
+ * Other field values this resolver depends on. Two shapes accepted:
863
+ * - `string[]` — pass through verbatim ({ fieldA: values.fieldA, ... })
864
+ * - `Record<arg, fieldName>` — rename parent values for the resolver
865
+ *
866
+ * When any dep value changes, the cache key for this field invalidates
867
+ * and the resolver re-fires.
868
+ */
869
+ dependsOn?: string[] | Record<string, string>;
870
+ /**
871
+ * Static params merged into the deps object for every call. Use for
872
+ * "URL template via the generic resolver" style:
873
+ * { id: 'default', params: { url: '/groups', valueKey: 'uuid' } }
874
+ */
875
+ params?: Record<string, unknown>;
876
+ /**
877
+ * Lookup individual options by value (edit-mode hydration). When set,
878
+ * the field calls this resolver with `{ ids: [...] }` to render labels
879
+ * for already-selected values that aren't in the current page.
880
+ */
881
+ resolveValueId?: string;
882
+ }
883
+
884
+ declare interface OptionsSource_2 {
885
+ /** Resolver id — must match a key in the host's `optionsResolvers` map. */
886
+ id: string;
887
+ /**
888
+ * Other field values this resolver depends on. Two shapes accepted:
889
+ * - `string[]` — pass through verbatim ({ fieldA: values.fieldA, ... })
890
+ * - `Record<arg, fieldName>` — rename parent values for the resolver
891
+ *
892
+ * When any dep value changes, the cache key for this field invalidates
893
+ * and the resolver re-fires.
894
+ */
895
+ dependsOn?: string[] | Record<string, string>;
896
+ /**
897
+ * Static params merged into the deps object for every call. Use for
898
+ * "URL template via the generic resolver" style:
899
+ * { id: 'default', params: { url: '/groups', valueKey: 'uuid' } }
900
+ */
901
+ params?: Record<string, unknown>;
902
+ /**
903
+ * Lookup individual options by value (edit-mode hydration). When set,
904
+ * the field calls this resolver with `{ ids: [...] }` to render labels
905
+ * for already-selected values that aren't in the current page.
906
+ */
907
+ resolveValueId?: string;
908
+ }
909
+
780
910
  export declare const RestApiNode: ({ id, data }: NodeProps) => JSX_2.Element;
781
911
 
782
912
  export declare function saveWorkflowToBpmn(workflow: WorkflowState, options?: BpmnSaveOptions): string;
package/dist/canvas.js CHANGED
@@ -1,4 +1,4 @@
1
- import { F as a, a as s, S as r, F as l, W as t, b as d, c as n, o as i, u as f, w } from "./templateSkeletons-CFMb6KIK.js";
1
+ import { F as a, a as s, S as r, F as l, W as t, b as d, c as n, o as i, u as f, w } from "./templateSkeletons-_F-r1-ef.js";
2
2
  import { d as k } from "./messages-CO299wPN.js";
3
3
  import { l as F, s as b } from "./bpmn-CtfWDaOY.js";
4
4
  import { A as N, b as m, E as u, c as S, F as c, R as T, S as v, T as x, W as A, e as E } from "./GatewayBranchEdge-CrgczPYJ.js";
package/dist/core.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index-BrJBVztu.js"),o=require("./index-CXmgrKoe.js"),s=require("./messages-O9Tw_XXR.js"),t=require("./bpmn-CcuE2X_Q.js"),e=require("./subWorkflowDescriptor-JDKi2INh.js");exports.NodeTypeRegistry=r.NodeTypeRegistry;exports.nodeTypeRegistry=r.nodeTypeRegistry;exports.TemplateRegistry=o.TemplateRegistry;exports.templateRegistry=o.templateRegistry;exports.defaultFlowForgeMessages=s.defaultFlowForgeMessages;exports.loadWorkflowFromBpmn=t.loadWorkflowFromBpmn;exports.saveWorkflowToBpmn=t.saveWorkflowToBpmn;exports.baseNodeDefaults=e.baseNodeDefaults;exports.conditionBranchDescriptor=e.conditionBranchDescriptor;exports.defineNode=e.defineNode;exports.endEventDescriptor=e.endEventDescriptor;exports.makeSubWorkflowDescriptor=e.makeSubWorkflowDescriptor;exports.notificationDescriptor=e.notificationDescriptor;exports.restApiDescriptor=e.restApiDescriptor;exports.startEventDescriptor=e.startEventDescriptor;exports.subWorkflowDescriptor=e.subWorkflowDescriptor;exports.webhookTriggerDescriptor=e.webhookTriggerDescriptor;exports.webhookTriggerTemplate=e.webhookTriggerTemplate;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./nodeRegistry.cjs"),r=require("./templateRegistry.cjs"),t=require("./messages-O9Tw_XXR.js"),o=require("./bpmn-CcuE2X_Q.js");exports.NodeTypeRegistry=e.NodeTypeRegistry;exports.baseNodeDefaults=e.baseNodeDefaults;exports.conditionBranchDescriptor=e.conditionBranchDescriptor;exports.defineNode=e.defineNode;exports.endEventDescriptor=e.endEventDescriptor;exports.makeSubWorkflowDescriptor=e.makeSubWorkflowDescriptor;exports.nodeTypeRegistry=e.nodeTypeRegistry;exports.notificationDescriptor=e.notificationDescriptor;exports.restApiDescriptor=e.restApiDescriptor;exports.startEventDescriptor=e.startEventDescriptor;exports.subWorkflowDescriptor=e.subWorkflowDescriptor;exports.webhookTriggerDescriptor=e.webhookTriggerDescriptor;exports.webhookTriggerTemplate=e.webhookTriggerTemplate;exports.TemplateRegistry=r.TemplateRegistry;exports.templateRegistry=r.templateRegistry;exports.defaultFlowForgeMessages=t.defaultFlowForgeMessages;exports.loadWorkflowFromBpmn=o.loadWorkflowFromBpmn;exports.saveWorkflowToBpmn=o.saveWorkflowToBpmn;
2
2
  //# sourceMappingURL=core.cjs.map
package/dist/core.d.ts CHANGED
@@ -80,6 +80,13 @@ declare interface ConditionFieldDef {
80
80
  value: string;
81
81
  label: string;
82
82
  }>;
83
+ /**
84
+ * Declarative dynamic options — same shape as `FieldDescriptor.optionsSource`.
85
+ * `dependsOn` resolves against the OUTER form values (not the condition entry),
86
+ * so a condition column can depend on another top-level field (e.g. attributes
87
+ * scoped by `applicationUuid`).
88
+ */
89
+ optionsSource?: OptionsSource;
83
90
  /** When true, renders a FormulaInput chip editor instead of a plain <input> */
84
91
  formula?: boolean;
85
92
  }
@@ -189,6 +196,12 @@ declare interface FieldDescriptor {
189
196
  onChange?: (value: unknown, ctx: FieldContext & {
190
197
  setFieldValue: (name: string, value: unknown) => void;
191
198
  }) => void;
199
+ /**
200
+ * Declarative dynamic options. The renderer translates this into a paged,
201
+ * cached, abortable async loader via the host's resolver registry.
202
+ * Mutually compatible with static `options`: static wins if both set.
203
+ */
204
+ optionsSource?: OptionsSource;
192
205
  [key: string]: unknown;
193
206
  }
194
207
 
@@ -323,6 +336,32 @@ export declare const nodeTypeRegistry: NodeTypeRegistry;
323
336
 
324
337
  export declare const notificationDescriptor: NodeDescriptor;
325
338
 
339
+ declare interface OptionsSource {
340
+ /** Resolver id — must match a key in the host's `optionsResolvers` map. */
341
+ id: string;
342
+ /**
343
+ * Other field values this resolver depends on. Two shapes accepted:
344
+ * - `string[]` — pass through verbatim ({ fieldA: values.fieldA, ... })
345
+ * - `Record<arg, fieldName>` — rename parent values for the resolver
346
+ *
347
+ * When any dep value changes, the cache key for this field invalidates
348
+ * and the resolver re-fires.
349
+ */
350
+ dependsOn?: string[] | Record<string, string>;
351
+ /**
352
+ * Static params merged into the deps object for every call. Use for
353
+ * "URL template via the generic resolver" style:
354
+ * { id: 'default', params: { url: '/groups', valueKey: 'uuid' } }
355
+ */
356
+ params?: Record<string, unknown>;
357
+ /**
358
+ * Lookup individual options by value (edit-mode hydration). When set,
359
+ * the field calls this resolver with `{ ids: [...] }` to render labels
360
+ * for already-selected values that aren't in the current page.
361
+ */
362
+ resolveValueId?: string;
363
+ }
364
+
326
365
  /** The fields every node MUST provide — there is no sensible default for these. */
327
366
  declare type RequiredNodeFields = Pick<NodeDescriptor, 'type' | 'label' | 'matches' | 'reactFlowType'>;
328
367
 
package/dist/core.js CHANGED
@@ -1,26 +1,25 @@
1
- import { NodeTypeRegistry as o, nodeTypeRegistry as s } from "./index-Dcur-XJ9.js";
2
- import { TemplateRegistry as a, templateRegistry as i } from "./index-B6xrei80.js";
3
- import { d as f } from "./messages-CO299wPN.js";
4
- import { l as n, s as c } from "./bpmn-CtfWDaOY.js";
5
- import { b as d, c as g, d as D, e as w, m as k, n as T, r as b, s as y, a as x, w as u, f as R } from "./subWorkflowDescriptor-DYOYgBzX.js";
1
+ import { NodeTypeRegistry as r, baseNodeDefaults as t, conditionBranchDescriptor as s, defineNode as i, endEventDescriptor as p, makeSubWorkflowDescriptor as a, nodeTypeRegistry as f, notificationDescriptor as l, restApiDescriptor as n, startEventDescriptor as c, subWorkflowDescriptor as m, webhookTriggerDescriptor as d, webhookTriggerTemplate as g } from "./nodeRegistry.js";
2
+ import { TemplateRegistry as k, templateRegistry as w } from "./templateRegistry.js";
3
+ import { d as y } from "./messages-CO299wPN.js";
4
+ import { l as u, s as x } from "./bpmn-CtfWDaOY.js";
6
5
  export {
7
- o as NodeTypeRegistry,
8
- a as TemplateRegistry,
9
- d as baseNodeDefaults,
10
- g as conditionBranchDescriptor,
11
- f as defaultFlowForgeMessages,
12
- D as defineNode,
13
- w as endEventDescriptor,
14
- n as loadWorkflowFromBpmn,
15
- k as makeSubWorkflowDescriptor,
16
- s as nodeTypeRegistry,
17
- T as notificationDescriptor,
18
- b as restApiDescriptor,
19
- c as saveWorkflowToBpmn,
20
- y as startEventDescriptor,
21
- x as subWorkflowDescriptor,
22
- i as templateRegistry,
23
- u as webhookTriggerDescriptor,
24
- R as webhookTriggerTemplate
6
+ r as NodeTypeRegistry,
7
+ k as TemplateRegistry,
8
+ t as baseNodeDefaults,
9
+ s as conditionBranchDescriptor,
10
+ y as defaultFlowForgeMessages,
11
+ i as defineNode,
12
+ p as endEventDescriptor,
13
+ u as loadWorkflowFromBpmn,
14
+ a as makeSubWorkflowDescriptor,
15
+ f as nodeTypeRegistry,
16
+ l as notificationDescriptor,
17
+ n as restApiDescriptor,
18
+ x as saveWorkflowToBpmn,
19
+ c as startEventDescriptor,
20
+ m as subWorkflowDescriptor,
21
+ w as templateRegistry,
22
+ d as webhookTriggerDescriptor,
23
+ g as webhookTriggerTemplate
25
24
  };
26
25
  //# sourceMappingURL=core.js.map
package/dist/core.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"core.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
1
+ {"version":3,"file":"core.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
package/dist/form.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CqMPyOkL.js"),r=require("./SchemaBuilderDrawer-CiSdfXzJ.js");require("react/jsx-runtime");require("react");require("@mui/material");require("react-icons/md");exports.DynamicFormRenderer=e.DynamicFormRenderer;exports.FF=e.FF;exports.FlowForgeRegistry=e.FlowForgeRegistry;exports.FlowForm=e.FlowForm;exports.FormulaInput=e.FormulaInput;exports.InfiniteSelectField=e.InfiniteSelectField;exports.TablePickerField=e.TablePickerField;exports.VariablePicker=e.VariablePicker;exports.VariablePickerProvider=e.VariablePickerProvider;exports.astHasRefs=e.astHasRefs;exports.astToTokens=e.astToTokens;exports.buildEvaluationPayload=e.buildEvaluationPayload;exports.buildFieldConfig=e.buildFieldConfig;exports.buildFormulaPath=e.buildFormulaPath;exports.buildSelectStyles=e.buildSelectStyles;exports.buildValidationSchema=e.buildValidationSchema;exports.errorTextStyle=e.errorTextStyle;exports.extractLabel=e.extractLabel;exports.fieldRegistry=e.fieldRegistry;exports.hasFormulaTokens=e.hasFormulaTokens;exports.helperTextStyle=e.helperTextStyle;exports.inputStyle=e.inputStyle;exports.isFormula=e.isFormula;exports.parseToAST=e.parseToAST;exports.serializeAST=e.serializeAST;exports.serializeASTAsConfig=e.serializeASTAsConfig;exports.serializeConditionExpressions=e.serializeConditionExpressions;exports.stripFormulaTokens=e.stripFormulaTokens;exports.tokenize=e.tokenize;exports.unwrapFormula=e.unwrapFormula;exports.useVariablePickerContext=e.useVariablePickerContext;exports.wrapFormula=e.wrapFormula;exports.FIELD_TYPE_OPTIONS=r.FIELD_TYPE_OPTIONS;exports.SchemaBuilder=r.SchemaBuilder;exports.SchemaBuilderDrawer=r.SchemaBuilderDrawer;exports.useFlowForm=r.useFlowForm;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CY05DpP5.js"),r=require("./SchemaBuilderDrawer-CwnowdK9.js");require("react/jsx-runtime");require("react");require("@mui/material");require("react-icons/md");exports.DynamicFormRenderer=e.DynamicFormRenderer;exports.FF=e.FF;exports.FlowForgeRegistry=e.FlowForgeRegistry;exports.FlowForm=e.FlowForm;exports.FormulaInput=e.FormulaInput;exports.InfiniteSelectField=e.InfiniteSelectField;exports.OptionsResolversProvider=e.OptionsResolversProvider;exports.TablePickerField=e.TablePickerField;exports.VariablePicker=e.VariablePicker;exports.VariablePickerProvider=e.VariablePickerProvider;exports.astHasRefs=e.astHasRefs;exports.astToTokens=e.astToTokens;exports.buildEvaluationPayload=e.buildEvaluationPayload;exports.buildFieldConfig=e.buildFieldConfig;exports.buildFormulaPath=e.buildFormulaPath;exports.buildSelectStyles=e.buildSelectStyles;exports.buildValidationSchema=e.buildValidationSchema;exports.errorTextStyle=e.errorTextStyle;exports.extractLabel=e.extractLabel;exports.fieldRegistry=e.fieldRegistry;exports.hasFormulaTokens=e.hasFormulaTokens;exports.helperTextStyle=e.helperTextStyle;exports.inputStyle=e.inputStyle;exports.isFormula=e.isFormula;exports.parseToAST=e.parseToAST;exports.serializeAST=e.serializeAST;exports.serializeASTAsConfig=e.serializeASTAsConfig;exports.serializeConditionExpressions=e.serializeConditionExpressions;exports.stripFormulaTokens=e.stripFormulaTokens;exports.tokenize=e.tokenize;exports.unwrapFormula=e.unwrapFormula;exports.useDynamicOptions=e.useDynamicOptions;exports.useOptionsResolvers=e.useOptionsResolvers;exports.useVariablePickerContext=e.useVariablePickerContext;exports.wrapFormula=e.wrapFormula;exports.FIELD_TYPE_OPTIONS=r.FIELD_TYPE_OPTIONS;exports.SchemaBuilder=r.SchemaBuilder;exports.SchemaBuilderDrawer=r.SchemaBuilderDrawer;exports.useFlowForm=r.useFlowForm;
2
2
  //# sourceMappingURL=form.cjs.map
package/dist/form.d.ts CHANGED
@@ -161,6 +161,13 @@ export declare interface ConditionFieldDef {
161
161
  value: string;
162
162
  label: string;
163
163
  }>;
164
+ /**
165
+ * Declarative dynamic options — same shape as `FieldDescriptor.optionsSource`.
166
+ * `dependsOn` resolves against the OUTER form values (not the condition entry),
167
+ * so a condition column can depend on another top-level field (e.g. attributes
168
+ * scoped by `applicationUuid`).
169
+ */
170
+ optionsSource?: OptionsSource;
164
171
  /** When true, renders a FormulaInput chip editor instead of a plain <input> */
165
172
  formula?: boolean;
166
173
  }
@@ -356,6 +363,12 @@ export declare interface FieldDescriptor {
356
363
  onChange?: (value: unknown, ctx: FieldContext & {
357
364
  setFieldValue: (name: string, value: unknown) => void;
358
365
  }) => void;
366
+ /**
367
+ * Declarative dynamic options. The renderer translates this into a paged,
368
+ * cached, abortable async loader via the host's resolver registry.
369
+ * Mutually compatible with static `options`: static wins if both set.
370
+ */
371
+ optionsSource?: OptionsSource;
359
372
  [key: string]: unknown;
360
373
  }
361
374
 
@@ -554,6 +567,13 @@ declare interface FormulaProps {
554
567
  isValid: boolean;
555
568
  errors: Record<string, unknown>;
556
569
  }) => void;
570
+ /**
571
+ * Host-registered resolver map for declarative dynamic options.
572
+ * Fields with `optionsSource: { id: '...', dependsOn: ... }` look up
573
+ * their loader in this map. Transport-agnostic — use axios, fetch,
574
+ * GraphQL, anything that returns a Promise.
575
+ */
576
+ optionsResolvers?: OptionsResolvers;
557
577
  }
558
578
 
559
579
  export declare type FormulaToken = TextToken | ChipToken;
@@ -630,6 +650,74 @@ export declare interface ObjectFieldRendererProps {
630
650
  item?: Record<string, unknown>;
631
651
  }
632
652
 
653
+ /** A resolver function — transport-agnostic. */
654
+ export declare type OptionsResolver = (deps: Record<string, unknown>, ctx: OptionsResolverContext) => Promise<OptionsResolverResult>;
655
+
656
+ /** Args passed to a resolver per call — cursor for pagination, input for typeahead. */
657
+ export declare interface OptionsResolverContext {
658
+ cursor?: unknown;
659
+ input?: string;
660
+ /** Full top-level form values, in case a resolver needs read-only access. */
661
+ values?: Record<string, unknown>;
662
+ /** AbortSignal — resolvers SHOULD honor this when their transport supports it. */
663
+ signal?: AbortSignal;
664
+ }
665
+
666
+ /** Resolver return shape — matches Pipedream's `options` contract. */
667
+ export declare interface OptionsResolverResult {
668
+ options: Array<{
669
+ value: unknown;
670
+ label: string;
671
+ isDisabled?: boolean;
672
+ [key: string]: unknown;
673
+ }>;
674
+ /** Opaque cursor returned to the next call. Omit to signal "no more pages". */
675
+ nextCursor?: unknown;
676
+ }
677
+
678
+ /**
679
+ * Map of named resolvers — the host registers these once on the canvas / form.
680
+ * Keys are the `optionsSource.id` strings referenced by field descriptors.
681
+ */
682
+ export declare type OptionsResolvers = Record<string, OptionsResolver>;
683
+
684
+ declare interface OptionsResolversContextValue {
685
+ resolvers: OptionsResolvers;
686
+ /**
687
+ * Bust a single resolver's cache. Useful for an explicit "Refresh" button.
688
+ * Pass undefined to clear ALL cached pages for that resolver.
689
+ */
690
+ invalidate: (resolverId: string, depsKey?: string) => void;
691
+ }
692
+
693
+ export declare function OptionsResolversProvider({ resolvers, children }: ProviderProps): JSX_2.Element;
694
+
695
+ export declare interface OptionsSource {
696
+ /** Resolver id — must match a key in the host's `optionsResolvers` map. */
697
+ id: string;
698
+ /**
699
+ * Other field values this resolver depends on. Two shapes accepted:
700
+ * - `string[]` — pass through verbatim ({ fieldA: values.fieldA, ... })
701
+ * - `Record<arg, fieldName>` — rename parent values for the resolver
702
+ *
703
+ * When any dep value changes, the cache key for this field invalidates
704
+ * and the resolver re-fires.
705
+ */
706
+ dependsOn?: string[] | Record<string, string>;
707
+ /**
708
+ * Static params merged into the deps object for every call. Use for
709
+ * "URL template via the generic resolver" style:
710
+ * { id: 'default', params: { url: '/groups', valueKey: 'uuid' } }
711
+ */
712
+ params?: Record<string, unknown>;
713
+ /**
714
+ * Lookup individual options by value (edit-mode hydration). When set,
715
+ * the field calls this resolver with `{ ids: [...] }` to render labels
716
+ * for already-selected values that aren't in the current page.
717
+ */
718
+ resolveValueId?: string;
719
+ }
720
+
633
721
  /**
634
722
  * Parse a raw backend string into an AST node array.
635
723
  *
@@ -664,6 +752,11 @@ export declare interface PathRefNode {
664
752
  label: string;
665
753
  }
666
754
 
755
+ declare interface ProviderProps {
756
+ resolvers?: OptionsResolvers;
757
+ children: default_2.ReactNode;
758
+ }
759
+
667
760
  declare class Registry {
668
761
  private fields;
669
762
  constructor();
@@ -864,6 +957,32 @@ declare interface UncontrolledProps extends FormulaProps {
864
957
 
865
958
  export declare function unwrapFormula(value: string): string;
866
959
 
960
+ /**
961
+ * Returns a drop-in `loadOptions` for react-select when a field's
962
+ * `optionsSource` is set and the host has registered a matching resolver.
963
+ * Otherwise returns `enabled: false` and the host falls back to the
964
+ * descriptor's static `options` (or no options).
965
+ */
966
+ export declare function useDynamicOptions({ source, values }: UseDynamicOptionsArgs): UseDynamicOptionsResult;
967
+
968
+ declare interface UseDynamicOptionsArgs {
969
+ source: OptionsSource | undefined;
970
+ values: Record<string, unknown>;
971
+ }
972
+
973
+ declare interface UseDynamicOptionsResult {
974
+ /** True when the host configured a usable resolver for this field. */
975
+ enabled: boolean;
976
+ /** Drop-in `loadOptions(inputValue) => Promise<Option[]>` for react-select. */
977
+ loadOptions: ((input: string) => Promise<OptionsResolverResult['options']>) | undefined;
978
+ /** Drop-in `loadValue(ids) => Promise<Option[]>` for edit-mode hydration. */
979
+ loadValue: ((ids: unknown[]) => Promise<OptionsResolverResult['options']>) | undefined;
980
+ /** Stable key derived from deps — feed to react-select's `key` to refresh on change. */
981
+ depsKey: string;
982
+ /** Manually invalidate this field's cache (e.g. for a Refresh button). */
983
+ refresh: () => void;
984
+ }
985
+
867
986
  export declare function useFlowForm({ schema, initialValues, onSubmit, showErrorsImmediately, }: UseFlowFormOptions): FlowFormInstance;
868
987
 
869
988
  export declare interface UseFlowFormOptions {
@@ -879,6 +998,8 @@ export declare interface UseFlowFormOptions {
879
998
  showErrorsImmediately?: boolean;
880
999
  }
881
1000
 
1001
+ export declare function useOptionsResolvers(): OptionsResolversContextValue;
1002
+
882
1003
  export declare function useVariablePickerContext(): VariablePickerContextValue | null;
883
1004
 
884
1005
  export declare interface VariableGroup {
package/dist/form.js CHANGED
@@ -1,45 +1,48 @@
1
- import { D as o, F as t, a as u, b as F, c as m, I as n, T as d, V as p, d as S, e as T, f as c, g as b, h as k, i as y, j as P, k as f, l as x, m as h, n as w, o as g, p as z, q as A, r as I, s as V, t as C, u as D, v as E, w as R, x as v, y as B, z as L, A as O } from "./index-B74jTc2b.js";
2
- import { F as j, S as q, a as H, u as N } from "./SchemaBuilderDrawer-CUzYWGCN.js";
1
+ import { D as l, F as t, a as n, b as u, c as m, I as F, O as d, T as p, V as S, d as T, e as c, f as b, g as y, h as P, i as k, j as f, k as x, l as h, m as w, n as g, o as v, p as O, q as R, r as z, s as A, t as C, u as D, v as I, w as V, x as E, y as B, z as L, A as _, B as j, C as q } from "./index-VUTKHpvC.js";
2
+ import { F as N, S as Y, a as G, u as J } from "./SchemaBuilderDrawer-Dx6Nd6uF.js";
3
3
  import "react/jsx-runtime";
4
4
  import "react";
5
5
  import "@mui/material";
6
6
  import "react-icons/md";
7
7
  export {
8
- o as DynamicFormRenderer,
8
+ l as DynamicFormRenderer,
9
9
  t as FF,
10
- j as FIELD_TYPE_OPTIONS,
11
- u as FlowForgeRegistry,
12
- F as FlowForm,
10
+ N as FIELD_TYPE_OPTIONS,
11
+ n as FlowForgeRegistry,
12
+ u as FlowForm,
13
13
  m as FormulaInput,
14
- n as InfiniteSelectField,
15
- q as SchemaBuilder,
16
- H as SchemaBuilderDrawer,
17
- d as TablePickerField,
18
- p as VariablePicker,
19
- S as VariablePickerProvider,
20
- T as astHasRefs,
21
- c as astToTokens,
22
- b as buildEvaluationPayload,
23
- k as buildFieldConfig,
24
- y as buildFormulaPath,
25
- P as buildSelectStyles,
26
- f as buildValidationSchema,
27
- x as errorTextStyle,
28
- h as extractLabel,
29
- w as fieldRegistry,
30
- g as hasFormulaTokens,
31
- z as helperTextStyle,
32
- A as inputStyle,
33
- I as isFormula,
34
- V as parseToAST,
14
+ F as InfiniteSelectField,
15
+ d as OptionsResolversProvider,
16
+ Y as SchemaBuilder,
17
+ G as SchemaBuilderDrawer,
18
+ p as TablePickerField,
19
+ S as VariablePicker,
20
+ T as VariablePickerProvider,
21
+ c as astHasRefs,
22
+ b as astToTokens,
23
+ y as buildEvaluationPayload,
24
+ P as buildFieldConfig,
25
+ k as buildFormulaPath,
26
+ f as buildSelectStyles,
27
+ x as buildValidationSchema,
28
+ h as errorTextStyle,
29
+ w as extractLabel,
30
+ g as fieldRegistry,
31
+ v as hasFormulaTokens,
32
+ O as helperTextStyle,
33
+ R as inputStyle,
34
+ z as isFormula,
35
+ A as parseToAST,
35
36
  C as serializeAST,
36
37
  D as serializeASTAsConfig,
37
- E as serializeConditionExpressions,
38
- R as stripFormulaTokens,
39
- v as tokenize,
38
+ I as serializeConditionExpressions,
39
+ V as stripFormulaTokens,
40
+ E as tokenize,
40
41
  B as unwrapFormula,
41
- N as useFlowForm,
42
- L as useVariablePickerContext,
43
- O as wrapFormula
42
+ L as useDynamicOptions,
43
+ J as useFlowForm,
44
+ _ as useOptionsResolvers,
45
+ j as useVariablePickerContext,
46
+ q as wrapFormula
44
47
  };
45
48
  //# sourceMappingURL=form.js.map
@@ -1,4 +1,4 @@
1
- import { H as ct, J as Fe } from "./index-B74jTc2b.js";
1
+ import { K as ct, L as Fe } from "./index-VUTKHpvC.js";
2
2
  import Ue from "react";
3
3
  import He from "react-dom";
4
4
  function $e(S, R) {
@@ -8130,4 +8130,4 @@ const wu = /* @__PURE__ */ Fe(Be), Su = /* @__PURE__ */ $e({
8130
8130
  export {
8131
8131
  Su as i
8132
8132
  };
8133
- //# sourceMappingURL=index-B8-KKaH_.js.map
8133
+ //# sourceMappingURL=index-C9s5LB8m.js.map