@tanstack/form-core 0.0.1

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,696 @@
1
+ /**
2
+ * form-core
3
+ *
4
+ * Copyright (c) TanStack
5
+ *
6
+ * This source code is licensed under the MIT license found in the
7
+ * LICENSE.md file in the root directory of this source tree.
8
+ *
9
+ * @license MIT
10
+ */
11
+ (function (global, factory) {
12
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
13
+ typeof define === 'function' && define.amd ? define(['exports'], factory) :
14
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.FormCore = {}));
15
+ })(this, (function (exports) { 'use strict';
16
+
17
+ /**
18
+ * store
19
+ *
20
+ * Copyright (c) TanStack
21
+ *
22
+ * This source code is licensed under the MIT license found in the
23
+ * LICENSE.md file in the root directory of this source tree.
24
+ *
25
+ * @license MIT
26
+ */
27
+ class Store {
28
+ listeners = new Set();
29
+ batching = false;
30
+ queue = [];
31
+ constructor(initialState, options) {
32
+ this.state = initialState;
33
+ this.options = options;
34
+ }
35
+ subscribe = listener => {
36
+ this.listeners.add(listener);
37
+ const unsub = this.options?.onSubscribe?.(listener, this);
38
+ return () => {
39
+ this.listeners.delete(listener);
40
+ unsub?.();
41
+ };
42
+ };
43
+ setState = updater => {
44
+ const previous = this.state;
45
+ this.state = this.options?.updateFn ? this.options.updateFn(previous)(updater) : updater(previous);
46
+ if (this.state === previous) return;
47
+ this.options?.onUpdate?.(this.state, previous);
48
+ this.queue.push(() => {
49
+ this.listeners.forEach(listener => listener(this.state, previous));
50
+ });
51
+ this.#flush();
52
+ };
53
+ #flush = () => {
54
+ if (this.batching) return;
55
+ this.queue.forEach(cb => cb());
56
+ this.queue = [];
57
+ };
58
+ batch = cb => {
59
+ this.batching = true;
60
+ cb();
61
+ this.batching = false;
62
+ this.#flush();
63
+ };
64
+ }
65
+
66
+ function functionalUpdate(updater, input) {
67
+ return typeof updater === 'function' ? updater(input) : updater;
68
+ }
69
+ function getBy(obj, path) {
70
+ if (!path) {
71
+ throw new Error('A path string is required to use getBy');
72
+ }
73
+
74
+ const pathArray = makePathArray(path);
75
+ const pathObj = pathArray;
76
+ return pathObj.reduce((current, pathPart) => {
77
+ if (typeof current !== 'undefined') {
78
+ return current[pathPart];
79
+ }
80
+
81
+ return undefined;
82
+ }, obj);
83
+ }
84
+ function setBy(obj, _path, updater) {
85
+ const path = makePathArray(_path);
86
+
87
+ function doSet(parent) {
88
+ if (!path.length) {
89
+ return functionalUpdate(updater, parent);
90
+ }
91
+
92
+ const key = path.shift();
93
+
94
+ if (typeof key === 'string') {
95
+ if (typeof parent === 'object') {
96
+ return { ...parent,
97
+ [key]: doSet(parent[key])
98
+ };
99
+ }
100
+
101
+ return {
102
+ [key]: doSet()
103
+ };
104
+ }
105
+
106
+ if (typeof key === 'number') {
107
+ if (Array.isArray(parent)) {
108
+ const prefix = parent.slice(0, key);
109
+ return [...(prefix.length ? prefix : new Array(key)), doSet(parent[key]), ...parent.slice(key + 1)];
110
+ }
111
+
112
+ return [...new Array(key), doSet()];
113
+ }
114
+
115
+ throw new Error('Uh oh!');
116
+ }
117
+
118
+ return doSet(obj);
119
+ }
120
+ const reFindNumbers0 = /^(\d*)$/gm;
121
+ const reFindNumbers1 = /\.(\d*)\./gm;
122
+ const reFindNumbers2 = /^(\d*)\./gm;
123
+ const reFindNumbers3 = /\.(\d*$)/gm;
124
+ const reFindMultiplePeriods = /\.{2,}/gm;
125
+
126
+ function makePathArray(str) {
127
+ return str.replace('[', '.').replace(']', '').replace(reFindNumbers0, '__int__$1').replace(reFindNumbers1, '.__int__$1.').replace(reFindNumbers2, '__int__$1.').replace(reFindNumbers3, '.__int__$1').replace(reFindMultiplePeriods, '.').split('.').map(d => {
128
+ if (d.indexOf('__int__') === 0) {
129
+ return parseInt(d.substring('__int__'.length), 10);
130
+ }
131
+
132
+ return d;
133
+ });
134
+ }
135
+
136
+ function getDefaultFormState(defaultState) {
137
+ return {
138
+ values: {},
139
+ fieldMeta: {},
140
+ canSubmit: true,
141
+ isFieldsValid: false,
142
+ isFieldsValidating: false,
143
+ isFormValid: false,
144
+ isFormValidating: false,
145
+ isSubmitted: false,
146
+ isSubmitting: false,
147
+ isTouched: false,
148
+ isValid: false,
149
+ isValidating: false,
150
+ submissionAttempts: 0,
151
+ formValidationCount: 0,
152
+ ...defaultState
153
+ };
154
+ }
155
+ class FormApi {
156
+ // // This carries the context for nested fields
157
+ constructor(_opts) {
158
+ var _opts$defaultValues, _opts$defaultState;
159
+
160
+ this.options = {};
161
+ this.fieldInfo = {};
162
+ this.validationMeta = {};
163
+
164
+ this.update = options => {
165
+ this.store.batch(() => {
166
+ if (options.defaultState && options.defaultState !== this.options.defaultState) {
167
+ this.store.setState(prev => ({ ...prev,
168
+ ...options.defaultState
169
+ }));
170
+ }
171
+
172
+ if (options.defaultValues !== this.options.defaultValues) {
173
+ this.store.setState(prev => ({ ...prev,
174
+ values: options.defaultValues
175
+ }));
176
+ }
177
+ });
178
+ this.options = options;
179
+ };
180
+
181
+ this.reset = () => this.store.setState(() => getDefaultFormState(this.options.defaultValues));
182
+
183
+ this.validateAllFields = async () => {
184
+ const fieldValidationPromises = [];
185
+ this.store.batch(() => {
186
+ void Object.values(this.fieldInfo).forEach(field => {
187
+ Object.values(field.instances).forEach(instance => {
188
+ // If any fields are not touched
189
+ if (!instance.state.meta.isTouched) {
190
+ // Mark them as touched
191
+ instance.setMeta(prev => ({ ...prev,
192
+ isTouched: true
193
+ })); // Validate the field
194
+
195
+ if (instance.options.validate) {
196
+ fieldValidationPromises.push(instance.validate());
197
+ }
198
+ }
199
+ });
200
+ });
201
+ });
202
+ return Promise.all(fieldValidationPromises);
203
+ };
204
+
205
+ this.validateForm = async () => {
206
+ const {
207
+ validate
208
+ } = this.options;
209
+
210
+ if (!validate) {
211
+ return;
212
+ } // Use the formValidationCount for all field instances to
213
+ // track freshness of the validation
214
+
215
+
216
+ this.store.setState(prev => ({ ...prev,
217
+ isValidating: true,
218
+ formValidationCount: prev.formValidationCount + 1
219
+ }));
220
+ const formValidationCount = this.state.formValidationCount;
221
+
222
+ const checkLatest = () => formValidationCount === this.state.formValidationCount;
223
+
224
+ if (!this.validationMeta.validationPromise) {
225
+ this.validationMeta.validationPromise = new Promise((resolve, reject) => {
226
+ this.validationMeta.validationResolve = resolve;
227
+ this.validationMeta.validationReject = reject;
228
+ });
229
+ }
230
+
231
+ const doValidation = async () => {
232
+ try {
233
+ const error = await validate(this.state.values, this);
234
+
235
+ if (checkLatest()) {
236
+ var _this$validationMeta$, _this$validationMeta;
237
+
238
+ this.store.setState(prev => ({ ...prev,
239
+ isValidating: false,
240
+ error: error ? typeof error === 'string' ? error : 'Invalid Form Values' : null
241
+ }));
242
+ (_this$validationMeta$ = (_this$validationMeta = this.validationMeta).validationResolve) == null ? void 0 : _this$validationMeta$.call(_this$validationMeta, error);
243
+ }
244
+ } catch (err) {
245
+ if (checkLatest()) {
246
+ var _this$validationMeta$2, _this$validationMeta2;
247
+
248
+ (_this$validationMeta$2 = (_this$validationMeta2 = this.validationMeta).validationReject) == null ? void 0 : _this$validationMeta$2.call(_this$validationMeta2, err);
249
+ }
250
+ } finally {
251
+ delete this.validationMeta.validationPromise;
252
+ }
253
+ };
254
+
255
+ doValidation();
256
+ return this.validationMeta.validationPromise;
257
+ };
258
+
259
+ this.handleSubmit = async e => {
260
+ e.preventDefault();
261
+ e.stopPropagation(); // Check to see that the form and all fields have been touched
262
+ // If they have not, touch them all and run validation
263
+ // Run form validation
264
+ // Submit the form
265
+
266
+ this.store.setState(old => ({ ...old,
267
+ // Submittion attempts mark the form as not submitted
268
+ isSubmitted: false,
269
+ // Count submission attempts
270
+ submissionAttempts: old.submissionAttempts + 1
271
+ })); // Don't let invalid forms submit
272
+
273
+ if (!this.state.canSubmit) return;
274
+ this.store.setState(d => ({ ...d,
275
+ isSubmitting: true
276
+ }));
277
+
278
+ const done = () => {
279
+ this.store.setState(prev => ({ ...prev,
280
+ isSubmitting: false
281
+ }));
282
+ }; // Validate all fields
283
+
284
+
285
+ await this.validateAllFields(); // Fields are invalid, do not submit
286
+
287
+ if (!this.state.isFieldsValid) {
288
+ var _this$options$onInval, _this$options;
289
+
290
+ done();
291
+ (_this$options$onInval = (_this$options = this.options).onInvalidSubmit) == null ? void 0 : _this$options$onInval.call(_this$options, this.state.values, this);
292
+ return;
293
+ } // Run validation for the form
294
+
295
+
296
+ await this.validateForm();
297
+
298
+ if (!this.state.isValid) {
299
+ var _this$options$onInval2, _this$options2;
300
+
301
+ done();
302
+ (_this$options$onInval2 = (_this$options2 = this.options).onInvalidSubmit) == null ? void 0 : _this$options$onInval2.call(_this$options2, this.state.values, this);
303
+ return;
304
+ }
305
+
306
+ try {
307
+ var _this$options$onSubmi, _this$options3;
308
+
309
+ // Run the submit code
310
+ await ((_this$options$onSubmi = (_this$options3 = this.options).onSubmit) == null ? void 0 : _this$options$onSubmi.call(_this$options3, this.state.values, this));
311
+ this.store.batch(() => {
312
+ this.store.setState(prev => ({ ...prev,
313
+ isSubmitted: true
314
+ }));
315
+ done();
316
+ });
317
+ } catch (err) {
318
+ done();
319
+ throw err;
320
+ }
321
+ };
322
+
323
+ this.getFieldValue = field => getBy(this.state.values, field);
324
+
325
+ this.getFieldMeta = field => {
326
+ return this.state.fieldMeta[field];
327
+ };
328
+
329
+ this.getFieldInfo = field => {
330
+ var _this$fieldInfo;
331
+
332
+ return (_this$fieldInfo = this.fieldInfo)[field] || (_this$fieldInfo[field] = {
333
+ instances: {}
334
+ });
335
+ };
336
+
337
+ this.setFieldMeta = (field, updater) => {
338
+ this.store.setState(prev => {
339
+ return { ...prev,
340
+ fieldMeta: { ...prev.fieldMeta,
341
+ [field]: functionalUpdate(updater, prev.fieldMeta[field])
342
+ }
343
+ };
344
+ });
345
+ };
346
+
347
+ this.setFieldValue = (field, updater, opts) => {
348
+ var _opts$touch;
349
+
350
+ const touch = (_opts$touch = opts == null ? void 0 : opts.touch) != null ? _opts$touch : true;
351
+ this.store.batch(() => {
352
+ this.store.setState(prev => {
353
+ return { ...prev,
354
+ values: setBy(prev.values, field, updater)
355
+ };
356
+ });
357
+
358
+ if (touch) {
359
+ this.setFieldMeta(field, prev => ({ ...prev,
360
+ isTouched: true
361
+ }));
362
+ }
363
+ });
364
+ };
365
+
366
+ this.pushFieldValue = (field, value, opts) => {
367
+ return this.setFieldValue(field, prev => [...(Array.isArray(prev) ? prev : []), value], opts);
368
+ };
369
+
370
+ this.insertFieldValue = (field, index, value, opts) => {
371
+ this.setFieldValue(field, prev => {
372
+ // invariant( // TODO: bring in invariant
373
+ // Array.isArray(prev),
374
+ // `Cannot insert a field value into a non-array field. Check that this field's existing value is an array: ${field}.`
375
+ // )
376
+ return prev.map((d, i) => i === index ? value : d);
377
+ }, opts);
378
+ };
379
+
380
+ this.spliceFieldValue = (field, index, opts) => {
381
+ this.setFieldValue(field, prev => {
382
+ // invariant( // TODO: bring in invariant
383
+ // Array.isArray(prev),
384
+ // `Cannot insert a field value into a non-array field. Check that this field's existing value is an array: ${field}.`
385
+ // )
386
+ return prev.filter((_d, i) => i !== index);
387
+ }, opts);
388
+ };
389
+
390
+ this.swapFieldValues = (field, index1, index2) => {
391
+ this.setFieldValue(field, prev => {
392
+ const prev1 = prev[index1];
393
+ const prev2 = prev[index2];
394
+ return setBy(setBy(prev, [index1], prev2), [index2], prev1);
395
+ });
396
+ };
397
+
398
+ this.store = new Store(getDefaultFormState({ ...(_opts == null ? void 0 : _opts.defaultState),
399
+ values: (_opts$defaultValues = _opts == null ? void 0 : _opts.defaultValues) != null ? _opts$defaultValues : _opts == null ? void 0 : (_opts$defaultState = _opts.defaultState) == null ? void 0 : _opts$defaultState.values,
400
+ isFormValid: !(_opts != null && _opts.validate)
401
+ }), {
402
+ onUpdate: next => {
403
+ // Computed state
404
+ const fieldMetaValues = Object.values(next.fieldMeta);
405
+ const isFieldsValidating = fieldMetaValues.some(field => field == null ? void 0 : field.isValidating);
406
+ const isFieldsValid = !fieldMetaValues.some(field => field == null ? void 0 : field.error);
407
+ const isTouched = fieldMetaValues.some(field => field == null ? void 0 : field.isTouched);
408
+ const isValidating = isFieldsValidating || next.isFormValidating;
409
+ const isFormValid = !next.formError;
410
+ const isValid = isFieldsValid && isFormValid;
411
+ const canSubmit = next.submissionAttempts === 0 && !isTouched || !isValidating && !next.isSubmitting && isValid;
412
+ next = { ...next,
413
+ isFieldsValidating,
414
+ isFieldsValid,
415
+ isFormValid,
416
+ isValid,
417
+ canSubmit,
418
+ isTouched
419
+ }; // Create a shortcut for the state
420
+ // Write it back to the store
421
+
422
+ this.store.state = next;
423
+ this.state = next;
424
+ }
425
+ });
426
+ this.state = this.store.state;
427
+ this.update(_opts || {});
428
+ }
429
+
430
+ }
431
+
432
+ var id = 0;
433
+
434
+ function _classPrivateFieldLooseKey(name) {
435
+ return "__private_" + id++ + "_" + name;
436
+ }
437
+
438
+ function _classPrivateFieldLooseBase(receiver, privateKey) {
439
+ if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) {
440
+ throw new TypeError("attempted to use private field on non-instance");
441
+ }
442
+
443
+ return receiver;
444
+ }
445
+
446
+ let uid = 0;
447
+
448
+ var _updateStore = /*#__PURE__*/_classPrivateFieldLooseKey("updateStore");
449
+
450
+ var _validate = /*#__PURE__*/_classPrivateFieldLooseKey("validate");
451
+
452
+ class FieldApi {
453
+ constructor(_opts) {
454
+ var _this$getMeta;
455
+
456
+ this.options = {};
457
+
458
+ this.mount = () => {
459
+ const info = this.getInfo();
460
+ info.instances[this.uid] = this;
461
+ const unsubscribe = this.form.store.subscribe(() => {
462
+ _classPrivateFieldLooseBase(this, _updateStore)[_updateStore]();
463
+ });
464
+ return () => {
465
+ unsubscribe();
466
+ delete info.instances[this.uid];
467
+
468
+ if (!Object.keys(info.instances).length) {
469
+ delete this.form.fieldInfo[this.name];
470
+ }
471
+ };
472
+ };
473
+
474
+ Object.defineProperty(this, _updateStore, {
475
+ writable: true,
476
+ value: () => {
477
+ this.store.batch(() => {
478
+ const nextValue = this.getValue();
479
+ const nextMeta = this.getMeta();
480
+
481
+ if (nextValue !== this.state.value) {
482
+ this.store.setState(prev => ({ ...prev,
483
+ value: nextValue
484
+ }));
485
+ }
486
+
487
+ if (nextMeta !== this.state.meta) {
488
+ this.store.setState(prev => ({ ...prev,
489
+ meta: nextMeta
490
+ }));
491
+ }
492
+ });
493
+ }
494
+ });
495
+
496
+ this.update = opts => {
497
+ this.options = {
498
+ validateOn: 'change',
499
+ validateAsyncOn: 'blur',
500
+ validateAsyncDebounceMs: 0,
501
+ ...opts
502
+ }; // Default Value
503
+
504
+ if (this.state.value === undefined && this.options.defaultValue !== undefined) {
505
+ this.setValue(this.options.defaultValue);
506
+ } // Default Meta
507
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
508
+
509
+
510
+ if (this.getMeta() === undefined) {
511
+ this.setMeta(this.state.meta);
512
+ }
513
+ };
514
+
515
+ this.getValue = () => this.form.getFieldValue(this.name);
516
+
517
+ this.setValue = (updater, options) => this.form.setFieldValue(this.name, updater, options);
518
+
519
+ this.getMeta = () => this.form.getFieldMeta(this.name);
520
+
521
+ this.setMeta = updater => this.form.setFieldMeta(this.name, updater);
522
+
523
+ this.getInfo = () => this.form.getFieldInfo(this.name);
524
+
525
+ this.pushValue = value => this.form.pushFieldValue(this.name, value);
526
+
527
+ this.insertValue = (index, value) => this.form.insertFieldValue(this.name, index, value);
528
+
529
+ this.removeValue = index => this.form.spliceFieldValue(this.name, index);
530
+
531
+ this.swapValues = (aIndex, bIndex) => this.form.swapFieldValues(this.name, aIndex, bIndex);
532
+
533
+ this.getSubField = name => new FieldApi({
534
+ name: this.name + "." + name,
535
+ form: this.form
536
+ });
537
+
538
+ Object.defineProperty(this, _validate, {
539
+ writable: true,
540
+ value: async isAsync => {
541
+ if (!this.options.validate) {
542
+ return;
543
+ }
544
+
545
+ this.setMeta(prev => ({ ...prev,
546
+ isValidating: true
547
+ })); // Use the validationCount for all field instances to
548
+ // track freshness of the validation
549
+
550
+ const validationCount = (this.getInfo().validationCount || 0) + 1;
551
+ this.getInfo().validationCount = validationCount;
552
+
553
+ const checkLatest = () => validationCount === this.getInfo().validationCount;
554
+
555
+ if (!this.getInfo().validationPromise) {
556
+ this.getInfo().validationPromise = new Promise((resolve, reject) => {
557
+ this.getInfo().validationResolve = resolve;
558
+ this.getInfo().validationReject = reject;
559
+ });
560
+ }
561
+
562
+ try {
563
+ const rawError = await this.options.validate(this.state.value, this);
564
+
565
+ if (checkLatest()) {
566
+ var _this$getInfo$validat, _this$getInfo;
567
+
568
+ const error = (() => {
569
+ if (rawError) {
570
+ if (typeof rawError !== 'string') {
571
+ return 'Invalid Form Values';
572
+ }
573
+
574
+ return rawError;
575
+ }
576
+
577
+ return undefined;
578
+ })();
579
+
580
+ this.setMeta(prev => ({ ...prev,
581
+ isValidating: false,
582
+ error
583
+ }));
584
+ (_this$getInfo$validat = (_this$getInfo = this.getInfo()).validationResolve) == null ? void 0 : _this$getInfo$validat.call(_this$getInfo, error);
585
+ }
586
+ } catch (error) {
587
+ if (checkLatest()) {
588
+ var _this$getInfo$validat2, _this$getInfo2;
589
+
590
+ (_this$getInfo$validat2 = (_this$getInfo2 = this.getInfo()).validationReject) == null ? void 0 : _this$getInfo$validat2.call(_this$getInfo2, error);
591
+ throw error;
592
+ }
593
+ } finally {
594
+ if (checkLatest()) {
595
+ this.setMeta(prev => ({ ...prev,
596
+ isValidating: false
597
+ }));
598
+ delete this.getInfo().validationPromise;
599
+ }
600
+ }
601
+
602
+ return this.getInfo().validationPromise;
603
+ }
604
+ });
605
+
606
+ this.validate = () => _classPrivateFieldLooseBase(this, _validate)[_validate](false);
607
+
608
+ this.validateAsync = () => _classPrivateFieldLooseBase(this, _validate)[_validate](true);
609
+
610
+ this.getChangeProps = (props = {}) => {
611
+ return { ...props,
612
+ value: this.state.value,
613
+ onChange: value => {
614
+ this.setValue(value);
615
+ props.onChange == null ? void 0 : props.onChange(value);
616
+ },
617
+ onBlur: e => {
618
+ this.setMeta(prev => ({ ...prev,
619
+ isTouched: true
620
+ }));
621
+ const {
622
+ validateOn
623
+ } = this.options;
624
+
625
+ if (validateOn === 'blur' || validateOn.split('-')[0] === 'blur') {
626
+ this.validate();
627
+ }
628
+
629
+ props.onBlur == null ? void 0 : props.onBlur(e);
630
+ }
631
+ };
632
+ };
633
+
634
+ this.getInputProps = (props = {}) => {
635
+ return { ...props,
636
+ value: String(this.state.value),
637
+ onChange: e => {
638
+ this.setValue(e.target.value);
639
+ props.onChange == null ? void 0 : props.onChange(e.target.value);
640
+ },
641
+ onBlur: this.getChangeProps(props).onBlur
642
+ };
643
+ };
644
+
645
+ this.form = _opts.form;
646
+ this.uid = uid++; // Support field prefixing from FieldScope
647
+
648
+ let fieldPrefix = '';
649
+
650
+ if (this.form.fieldName) {
651
+ fieldPrefix = this.form.fieldName + ".";
652
+ }
653
+
654
+ this.name = fieldPrefix + _opts.name;
655
+ this.store = new Store({
656
+ value: this.getValue(),
657
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
658
+ meta: (_this$getMeta = this.getMeta()) != null ? _this$getMeta : {
659
+ isValidating: false,
660
+ isTouched: false,
661
+ ...this.options.defaultMeta
662
+ }
663
+ }, {
664
+ onUpdate: next => {
665
+ next.meta.touchedError = next.meta.isTouched ? next.meta.error : undefined; // Do not validate pristine fields
666
+
667
+ if (!this.options.validatePristine && !next.meta.isTouched) return; // If validateOn is set to a variation of change, run the validation
668
+
669
+ if (this.options.validateOn === 'change' || this.options.validateOn.split('-')[0] === 'change') {
670
+ try {
671
+ this.validate();
672
+ } catch (err) {
673
+ console.error('An error occurred during validation', err);
674
+ }
675
+ }
676
+
677
+ this.state = next;
678
+ }
679
+ });
680
+ this.state = this.store.state;
681
+ this.update(_opts);
682
+ }
683
+
684
+ }
685
+
686
+ exports.FieldApi = FieldApi;
687
+ exports.FormApi = FormApi;
688
+ exports.functionalUpdate = functionalUpdate;
689
+ exports.getBy = getBy;
690
+ exports.getDefaultFormState = getDefaultFormState;
691
+ exports.setBy = setBy;
692
+
693
+ Object.defineProperty(exports, '__esModule', { value: true });
694
+
695
+ }));
696
+ //# sourceMappingURL=index.development.js.map