@flowgram.ai/node 0.1.0-alpha.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,634 @@
1
+ // src/types.ts
2
+ var DataEvent = /* @__PURE__ */ ((DataEvent2) => {
3
+ DataEvent2["onValueChange"] = "onValueChange";
4
+ DataEvent2["onValueInit"] = "onValueInit";
5
+ DataEvent2["onValueInitOrChange"] = "onValueInitOrChange";
6
+ DataEvent2["onArrayAppend"] = "onArrayAppend";
7
+ DataEvent2["onArrayDelete"] = "onArrayDelete";
8
+ return DataEvent2;
9
+ })(DataEvent || {});
10
+ function isFormModelV2(fm) {
11
+ return "onFormValuesChange" in fm;
12
+ }
13
+ function isFormMetaV2(formMeta) {
14
+ return "render" in formMeta;
15
+ }
16
+
17
+ // src/form-model-v2.ts
18
+ import { get, groupBy, isEmpty, mapKeys } from "lodash";
19
+ import { DisposableCollection, Emitter } from "@flowgram.ai/utils";
20
+ import {
21
+ FlowNodeFormData,
22
+ FormManager,
23
+ FormModel
24
+ } from "@flowgram.ai/form-core";
25
+ import {
26
+ createForm,
27
+ FieldArrayModel,
28
+ Glob,
29
+ toForm
30
+ } from "@flowgram.ai/form";
31
+ import { PlaygroundContext, PluginContext } from "@flowgram.ai/core";
32
+
33
+ // src/utils.ts
34
+ import { find, mergeWith } from "lodash";
35
+ import { FormPathService } from "@flowgram.ai/form-core";
36
+ function findMatchedInMap(field, validateMap) {
37
+ if (!validateMap) {
38
+ return;
39
+ }
40
+ if (validateMap[field.name]) {
41
+ return validateMap[field.name];
42
+ }
43
+ const found = find(Object.keys(validateMap), (key) => {
44
+ if (key.startsWith("regex:")) {
45
+ const regex = RegExp(key.split(":")[1]);
46
+ return regex.test(field.name);
47
+ }
48
+ return false;
49
+ });
50
+ if (found) {
51
+ return validateMap[found];
52
+ }
53
+ }
54
+ function formFeedbacksToNodeCoreFormFeedbacks(formFeedbacks) {
55
+ return formFeedbacks.map(
56
+ (f) => ({
57
+ feedbackStatus: f.level,
58
+ feedbackText: f.message,
59
+ path: f.name
60
+ })
61
+ );
62
+ }
63
+ function convertGlobPath(path) {
64
+ if (path.startsWith("/")) {
65
+ const parts = FormPathService.normalize(path).slice(1).split("/");
66
+ return parts.join(".");
67
+ }
68
+ return path;
69
+ }
70
+
71
+ // src/form-render.tsx
72
+ import React from "react";
73
+ import { Form } from "@flowgram.ai/form";
74
+ var FormRender = ({ formModel }) => formModel?.formControl ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Form, { control: formModel?.formControl, keepModelOnUnMount: true }, formModel.formMeta.render)) : null;
75
+ function renderForm(formModel) {
76
+ return /* @__PURE__ */ React.createElement(FormRender, { formModel });
77
+ }
78
+
79
+ // src/form-model-v2.ts
80
+ var DEFAULT = {
81
+ // Different formModel should have different reference
82
+ EFFECT_MAP: () => ({}),
83
+ EFFECT_RETURN_MAP: () => /* @__PURE__ */ new Map([
84
+ ["onValueInitOrChange" /* onValueInitOrChange */, {}],
85
+ ["onValueChange" /* onValueChange */, {}],
86
+ ["onValueInit" /* onValueInit */, {}],
87
+ ["onArrayAppend" /* onArrayAppend */, {}],
88
+ ["onArrayDelete" /* onArrayDelete */, {}]
89
+ ]),
90
+ FORM_FEEDBACKS: () => [],
91
+ VALID: null
92
+ };
93
+ var FormModelV2 = class extends FormModel {
94
+ constructor(node) {
95
+ super();
96
+ this.effectMap = DEFAULT.EFFECT_MAP();
97
+ this.effectReturnMap = DEFAULT.EFFECT_RETURN_MAP();
98
+ this.plugins = [];
99
+ this.formFeedbacks = DEFAULT.FORM_FEEDBACKS();
100
+ this.onInitializedEmitter = new Emitter();
101
+ this.onValidateEmitter = new Emitter();
102
+ this.onValidate = this.onValidateEmitter.event;
103
+ this.onInitialized = this.onInitializedEmitter.event;
104
+ this.onDisposeEmitter = new Emitter();
105
+ this.onDispose = this.onDisposeEmitter.event;
106
+ this.toDispose = new DisposableCollection();
107
+ this.onFormValuesChangeEmitter = new Emitter();
108
+ this.onFormValuesChange = this.onFormValuesChangeEmitter.event;
109
+ this.onValidChangeEmitter = new Emitter();
110
+ this.onValidChange = this.onValidChangeEmitter.event;
111
+ this.onFeedbacksChangeEmitter = new Emitter();
112
+ this.onFeedbacksChange = this.onFeedbacksChangeEmitter.event;
113
+ this._valid = DEFAULT.VALID;
114
+ this._feedbacks = [];
115
+ this._initialized = false;
116
+ this.node = node;
117
+ this.toDispose.pushAll([
118
+ this.onInitializedEmitter,
119
+ this.onValidateEmitter,
120
+ this.onValidChangeEmitter,
121
+ this.onFeedbacksChangeEmitter,
122
+ this.onFormValuesChangeEmitter
123
+ ]);
124
+ }
125
+ get valid() {
126
+ return this._valid;
127
+ }
128
+ set valid(valid) {
129
+ this._valid = valid;
130
+ this.onValidChangeEmitter.fire(valid);
131
+ }
132
+ get flowNodeEntity() {
133
+ return this.node;
134
+ }
135
+ get formManager() {
136
+ return this.node.getService(FormManager);
137
+ }
138
+ get formControl() {
139
+ return this._formControl;
140
+ }
141
+ get formMeta() {
142
+ return this._formMeta || this.node.getNodeRegistry().formMeta;
143
+ }
144
+ get values() {
145
+ return this.nativeFormModel?.values;
146
+ }
147
+ get feedbacks() {
148
+ return this._feedbacks;
149
+ }
150
+ updateFormValues(value) {
151
+ if (this.nativeFormModel) {
152
+ const finalValue = this.formMeta.formatOnInit ? this.formMeta.formatOnInit(value, this.nodeContext) : value;
153
+ this.nativeFormModel.values = finalValue;
154
+ }
155
+ }
156
+ set feedbacks(feedbacks) {
157
+ this._feedbacks = feedbacks;
158
+ this.onFeedbacksChangeEmitter.fire(feedbacks);
159
+ }
160
+ get formItemPathMap() {
161
+ return /* @__PURE__ */ new Map();
162
+ }
163
+ get initialized() {
164
+ return this._initialized;
165
+ }
166
+ get nodeContext() {
167
+ return {
168
+ node: this.node,
169
+ playgroundContext: this.node.getService(PlaygroundContext),
170
+ clientContext: this.node.getService(PluginContext)
171
+ };
172
+ }
173
+ get nativeFormModel() {
174
+ return this._formControl?._formModel;
175
+ }
176
+ render() {
177
+ return renderForm(this);
178
+ }
179
+ initPlugins(plugins) {
180
+ if (!plugins.length) {
181
+ return;
182
+ }
183
+ this.plugins = plugins;
184
+ plugins.forEach((plugin) => {
185
+ plugin.init(this);
186
+ });
187
+ }
188
+ init(formMeta, rawInitialValues) {
189
+ const formData = this.node.getData(FlowNodeFormData);
190
+ this.onFormValuesChange(() => {
191
+ this._valid = null;
192
+ formData.fireChange();
193
+ });
194
+ (formMeta.plugins || [])?.forEach((_plugin) => {
195
+ if (_plugin.setupFormMeta) {
196
+ formMeta = _plugin.setupFormMeta(formMeta, this.nodeContext);
197
+ }
198
+ });
199
+ this._formMeta = formMeta;
200
+ const { validateTrigger, validate, effect } = formMeta;
201
+ if (effect) {
202
+ this.effectMap = effect;
203
+ }
204
+ const defaultValues = typeof formMeta.defaultValues === "function" ? formMeta.defaultValues(this.nodeContext) : formMeta.defaultValues;
205
+ const initialValues = formMeta.formatOnInit ? formMeta.formatOnInit(rawInitialValues, this.nodeContext) : rawInitialValues;
206
+ const { control } = createForm({
207
+ initialValues: initialValues || defaultValues,
208
+ validateTrigger,
209
+ context: this.nodeContext,
210
+ validate,
211
+ disableAutoInit: true
212
+ });
213
+ this._formControl = control;
214
+ const nativeFormModel = control._formModel;
215
+ this.toDispose.push(nativeFormModel);
216
+ nativeFormModel.onFormValuesChange((props) => {
217
+ this.onFormValuesChangeEmitter.fire(props);
218
+ });
219
+ if (formMeta.plugins) {
220
+ this.initPlugins(formMeta.plugins);
221
+ }
222
+ nativeFormModel.onFormValuesChange(({ values, prevValues, name }) => {
223
+ const effectKeys = Object.keys(this.effectMap).filter(
224
+ (pattern) => Glob.isMatchOrParent(pattern, name)
225
+ );
226
+ effectKeys.forEach((effectKey) => {
227
+ const effectOptionsArr = this.effectMap[effectKey];
228
+ effectOptionsArr.forEach(({ effect: effect2, event }) => {
229
+ if (event === "onValueChange" /* onValueChange */ || event === "onValueInitOrChange" /* onValueInitOrChange */) {
230
+ const currentName = Glob.getParentPathByPattern(effectKey, name);
231
+ const prevEffectReturn = this.effectReturnMap.get(event)?.[currentName];
232
+ if (prevEffectReturn) {
233
+ prevEffectReturn();
234
+ }
235
+ const effectReturn = effect2({
236
+ name: currentName,
237
+ value: get(values, currentName),
238
+ prevValue: get(prevValues, currentName),
239
+ formValues: values,
240
+ form: toForm(this.nativeFormModel),
241
+ context: this.nodeContext
242
+ });
243
+ if (effectReturn && typeof effectReturn === "function" && this.effectReturnMap.has(event)) {
244
+ const eventMap = this.effectReturnMap.get(event);
245
+ eventMap[currentName] = effectReturn;
246
+ }
247
+ }
248
+ });
249
+ });
250
+ });
251
+ nativeFormModel.onFormValuesInit(({ values, name, prevValues }) => {
252
+ Object.keys(this.effectMap).forEach((pattern) => {
253
+ const paths = Glob.findMatchPaths(values, pattern);
254
+ const effectOptionsArr = this.effectMap[pattern];
255
+ effectOptionsArr.forEach(({ event, effect: effect2 }) => {
256
+ if (event === "onValueInit" /* onValueInit */ || event === "onValueInitOrChange" /* onValueInitOrChange */) {
257
+ paths.forEach((path) => {
258
+ if (Glob.isMatchOrParent(name, path) || name === path) {
259
+ const prevEffectReturn = this.effectReturnMap.get(event)?.[path];
260
+ if (prevEffectReturn) {
261
+ prevEffectReturn();
262
+ }
263
+ const effectReturn = effect2({
264
+ name: path,
265
+ value: get(values, path),
266
+ formValues: values,
267
+ prevValue: get(prevValues, path),
268
+ form: toForm(this.nativeFormModel),
269
+ context: this.nodeContext
270
+ });
271
+ if (effectReturn && typeof effectReturn === "function" && this.effectReturnMap.has(event)) {
272
+ const eventMap = this.effectReturnMap.get(event);
273
+ eventMap[path] = effectReturn;
274
+ }
275
+ }
276
+ });
277
+ }
278
+ });
279
+ });
280
+ });
281
+ nativeFormModel.onFieldModelCreate((field) => {
282
+ const effectOptionsArr = findMatchedInMap(field, this.effectMap);
283
+ if (effectOptionsArr?.length) {
284
+ const eventMap = groupBy(effectOptionsArr, "event");
285
+ mapKeys(eventMap, (optionsArr, event) => {
286
+ const combinedEffect = (props) => {
287
+ optionsArr.forEach(
288
+ ({ effect: effect2 }) => effect2({
289
+ ...props,
290
+ formValues: nativeFormModel.values,
291
+ form: toForm(this.nativeFormModel),
292
+ context: this.nodeContext
293
+ })
294
+ );
295
+ };
296
+ switch (event) {
297
+ case "onArrayAppend" /* onArrayAppend */:
298
+ if (field instanceof FieldArrayModel) {
299
+ field.onAppend(combinedEffect);
300
+ }
301
+ break;
302
+ case "onArrayDelete" /* onArrayDelete */:
303
+ if (field instanceof FieldArrayModel) {
304
+ field.onDelete(combinedEffect);
305
+ }
306
+ break;
307
+ }
308
+ });
309
+ }
310
+ });
311
+ this._formControl.init();
312
+ this._initialized = true;
313
+ this.onInitializedEmitter.fire(this);
314
+ this.onDispose(() => {
315
+ this._initialized = false;
316
+ this.effectMap = {};
317
+ nativeFormModel.dispose();
318
+ });
319
+ }
320
+ toJSON() {
321
+ if (this.formMeta.formatOnSubmit) {
322
+ return this.formMeta.formatOnSubmit(this.nativeFormModel?.values, this.nodeContext);
323
+ }
324
+ return this.nativeFormModel?.values;
325
+ }
326
+ clearValid() {
327
+ if (this.valid !== null) {
328
+ this.valid = null;
329
+ }
330
+ }
331
+ async validate() {
332
+ this.formFeedbacks = await this.nativeFormModel?.validate();
333
+ this.valid = isEmpty(this.formFeedbacks?.filter((f) => f.level === "error"));
334
+ this.onValidateEmitter.fire(this);
335
+ return this.valid;
336
+ }
337
+ getValues() {
338
+ return this._formControl?._formModel.values;
339
+ }
340
+ getField(name) {
341
+ let finalName = name.includes("/") ? convertGlobPath(name) : name;
342
+ return this.formControl?.getField(finalName);
343
+ }
344
+ getValueIn(name) {
345
+ let finalName = name.includes("/") ? convertGlobPath(name) : name;
346
+ return this.nativeFormModel?.getValueIn(finalName);
347
+ }
348
+ setValueIn(name, value) {
349
+ let finalName = name.includes("/") ? convertGlobPath(name) : name;
350
+ this.nativeFormModel?.setValueIn(finalName, value);
351
+ }
352
+ /**
353
+ * 监听表单某个路径下的值变化
354
+ * @param name 路径
355
+ * @param callback 回调函数
356
+ */
357
+ onFormValueChangeIn(name, callback) {
358
+ if (!this._initialized) {
359
+ throw new Error(
360
+ `[NodeEngine] FormModel Error: onFormValueChangeIn can not be called before initialized`
361
+ );
362
+ }
363
+ return this.formControl._formModel.onFormValuesChange(
364
+ ({ name: changedName, values, prevValues }) => {
365
+ if (changedName === name) {
366
+ callback({
367
+ value: get(values, name),
368
+ prevValue: get(prevValues, name),
369
+ formValues: values,
370
+ prevFormValues: prevValues
371
+ });
372
+ }
373
+ }
374
+ );
375
+ }
376
+ /**
377
+ * @deprecated 该方法用于兼容 V1 版本 FormModel接口,如果确定是FormModelV2 请使用 FormModel.getValueIn
378
+ * @param path glob path
379
+ */
380
+ getFormItemValueByPath(globPath) {
381
+ if (!globPath) {
382
+ return;
383
+ }
384
+ if (globPath === "/") {
385
+ return this._formControl?._formModel.values;
386
+ }
387
+ const name = convertGlobPath(globPath);
388
+ return this.getValueIn(name);
389
+ }
390
+ async validateWithFeedbacks() {
391
+ await this.validate();
392
+ return formFeedbacksToNodeCoreFormFeedbacks(this.formFeedbacks);
393
+ }
394
+ /**
395
+ * @deprecated 该方法用于兼容 V1 版本 FormModel接口,如果确定是FormModelV2, 请使用FormModel.getValueIn 和 FormModel.setValueIn
396
+ * @param path glob path
397
+ */
398
+ getFormItemByPath(path) {
399
+ if (!this.nativeFormModel) {
400
+ return;
401
+ }
402
+ const that = this;
403
+ if (path === "/") {
404
+ return {
405
+ get value() {
406
+ return that.nativeFormModel.values;
407
+ },
408
+ set value(v) {
409
+ that.nativeFormModel.values = v;
410
+ }
411
+ };
412
+ }
413
+ const name = convertGlobPath(path);
414
+ const formItemValue = that.getValueIn(name);
415
+ return {
416
+ get value() {
417
+ return formItemValue;
418
+ },
419
+ set value(v) {
420
+ that.setValueIn(name, v);
421
+ }
422
+ };
423
+ }
424
+ dispose() {
425
+ this.onDisposeEmitter.fire();
426
+ this.effectReturnMap.forEach((eventMap) => {
427
+ Object.values(eventMap).forEach((effectReturn) => {
428
+ effectReturn();
429
+ });
430
+ });
431
+ this.effectMap = DEFAULT.EFFECT_MAP();
432
+ this.effectReturnMap = DEFAULT.EFFECT_RETURN_MAP();
433
+ this.plugins.forEach((p) => {
434
+ p.dispose();
435
+ });
436
+ this.plugins = [];
437
+ this.formFeedbacks = DEFAULT.FORM_FEEDBACKS();
438
+ this._valid = DEFAULT.VALID;
439
+ this._formControl = void 0;
440
+ this._initialized = false;
441
+ this.toDispose.dispose();
442
+ }
443
+ };
444
+
445
+ // src/helpers.ts
446
+ import { FlowNodeFormData as FlowNodeFormData2 } from "@flowgram.ai/form-core";
447
+ function isFormV2(node) {
448
+ return !!node.getNodeRegistry().formMeta?.render;
449
+ }
450
+ function createEffectOptions(event, effect) {
451
+ return {
452
+ event,
453
+ effect
454
+ };
455
+ }
456
+
457
+ // src/hooks.ts
458
+ import { useEffect } from "react";
459
+ import { useRefresh } from "@flowgram.ai/utils";
460
+ import { FlowNodeFormData as FlowNodeFormData3 } from "@flowgram.ai/form-core";
461
+ import { useFormErrors, useFormState, useFormWarnings } from "@flowgram.ai/form";
462
+ function useWatchFormValues(node) {
463
+ const formModel = node.getData(FlowNodeFormData3).getFormModel();
464
+ const refresh = useRefresh();
465
+ useEffect(() => {
466
+ const disposable = formModel.nativeFormModel?.onFormValuesChange(() => {
467
+ refresh();
468
+ });
469
+ return () => disposable?.dispose();
470
+ }, [formModel.nativeFormModel]);
471
+ return formModel.getValues();
472
+ }
473
+ function useWatchFormValueIn(node, name) {
474
+ const formModel = node.getData(FlowNodeFormData3).getFormModel();
475
+ const refresh = useRefresh();
476
+ useEffect(() => {
477
+ const disposable = formModel.nativeFormModel?.onFormValuesChange(({ name: changedName }) => {
478
+ if (name === changedName) {
479
+ refresh();
480
+ }
481
+ });
482
+ return () => disposable?.dispose();
483
+ }, []);
484
+ return formModel.getValueIn(name);
485
+ }
486
+ function useInitializedFormModel(node) {
487
+ const formModel = node.getData(FlowNodeFormData3).getFormModel();
488
+ const refresh = useRefresh();
489
+ useEffect(() => {
490
+ const disposable = formModel.onInitialized(() => {
491
+ refresh();
492
+ });
493
+ return () => disposable.dispose();
494
+ }, [formModel]);
495
+ return formModel;
496
+ }
497
+ function useWatchFormState(node) {
498
+ const formModel = useInitializedFormModel(node);
499
+ return useFormState(formModel.formControl);
500
+ }
501
+ function useWatchFormErrors(node) {
502
+ const formModel = useInitializedFormModel(node);
503
+ return useFormErrors(formModel.formControl);
504
+ }
505
+ function useWatchFormWarnings(node) {
506
+ const formModel = useInitializedFormModel(node);
507
+ return useFormWarnings(formModel.formControl);
508
+ }
509
+
510
+ // src/form-plugin.ts
511
+ import { nanoid } from "nanoid";
512
+ var FormPlugin = class {
513
+ constructor(config, opts) {
514
+ this.name = config?.name || "";
515
+ this.pluginId = `${this.name}__${nanoid()}`;
516
+ this.config = config;
517
+ this.opts = opts;
518
+ }
519
+ get formModel() {
520
+ return this._formModel;
521
+ }
522
+ get ctx() {
523
+ return {
524
+ formModel: this.formModel,
525
+ node: this.formModel.nodeContext.node,
526
+ playgroundContext: this.formModel.nodeContext.playgroundContext
527
+ };
528
+ }
529
+ setupFormMeta(formMeta, nodeContext) {
530
+ const nextFormMeta = {
531
+ ...formMeta
532
+ };
533
+ this.config.onSetupFormMeta?.(
534
+ {
535
+ mergeEffect: (effect) => {
536
+ nextFormMeta.effect = {
537
+ ...nextFormMeta.effect || {},
538
+ ...effect
539
+ };
540
+ },
541
+ mergeValidate: (validate) => {
542
+ nextFormMeta.validate = {
543
+ ...nextFormMeta.validate || {},
544
+ ...validate
545
+ };
546
+ },
547
+ addFormatOnInit: (formatOnInit) => {
548
+ if (!nextFormMeta.formatOnInit) {
549
+ nextFormMeta.formatOnInit = formatOnInit;
550
+ return;
551
+ }
552
+ const legacyFormatOnInit = nextFormMeta.formatOnInit;
553
+ nextFormMeta.formatOnInit = (v, c) => formatOnInit?.(legacyFormatOnInit(v, c), c);
554
+ },
555
+ addFormatOnSubmit: (formatOnSubmit) => {
556
+ if (!nextFormMeta.formatOnSubmit) {
557
+ nextFormMeta.formatOnSubmit = formatOnSubmit;
558
+ return;
559
+ }
560
+ const legacyFormatOnSubmit = nextFormMeta.formatOnSubmit;
561
+ nextFormMeta.formatOnSubmit = (v, c) => formatOnSubmit?.(legacyFormatOnSubmit(v, c), c);
562
+ },
563
+ ...nodeContext
564
+ },
565
+ this.opts
566
+ );
567
+ return nextFormMeta;
568
+ }
569
+ init(formModel) {
570
+ this._formModel = formModel;
571
+ this.config?.onInit?.(this.ctx, this.opts);
572
+ }
573
+ dispose() {
574
+ if (this.config?.onDispose) {
575
+ this.config?.onDispose(this.ctx, this.opts);
576
+ }
577
+ }
578
+ };
579
+ function defineFormPluginCreator(config) {
580
+ return function(opts) {
581
+ return new FormPlugin(config, opts);
582
+ };
583
+ }
584
+
585
+ // src/get-node-form.tsx
586
+ import React2 from "react";
587
+ import { FlowNodeFormData as FlowNodeFormData4, NodeRender } from "@flowgram.ai/form-core";
588
+ function getNodeForm(node) {
589
+ const formModel = node.getData(FlowNodeFormData4)?.getFormModel();
590
+ const nativeFormModel = formModel?.nativeFormModel;
591
+ if (!formModel || !nativeFormModel) return void 0;
592
+ const result = {
593
+ initialValues: nativeFormModel.initialValues,
594
+ get values() {
595
+ return nativeFormModel.values;
596
+ },
597
+ state: nativeFormModel.state,
598
+ getValueIn: (name) => nativeFormModel.getValueIn(name),
599
+ setValueIn: (name, value) => nativeFormModel.setValueIn(name, value),
600
+ updateFormValues: (values) => {
601
+ formModel.updateFormValues(values);
602
+ },
603
+ render: () => /* @__PURE__ */ React2.createElement(NodeRender, { node }),
604
+ onFormValuesChange: formModel.onFormValuesChange.bind(formModel),
605
+ onFormValueChangeIn: formModel.onFormValueChangeIn.bind(formModel),
606
+ onValidate: formModel.nativeFormModel.onValidate,
607
+ validate: formModel.validate.bind(formModel)
608
+ };
609
+ Object.defineProperty(result, "_formModel", {
610
+ enumerable: false,
611
+ get() {
612
+ return formModel;
613
+ }
614
+ });
615
+ return result;
616
+ }
617
+ export {
618
+ DataEvent,
619
+ FormModelV2,
620
+ FormPlugin,
621
+ createEffectOptions,
622
+ defineFormPluginCreator,
623
+ getNodeForm,
624
+ isFormMetaV2,
625
+ isFormModelV2,
626
+ isFormV2,
627
+ useInitializedFormModel,
628
+ useWatchFormErrors,
629
+ useWatchFormState,
630
+ useWatchFormValueIn,
631
+ useWatchFormValues,
632
+ useWatchFormWarnings
633
+ };
634
+ //# sourceMappingURL=index.js.map